# Google Play EMM API . collectionviewers

## Instance Methods

Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection.

Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection.

Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection.

Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics.

Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection.

### Method Details

`delete(enterpriseId, collectionId, userId)`

    Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)
      collectionId: string, The ID of the collection. (required)
      userId: string, The ID of the user. (required)

`get(enterpriseId, collectionId, userId)`

    Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)
      collectionId: string, The ID of the collection. (required)
      userId: string, The ID of the user. (required)

    Returns:
      An object of the form:

        { # A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model:
            # - Google managed domain identity model requires synchronization to Google account sources (via primaryEmail).
            # - Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.
          "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user".
          "displayName": "A String", # The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as "Example, Inc.") or your name (as EMM). Not used for Google-managed user accounts.
          "accountIdentifier": "A String", # A unique identifier you create for this user, such as "user342" or "asset#44418". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users.
          "managementType": "A String", # The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With emmManaged users, the EMM is in charge.
          "primaryEmail": "A String", # The user's primary email address, for example, "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users.
          "accountType": "A String", # The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount.
          "id": "A String", # The unique ID for the user.
        }

`list(enterpriseId, collectionId)`

    Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)
      collectionId: string, The ID of the collection. (required)

    Returns:
      An object of the form:

        { # The user resources for the collection.
        "kind": "androidenterprise#collectionViewersListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionViewersListResponse".
        "user": [ # A user of an enterprise.
          { # A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model:
                # - Google managed domain identity model requires synchronization to Google account sources (via primaryEmail).
                # - Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.
              "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user".
              "displayName": "A String", # The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as "Example, Inc.") or your name (as EMM). Not used for Google-managed user accounts.
              "accountIdentifier": "A String", # A unique identifier you create for this user, such as "user342" or "asset#44418". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users.
              "managementType": "A String", # The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With emmManaged users, the EMM is in charge.
              "primaryEmail": "A String", # The user's primary email address, for example, "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users.
              "accountType": "A String", # The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount.
              "id": "A String", # The unique ID for the user.
            },
        ],
      }

`patch(enterpriseId, collectionId, userId, body)`

    Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)
      collectionId: string, The ID of the collection. (required)
      userId: string, The ID of the user. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model:
          # - Google managed domain identity model requires synchronization to Google account sources (via primaryEmail).
          # - Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.
        "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user".
        "displayName": "A String", # The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as "Example, Inc.") or your name (as EMM). Not used for Google-managed user accounts.
        "accountIdentifier": "A String", # A unique identifier you create for this user, such as "user342" or "asset#44418". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users.
        "managementType": "A String", # The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With emmManaged users, the EMM is in charge.
        "primaryEmail": "A String", # The user's primary email address, for example, "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users.
        "accountType": "A String", # The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount.
        "id": "A String", # The unique ID for the user.
      }

    Returns:
      An object of the form:

        { # A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model:
            # - Google managed domain identity model requires synchronization to Google account sources (via primaryEmail).
            # - Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.
          "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user".
          "displayName": "A String", # The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as "Example, Inc.") or your name (as EMM). Not used for Google-managed user accounts.
          "accountIdentifier": "A String", # A unique identifier you create for this user, such as "user342" or "asset#44418". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users.
          "managementType": "A String", # The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With emmManaged users, the EMM is in charge.
          "primaryEmail": "A String", # The user's primary email address, for example, "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users.
          "accountType": "A String", # The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount.
          "id": "A String", # The unique ID for the user.
        }

`update(enterpriseId, collectionId, userId, body)`

    Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection.

    Args:
      enterpriseId: string, The ID of the enterprise. (required)
      collectionId: string, The ID of the collection. (required)
      userId: string, The ID of the user. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model:
          # - Google managed domain identity model requires synchronization to Google account sources (via primaryEmail).
          # - Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.
        "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user".
        "displayName": "A String", # The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as "Example, Inc.") or your name (as EMM). Not used for Google-managed user accounts.
        "accountIdentifier": "A String", # A unique identifier you create for this user, such as "user342" or "asset#44418". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users.
        "managementType": "A String", # The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With emmManaged users, the EMM is in charge.
        "primaryEmail": "A String", # The user's primary email address, for example, "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users.
        "accountType": "A String", # The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount.
        "id": "A String", # The unique ID for the user.
      }

    Returns:
      An object of the form:

        { # A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model:
            # - Google managed domain identity model requires synchronization to Google account sources (via primaryEmail).
            # - Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.
          "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user".
          "displayName": "A String", # The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as "Example, Inc.") or your name (as EMM). Not used for Google-managed user accounts.
          "accountIdentifier": "A String", # A unique identifier you create for this user, such as "user342" or "asset#44418". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users.
          "managementType": "A String", # The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With emmManaged users, the EMM is in charge.
          "primaryEmail": "A String", # The user's primary email address, for example, "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users.
          "accountType": "A String", # The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount.
          "id": "A String", # The unique ID for the user.
        }