androidenterprise

package
v2.3.0-rc.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package androidenterprise provides access to the Google Play EMM API.

See https://developers.google.com/play/enterprise

Usage example:

import "google.golang.org/api/androidenterprise/v1"
...
androidenterpriseService, err := androidenterprise.New(oauthHttpClient)

Index

Constants

View Source
const (
	// Manage corporate Android devices
	AndroidenterpriseScope = "https://www.googleapis.com/auth/androidenterprise"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppRestrictionsSchema

type AppRestrictionsSchema struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#appRestrictionsSchema".
	Kind string `json:"kind,omitempty"`

	// Restrictions: The set of restrictions that make up this schema.
	Restrictions []*AppRestrictionsSchemaRestriction `json:"restrictions,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

AppRestrictionsSchema: Represents the list of app restrictions available to be pre-configured for the product.

func (*AppRestrictionsSchema) MarshalJSON

func (s *AppRestrictionsSchema) MarshalJSON() ([]byte, error)

type AppRestrictionsSchemaRestriction

type AppRestrictionsSchemaRestriction struct {
	// DefaultValue: The default value of the restriction.
	DefaultValue *AppRestrictionsSchemaRestrictionRestrictionValue `json:"defaultValue,omitempty"`

	// Description: A longer description of the restriction, giving more
	// detail of what it affects.
	Description string `json:"description,omitempty"`

	// Entry: For choice or multiselect restrictions, the list of possible
	// entries' human-readable names.
	Entry []string `json:"entry,omitempty"`

	// EntryValue: For choice or multiselect restrictions, the list of
	// possible entries' machine-readable values.
	EntryValue []string `json:"entryValue,omitempty"`

	// Key: The unique key that the product uses to identify the
	// restriction, e.g. "com.google.android.gm.fieldname".
	Key string `json:"key,omitempty"`

	// RestrictionType: The type of the restriction.
	RestrictionType string `json:"restrictionType,omitempty"`

	// Title: The name of the restriction.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

AppRestrictionsSchemaRestriction: A restriction in the App Restriction Schema represents a piece of configuration that may be pre-applied.

func (*AppRestrictionsSchemaRestriction) MarshalJSON

func (s *AppRestrictionsSchemaRestriction) MarshalJSON() ([]byte, error)

type AppRestrictionsSchemaRestrictionRestrictionValue

type AppRestrictionsSchemaRestrictionRestrictionValue struct {
	// Type: The type of the value being provided.
	Type string `json:"type,omitempty"`

	// ValueBool: The boolean value - this will only be present if type is
	// bool.
	ValueBool bool `json:"valueBool,omitempty"`

	// ValueInteger: The integer value - this will only be present if type
	// is integer.
	ValueInteger int64 `json:"valueInteger,omitempty"`

	// ValueMultiselect: The list of string values - this will only be
	// present if type is multiselect.
	ValueMultiselect []string `json:"valueMultiselect,omitempty"`

	// ValueString: The string value - this will be present for types
	// string, choice and hidden.
	ValueString string `json:"valueString,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Type") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

AppRestrictionsSchemaRestrictionRestrictionValue: A typed value for the restriction.

func (*AppRestrictionsSchemaRestrictionRestrictionValue) MarshalJSON

type AppVersion

type AppVersion struct {
	// VersionCode: Unique increasing identifier for the app version.
	VersionCode int64 `json:"versionCode,omitempty"`

	// VersionString: The string used in the Play Store by the app developer
	// to identify the version. The string is not necessarily unique or
	// localized (for example, the string could be "1.4").
	VersionString string `json:"versionString,omitempty"`

	// ForceSendFields is a list of field names (e.g. "VersionCode") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

AppVersion: This represents a single version of the app.

func (*AppVersion) MarshalJSON

func (s *AppVersion) MarshalJSON() ([]byte, error)

type ApprovalUrlInfo

type ApprovalUrlInfo struct {
	// ApprovalUrl: A URL that displays a product's permissions and that can
	// also be used to approve the product with the Products.approve call.
	ApprovalUrl string `json:"approvalUrl,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#approvalUrlInfo".
	Kind string `json:"kind,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ApprovalUrl") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ApprovalUrlInfo: Information on an approval URL.

func (*ApprovalUrlInfo) MarshalJSON

func (s *ApprovalUrlInfo) MarshalJSON() ([]byte, error)

type Collection

type Collection struct {
	// CollectionId: Arbitrary unique ID, allocated by the API on creation.
	CollectionId string `json:"collectionId,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#collection".
	Kind string `json:"kind,omitempty"`

	// Name: A user-friendly name for the collection (should be unique),
	// e.g. "Accounting apps".
	Name string `json:"name,omitempty"`

	// ProductId: The IDs of the products in the collection, in the order in
	// which they should be displayed.
	ProductId []string `json:"productId,omitempty"`

	// Visibility: Whether this collection is visible to all users, or only
	// to the users that have been granted access through the
	// "Collectionviewers" API. With the launch of the
	// "setAvailableProductSet" API, this property should always be set to
	// "viewersOnly", as the "allUsers" option will bypass the
	// "availableProductSet" for all users within a domain.
	//
	// The "allUsers" setting is deprecated, and will be removed.
	Visibility string `json:"visibility,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CollectionId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Collection: A collection resource defines a named set of apps that is visible to a set of users in the Google Play Store app running on those users' managed devices. Those users can then install any of those apps if they wish (which will trigger creation of install and entitlement resources). A user cannot install an app on a managed device unless the app is listed in at least one collection that is visible to that user.

Note that the API can be used to directly install an app regardless of whether it is in any collection - so an enterprise has a choice of either directly pushing apps to users, or allowing users to install apps if they want. Which is appropriate will depend on the enterprise's policies and the purpose of the apps concerned.

func (*Collection) MarshalJSON

func (s *Collection) MarshalJSON() ([]byte, error)

type CollectionViewersListResponse

type CollectionViewersListResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#collectionViewersListResponse".
	Kind string `json:"kind,omitempty"`

	// User: A user of an enterprise.
	User []*User `json:"user,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

CollectionViewersListResponse: The user resources for the collection.

func (*CollectionViewersListResponse) MarshalJSON

func (s *CollectionViewersListResponse) MarshalJSON() ([]byte, error)

type CollectionsDeleteCall

type CollectionsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CollectionsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionsDeleteCall) Do

func (c *CollectionsDeleteCall) Do() error

Do executes the "androidenterprise.collections.delete" call.

func (*CollectionsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CollectionsGetCall

type CollectionsGetCall struct {
	// contains filtered or unexported fields
}

func (*CollectionsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionsGetCall) Do

func (c *CollectionsGetCall) Do() (*Collection, error)

Do executes the "androidenterprise.collections.get" call. Exactly one of *Collection or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Collection.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CollectionsGetCall) IfNoneMatch

func (c *CollectionsGetCall) IfNoneMatch(entityTag string) *CollectionsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CollectionsInsertCall

type CollectionsInsertCall struct {
	// contains filtered or unexported fields
}

func (*CollectionsInsertCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionsInsertCall) Do

Do executes the "androidenterprise.collections.insert" call. Exactly one of *Collection or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Collection.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionsInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CollectionsListCall

type CollectionsListCall struct {
	// contains filtered or unexported fields
}

func (*CollectionsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionsListCall) Do

Do executes the "androidenterprise.collections.list" call. Exactly one of *CollectionsListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CollectionsListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CollectionsListCall) IfNoneMatch

func (c *CollectionsListCall) IfNoneMatch(entityTag string) *CollectionsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CollectionsListResponse

type CollectionsListResponse struct {
	// Collection: An ordered collection of products which can be made
	// visible on the Google Play Store to a selected group of users.
	Collection []*Collection `json:"collection,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#collectionsListResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Collection") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

CollectionsListResponse: The collection resources for the enterprise.

func (*CollectionsListResponse) MarshalJSON

func (s *CollectionsListResponse) MarshalJSON() ([]byte, error)

type CollectionsPatchCall

type CollectionsPatchCall struct {
	// contains filtered or unexported fields
}

func (*CollectionsPatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionsPatchCall) Do

Do executes the "androidenterprise.collections.patch" call. Exactly one of *Collection or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Collection.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionsPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CollectionsService

type CollectionsService struct {
	// contains filtered or unexported fields
}

func NewCollectionsService

func NewCollectionsService(s *Service) *CollectionsService

func (*CollectionsService) Delete

func (r *CollectionsService) Delete(enterpriseId string, collectionId string) *CollectionsDeleteCall

Delete: Deletes a collection.

func (*CollectionsService) Get

func (r *CollectionsService) Get(enterpriseId string, collectionId string) *CollectionsGetCall

Get: Retrieves the details of a collection.

func (*CollectionsService) Insert

func (r *CollectionsService) Insert(enterpriseId string, collection *Collection) *CollectionsInsertCall

Insert: Creates a new collection.

func (*CollectionsService) List

func (r *CollectionsService) List(enterpriseId string) *CollectionsListCall

List: Retrieves the IDs of all the collections for an enterprise.

func (*CollectionsService) Patch

func (r *CollectionsService) Patch(enterpriseId string, collectionId string, collection *Collection) *CollectionsPatchCall

Patch: Updates a collection. This method supports patch semantics.

func (*CollectionsService) Update

func (r *CollectionsService) Update(enterpriseId string, collectionId string, collection *Collection) *CollectionsUpdateCall

Update: Updates a collection.

type CollectionsUpdateCall

type CollectionsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*CollectionsUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionsUpdateCall) Do

Do executes the "androidenterprise.collections.update" call. Exactly one of *Collection or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Collection.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CollectionviewersDeleteCall

type CollectionviewersDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CollectionviewersDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionviewersDeleteCall) Do

Do executes the "androidenterprise.collectionviewers.delete" call.

func (*CollectionviewersDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CollectionviewersGetCall

type CollectionviewersGetCall struct {
	// contains filtered or unexported fields
}

func (*CollectionviewersGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionviewersGetCall) Do

func (c *CollectionviewersGetCall) Do() (*User, error)

Do executes the "androidenterprise.collectionviewers.get" call. Exactly one of *User or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *User.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionviewersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CollectionviewersGetCall) IfNoneMatch

func (c *CollectionviewersGetCall) IfNoneMatch(entityTag string) *CollectionviewersGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CollectionviewersListCall

type CollectionviewersListCall struct {
	// contains filtered or unexported fields
}

func (*CollectionviewersListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionviewersListCall) Do

Do executes the "androidenterprise.collectionviewers.list" call. Exactly one of *CollectionViewersListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CollectionViewersListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionviewersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CollectionviewersListCall) IfNoneMatch

func (c *CollectionviewersListCall) IfNoneMatch(entityTag string) *CollectionviewersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CollectionviewersPatchCall

type CollectionviewersPatchCall struct {
	// contains filtered or unexported fields
}

func (*CollectionviewersPatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionviewersPatchCall) Do

Do executes the "androidenterprise.collectionviewers.patch" call. Exactly one of *User or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *User.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionviewersPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CollectionviewersService

type CollectionviewersService struct {
	// contains filtered or unexported fields
}

func NewCollectionviewersService

func NewCollectionviewersService(s *Service) *CollectionviewersService

func (*CollectionviewersService) Delete

func (r *CollectionviewersService) Delete(enterpriseId string, collectionId string, userId string) *CollectionviewersDeleteCall

Delete: 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.

func (*CollectionviewersService) Get

func (r *CollectionviewersService) Get(enterpriseId string, collectionId string, userId string) *CollectionviewersGetCall

Get: 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.

func (*CollectionviewersService) List

func (r *CollectionviewersService) List(enterpriseId string, collectionId string) *CollectionviewersListCall

List: 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.

func (*CollectionviewersService) Patch

func (r *CollectionviewersService) Patch(enterpriseId string, collectionId string, userId string, user *User) *CollectionviewersPatchCall

Patch: 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.

func (*CollectionviewersService) Update

func (r *CollectionviewersService) Update(enterpriseId string, collectionId string, userId string, user *User) *CollectionviewersUpdateCall

Update: 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.

type CollectionviewersUpdateCall

type CollectionviewersUpdateCall struct {
	// contains filtered or unexported fields
}

func (*CollectionviewersUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CollectionviewersUpdateCall) Do

Do executes the "androidenterprise.collectionviewers.update" call. Exactly one of *User or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *User.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CollectionviewersUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type Device

type Device struct {
	// AndroidId: The Google Play Services Android ID for the device encoded
	// as a lowercase hex string, e.g. "123456789abcdef0".
	AndroidId string `json:"androidId,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#device".
	Kind string `json:"kind,omitempty"`

	// ManagementType: The mechanism by which this device is managed by the
	// MDM. "managedDevice" means that the MDM's app is a device owner.
	// "managedProfile" means that the MDM's app is the profile owner (and
	// there is a separate personal profile which is not managed).
	// "containerApp" means that the MDM's app is managing the Android for
	// Work container app on the device.
	ManagementType string `json:"managementType,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AndroidId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Device: A device resource represents a mobile device managed by the MDM and belonging to a specific enterprise user.

This collection cannot be modified via the API; it is automatically populated as devices are set up to be managed.

func (*Device) MarshalJSON

func (s *Device) MarshalJSON() ([]byte, error)

type DeviceState

type DeviceState struct {
	// AccountState: The state of the Google account on the device.
	// "enabled" indicates that the Google account on the device can be used
	// to access Google services (including Google Play), while "disabled"
	// means that it cannot. A new device is initially in the "disabled"
	// state.
	AccountState string `json:"accountState,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#deviceState".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AccountState") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

DeviceState: The state of a user's device, as accessed by the getState and setState methods on device resources.

func (*DeviceState) MarshalJSON

func (s *DeviceState) MarshalJSON() ([]byte, error)

type DevicesGetCall

type DevicesGetCall struct {
	// contains filtered or unexported fields
}

func (*DevicesGetCall) Context

func (c *DevicesGetCall) Context(ctx context.Context) *DevicesGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DevicesGetCall) Do

func (c *DevicesGetCall) Do() (*Device, error)

Do executes the "androidenterprise.devices.get" call. Exactly one of *Device or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Device.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DevicesGetCall) Fields

func (c *DevicesGetCall) Fields(s ...googleapi.Field) *DevicesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DevicesGetCall) IfNoneMatch

func (c *DevicesGetCall) IfNoneMatch(entityTag string) *DevicesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type DevicesGetStateCall

type DevicesGetStateCall struct {
	// contains filtered or unexported fields
}

func (*DevicesGetStateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DevicesGetStateCall) Do

Do executes the "androidenterprise.devices.getState" call. Exactly one of *DeviceState or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *DeviceState.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DevicesGetStateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DevicesGetStateCall) IfNoneMatch

func (c *DevicesGetStateCall) IfNoneMatch(entityTag string) *DevicesGetStateCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type DevicesListCall

type DevicesListCall struct {
	// contains filtered or unexported fields
}

func (*DevicesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DevicesListCall) Do

Do executes the "androidenterprise.devices.list" call. Exactly one of *DevicesListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *DevicesListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DevicesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DevicesListCall) IfNoneMatch

func (c *DevicesListCall) IfNoneMatch(entityTag string) *DevicesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type DevicesListResponse

type DevicesListResponse struct {
	// Device: A managed device.
	Device []*Device `json:"device,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#devicesListResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Device") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

DevicesListResponse: The device resources for the user.

func (*DevicesListResponse) MarshalJSON

func (s *DevicesListResponse) MarshalJSON() ([]byte, error)

type DevicesService

type DevicesService struct {
	// contains filtered or unexported fields
}

func NewDevicesService

func NewDevicesService(s *Service) *DevicesService

func (*DevicesService) Get

func (r *DevicesService) Get(enterpriseId string, userId string, deviceId string) *DevicesGetCall

Get: Retrieves the details of a device.

func (*DevicesService) GetState

func (r *DevicesService) GetState(enterpriseId string, userId string, deviceId string) *DevicesGetStateCall

GetState: Retrieves whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services.

func (*DevicesService) List

func (r *DevicesService) List(enterpriseId string, userId string) *DevicesListCall

List: Retrieves the IDs of all of a user's devices.

func (*DevicesService) SetState

func (r *DevicesService) SetState(enterpriseId string, userId string, deviceId string, devicestate *DeviceState) *DevicesSetStateCall

SetState: Sets whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services.

type DevicesSetStateCall

type DevicesSetStateCall struct {
	// contains filtered or unexported fields
}

func (*DevicesSetStateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DevicesSetStateCall) Do

Do executes the "androidenterprise.devices.setState" call. Exactly one of *DeviceState or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *DeviceState.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DevicesSetStateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type Enterprise

type Enterprise struct {
	// Id: The unique ID for the enterprise.
	Id string `json:"id,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#enterprise".
	Kind string `json:"kind,omitempty"`

	// Name: The name of the enterprise, e.g. "Example Inc".
	Name string `json:"name,omitempty"`

	// PrimaryDomain: The enterprise's primary domain, e.g. "example.com".
	PrimaryDomain string `json:"primaryDomain,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Enterprise: An enterprise resource represents a binding between an organisation and their MDM.

To create an enterprise, an admin of the enterprise must first go through a Play for Work sign-up flow. At the end of this the admin will be presented with a token (a short opaque alphanumeric string). They must then present this to the MDM, who then supplies it to the enroll method. Until this is done the MDM will not have any access to the enterprise.

After calling enroll the MDM should call setAccount to specify the service account that will be allowed to act on behalf of the enterprise, which will be required for access to the enterprise's data through this API. Only one call of setAccount is allowed for a given enterprise; the only way to change the account later is to unenroll the enterprise and enroll it again (obtaining a new token).

The MDM can unenroll an enterprise in order to sever the binding between them. Re-enrolling an enterprise is possible, but requires a new token to be retrieved. Enterprises.unenroll requires the MDM's credentials (as enroll does), not the enterprise's. Enterprises.unenroll can only be used for enterprises that were previously enrolled with the enroll call. Any enterprises that were enrolled using the (deprecated) Enterprises.insert call must be unenrolled with Enterprises.delete and can then be re-enrolled using the Enterprises.enroll call.

The ID for an enterprise is an opaque string. It is returned by insert and enroll and can also be retrieved if the enterprise's primary domain is known using the list method.

func (*Enterprise) MarshalJSON

func (s *Enterprise) MarshalJSON() ([]byte, error)

type EnterpriseAccount

type EnterpriseAccount struct {
	// AccountEmail: The email address of the service account.
	AccountEmail string `json:"accountEmail,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#enterpriseAccount".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AccountEmail") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

EnterpriseAccount: A service account that can be used to authenticate as the enterprise to API calls that require such authentication.

func (*EnterpriseAccount) MarshalJSON

func (s *EnterpriseAccount) MarshalJSON() ([]byte, error)

type EnterprisesDeleteCall

type EnterprisesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesDeleteCall) Do

func (c *EnterprisesDeleteCall) Do() error

Do executes the "androidenterprise.enterprises.delete" call.

func (*EnterprisesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type EnterprisesEnrollCall

type EnterprisesEnrollCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesEnrollCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesEnrollCall) Do

Do executes the "androidenterprise.enterprises.enroll" call. Exactly one of *Enterprise or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Enterprise.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EnterprisesEnrollCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type EnterprisesGetCall

type EnterprisesGetCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesGetCall) Do

func (c *EnterprisesGetCall) Do() (*Enterprise, error)

Do executes the "androidenterprise.enterprises.get" call. Exactly one of *Enterprise or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Enterprise.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EnterprisesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*EnterprisesGetCall) IfNoneMatch

func (c *EnterprisesGetCall) IfNoneMatch(entityTag string) *EnterprisesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type EnterprisesInsertCall

type EnterprisesInsertCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesInsertCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesInsertCall) Do

Do executes the "androidenterprise.enterprises.insert" call. Exactly one of *Enterprise or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Enterprise.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EnterprisesInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type EnterprisesListCall

type EnterprisesListCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesListCall) Do

Do executes the "androidenterprise.enterprises.list" call. Exactly one of *EnterprisesListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *EnterprisesListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EnterprisesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*EnterprisesListCall) IfNoneMatch

func (c *EnterprisesListCall) IfNoneMatch(entityTag string) *EnterprisesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type EnterprisesListResponse

type EnterprisesListResponse struct {
	// Enterprise: An enterprise.
	Enterprise []*Enterprise `json:"enterprise,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#enterprisesListResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Enterprise") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

EnterprisesListResponse: The matching enterprise resources.

func (*EnterprisesListResponse) MarshalJSON

func (s *EnterprisesListResponse) MarshalJSON() ([]byte, error)

type EnterprisesSendTestPushNotificationCall

type EnterprisesSendTestPushNotificationCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesSendTestPushNotificationCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesSendTestPushNotificationCall) Do

Do executes the "androidenterprise.enterprises.sendTestPushNotification" call. Exactly one of *EnterprisesSendTestPushNotificationResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *EnterprisesSendTestPushNotificationResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EnterprisesSendTestPushNotificationCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type EnterprisesSendTestPushNotificationResponse

type EnterprisesSendTestPushNotificationResponse struct {
	// MessageId: The message ID of the test push notification that was
	// sent.
	MessageId string `json:"messageId,omitempty"`

	// TopicName: The name of the Cloud Pub/Sub topic to which notifications
	// for this enterprise's enrolled account will be sent.
	TopicName string `json:"topicName,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "MessageId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*EnterprisesSendTestPushNotificationResponse) MarshalJSON

type EnterprisesService

type EnterprisesService struct {
	// contains filtered or unexported fields
}

func NewEnterprisesService

func NewEnterprisesService(s *Service) *EnterprisesService

func (*EnterprisesService) Delete

func (r *EnterprisesService) Delete(enterpriseId string) *EnterprisesDeleteCall

Delete: Deletes the binding between the MDM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call.

func (*EnterprisesService) Enroll

func (r *EnterprisesService) Enroll(token string, enterprise *Enterprise) *EnterprisesEnrollCall

Enroll: Enrolls an enterprise with the calling MDM.

func (*EnterprisesService) Get

func (r *EnterprisesService) Get(enterpriseId string) *EnterprisesGetCall

Get: Retrieves the name and domain of an enterprise.

func (*EnterprisesService) Insert

func (r *EnterprisesService) Insert(token string, enterprise *Enterprise) *EnterprisesInsertCall

Insert: Establishes the binding between the MDM and an enterprise. This is now deprecated; use enroll instead.

func (*EnterprisesService) List

List: Looks up an enterprise by domain name.

func (*EnterprisesService) SendTestPushNotification

func (r *EnterprisesService) SendTestPushNotification(enterpriseId string) *EnterprisesSendTestPushNotificationCall

SendTestPushNotification: Sends a test push notification to validate the MDM integration with the Google Cloud Pub/Sub service for this enterprise.

func (*EnterprisesService) SetAccount

func (r *EnterprisesService) SetAccount(enterpriseId string, enterpriseaccount *EnterpriseAccount) *EnterprisesSetAccountCall

SetAccount: Set the account that will be used to authenticate to the API as the enterprise.

func (*EnterprisesService) Unenroll

func (r *EnterprisesService) Unenroll(enterpriseId string) *EnterprisesUnenrollCall

Unenroll: Unenrolls an enterprise from the calling MDM.

type EnterprisesSetAccountCall

type EnterprisesSetAccountCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesSetAccountCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesSetAccountCall) Do

Do executes the "androidenterprise.enterprises.setAccount" call. Exactly one of *EnterpriseAccount or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *EnterpriseAccount.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EnterprisesSetAccountCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type EnterprisesUnenrollCall

type EnterprisesUnenrollCall struct {
	// contains filtered or unexported fields
}

func (*EnterprisesUnenrollCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EnterprisesUnenrollCall) Do

Do executes the "androidenterprise.enterprises.unenroll" call.

func (*EnterprisesUnenrollCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type Entitlement

type Entitlement struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#entitlement".
	Kind string `json:"kind,omitempty"`

	// ProductId: The ID of the product that the entitlement is for, e.g.
	// "app:com.google.android.gm".
	ProductId string `json:"productId,omitempty"`

	// Reason: The reason for the entitlement, e.g. "free" for free apps.
	// This is temporary, it will be replaced by the acquisition kind field
	// of group licenses.
	Reason string `json:"reason,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Entitlement: The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.

It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the MDM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.

Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.

The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.

Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.

func (*Entitlement) MarshalJSON

func (s *Entitlement) MarshalJSON() ([]byte, error)

type EntitlementsDeleteCall

type EntitlementsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*EntitlementsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EntitlementsDeleteCall) Do

func (c *EntitlementsDeleteCall) Do() error

Do executes the "androidenterprise.entitlements.delete" call.

func (*EntitlementsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type EntitlementsGetCall

type EntitlementsGetCall struct {
	// contains filtered or unexported fields
}

func (*EntitlementsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EntitlementsGetCall) Do

Do executes the "androidenterprise.entitlements.get" call. Exactly one of *Entitlement or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Entitlement.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EntitlementsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*EntitlementsGetCall) IfNoneMatch

func (c *EntitlementsGetCall) IfNoneMatch(entityTag string) *EntitlementsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type EntitlementsListCall

type EntitlementsListCall struct {
	// contains filtered or unexported fields
}

func (*EntitlementsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EntitlementsListCall) Do

Do executes the "androidenterprise.entitlements.list" call. Exactly one of *EntitlementsListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *EntitlementsListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EntitlementsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*EntitlementsListCall) IfNoneMatch

func (c *EntitlementsListCall) IfNoneMatch(entityTag string) *EntitlementsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type EntitlementsListResponse

type EntitlementsListResponse struct {
	// Entitlement: An entitlement of a user to a product (e.g. an app). For
	// example, a free app that they have installed, or a paid app that they
	// have been allocated a license to.
	Entitlement []*Entitlement `json:"entitlement,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#entitlementsListResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Entitlement") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

EntitlementsListResponse: The entitlement resources for the user.

func (*EntitlementsListResponse) MarshalJSON

func (s *EntitlementsListResponse) MarshalJSON() ([]byte, error)

type EntitlementsPatchCall

type EntitlementsPatchCall struct {
	// contains filtered or unexported fields
}

func (*EntitlementsPatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EntitlementsPatchCall) Do

Do executes the "androidenterprise.entitlements.patch" call. Exactly one of *Entitlement or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Entitlement.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EntitlementsPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*EntitlementsPatchCall) Install

func (c *EntitlementsPatchCall) Install(install bool) *EntitlementsPatchCall

Install sets the optional parameter "install": Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user.

type EntitlementsService

type EntitlementsService struct {
	// contains filtered or unexported fields
}

func NewEntitlementsService

func NewEntitlementsService(s *Service) *EntitlementsService

func (*EntitlementsService) Delete

func (r *EntitlementsService) Delete(enterpriseId string, userId string, entitlementId string) *EntitlementsDeleteCall

Delete: Removes an entitlement to an app for a user and uninstalls it.

func (*EntitlementsService) Get

func (r *EntitlementsService) Get(enterpriseId string, userId string, entitlementId string) *EntitlementsGetCall

Get: Retrieves details of an entitlement.

func (*EntitlementsService) List

func (r *EntitlementsService) List(enterpriseId string, userId string) *EntitlementsListCall

List: List of all entitlements for the specified user. Only the ID is set.

func (*EntitlementsService) Patch

func (r *EntitlementsService) Patch(enterpriseId string, userId string, entitlementId string, entitlement *Entitlement) *EntitlementsPatchCall

Patch: Adds or updates an entitlement to an app for a user. This method supports patch semantics.

func (*EntitlementsService) Update

func (r *EntitlementsService) Update(enterpriseId string, userId string, entitlementId string, entitlement *Entitlement) *EntitlementsUpdateCall

Update: Adds or updates an entitlement to an app for a user.

type EntitlementsUpdateCall

type EntitlementsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*EntitlementsUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EntitlementsUpdateCall) Do

Do executes the "androidenterprise.entitlements.update" call. Exactly one of *Entitlement or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Entitlement.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EntitlementsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*EntitlementsUpdateCall) Install

func (c *EntitlementsUpdateCall) Install(install bool) *EntitlementsUpdateCall

Install sets the optional parameter "install": Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user.

type GroupLicense

type GroupLicense struct {
	// AcquisitionKind: How this group license was acquired. "bulkPurchase"
	// means that this group license object was created because the
	// enterprise purchased licenses for this product; this is "free"
	// otherwise (for free products).
	AcquisitionKind string `json:"acquisitionKind,omitempty"`

	// Approval: Whether the product to which this group license relates is
	// currently approved by the enterprise, as either "approved" or
	// "unapproved". Products are approved when a group license is first
	// created, but this approval may be revoked by an enterprise admin via
	// Google Play. Unapproved products will not be visible to end users in
	// collections and new entitlements to them should not normally be
	// created.
	Approval string `json:"approval,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#groupLicense".
	Kind string `json:"kind,omitempty"`

	// NumProvisioned: The total number of provisioned licenses for this
	// product. Returned by read operations, but ignored in write
	// operations.
	NumProvisioned int64 `json:"numProvisioned,omitempty"`

	// NumPurchased: The number of purchased licenses (possibly in multiple
	// purchases). If this field is omitted then there is no limit on the
	// number of licenses that can be provisioned (e.g. if the acquisition
	// kind is "free").
	NumPurchased int64 `json:"numPurchased,omitempty"`

	// ProductId: The ID of the product that the license is for, e.g.
	// "app:com.google.android.gm".
	ProductId string `json:"productId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AcquisitionKind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

GroupLicense: A group license object indicates a product that an enterprise admin has approved for use in the enterprise. The product may be free or paid. For free products, a group license object is created in these cases: if the enterprise admin approves a product in Google Play, if the product is added to a collection, or if an entitlement for the product is created for a user via the API. For paid products, a group license object is only created as part of the first bulk purchase of that product in Google Play by the enterprise admin.

The API can be used to query group licenses; the available information includes the total number of licenses purchased (for paid products) and the total number of licenses that have been provisioned, that is, the total number of user entitlements in existence for the product.

Group license objects are never deleted. If, for example, a free app is added to a collection and then removed, the group license will remain, allowing the enterprise admin to keep track of any remaining entitlements. An enterprise admin may indicate they are no longer interested in the group license by marking it as unapproved in Google Play.

func (*GroupLicense) MarshalJSON

func (s *GroupLicense) MarshalJSON() ([]byte, error)

type GroupLicenseUsersListResponse

type GroupLicenseUsersListResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#groupLicenseUsersListResponse".
	Kind string `json:"kind,omitempty"`

	// User: A user of an enterprise.
	User []*User `json:"user,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

GroupLicenseUsersListResponse: The user resources for the group license.

func (*GroupLicenseUsersListResponse) MarshalJSON

func (s *GroupLicenseUsersListResponse) MarshalJSON() ([]byte, error)

type GroupLicensesListResponse

type GroupLicensesListResponse struct {
	// GroupLicense: A group license for a product approved for use in the
	// enterprise.
	GroupLicense []*GroupLicense `json:"groupLicense,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#groupLicensesListResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "GroupLicense") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

GroupLicensesListResponse: The grouplicense resources for the enterprise.

func (*GroupLicensesListResponse) MarshalJSON

func (s *GroupLicensesListResponse) MarshalJSON() ([]byte, error)

type GrouplicensesGetCall

type GrouplicensesGetCall struct {
	// contains filtered or unexported fields
}

func (*GrouplicensesGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GrouplicensesGetCall) Do

Do executes the "androidenterprise.grouplicenses.get" call. Exactly one of *GroupLicense or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GroupLicense.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GrouplicensesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GrouplicensesGetCall) IfNoneMatch

func (c *GrouplicensesGetCall) IfNoneMatch(entityTag string) *GrouplicensesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type GrouplicensesListCall

type GrouplicensesListCall struct {
	// contains filtered or unexported fields
}

func (*GrouplicensesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GrouplicensesListCall) Do

Do executes the "androidenterprise.grouplicenses.list" call. Exactly one of *GroupLicensesListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GroupLicensesListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GrouplicensesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GrouplicensesListCall) IfNoneMatch

func (c *GrouplicensesListCall) IfNoneMatch(entityTag string) *GrouplicensesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type GrouplicensesService

type GrouplicensesService struct {
	// contains filtered or unexported fields
}

func NewGrouplicensesService

func NewGrouplicensesService(s *Service) *GrouplicensesService

func (*GrouplicensesService) Get

func (r *GrouplicensesService) Get(enterpriseId string, groupLicenseId string) *GrouplicensesGetCall

Get: Retrieves details of an enterprise's group license for a product.

func (*GrouplicensesService) List

func (r *GrouplicensesService) List(enterpriseId string) *GrouplicensesListCall

List: Retrieves IDs of all products for which the enterprise has a group license.

type GrouplicenseusersListCall

type GrouplicenseusersListCall struct {
	// contains filtered or unexported fields
}

func (*GrouplicenseusersListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GrouplicenseusersListCall) Do

Do executes the "androidenterprise.grouplicenseusers.list" call. Exactly one of *GroupLicenseUsersListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GroupLicenseUsersListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GrouplicenseusersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GrouplicenseusersListCall) IfNoneMatch

func (c *GrouplicenseusersListCall) IfNoneMatch(entityTag string) *GrouplicenseusersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type GrouplicenseusersService

type GrouplicenseusersService struct {
	// contains filtered or unexported fields
}

func NewGrouplicenseusersService

func NewGrouplicenseusersService(s *Service) *GrouplicenseusersService

func (*GrouplicenseusersService) List

func (r *GrouplicenseusersService) List(enterpriseId string, groupLicenseId string) *GrouplicenseusersListCall

List: Retrieves the IDs of the users who have been granted entitlements under the license.

type Install

type Install struct {
	// InstallState: Install state. The state "installPending" means that an
	// install request has recently been made and download to the device is
	// in progress. The state "installed" means that the app has been
	// installed. This field is read-only.
	InstallState string `json:"installState,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#install".
	Kind string `json:"kind,omitempty"`

	// ProductId: The ID of the product that the install is for, e.g.
	// "app:com.google.android.gm".
	ProductId string `json:"productId,omitempty"`

	// VersionCode: The version of the installed product. Guaranteed to be
	// set only if the install state is "installed".
	VersionCode int64 `json:"versionCode,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "InstallState") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Install: The existence of an install resource indicates that an app is installed on a particular device (or that an install is pending).

The API can be used to create an install resource using the update method. This triggers the actual install of the app on the device. If the user does not already have an entitlement for the app then an attempt is made to create one. If this fails (e.g. because the app is not free and there is no available license) then the creation of the install fails.

The API can also be used to update an installed app. If the update method is used on an existing install then the app will be updated to the latest available version.

Note that it is not possible to force the installation of a specific version of an app; the version code is read-only.

If a user installs an app themselves (as permitted by the enterprise), then again an install resource and possibly an entitlement resource are automatically created.

The API can also be used to delete an install resource, which triggers the removal of the app from the device. Note that deleting an install does not automatically remove the corresponding entitlement, even if there are no remaining installs. The install resource will also be deleted if the user uninstalls the app themselves.

func (*Install) MarshalJSON

func (s *Install) MarshalJSON() ([]byte, error)

type InstallsDeleteCall

type InstallsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*InstallsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstallsDeleteCall) Do

func (c *InstallsDeleteCall) Do() error

Do executes the "androidenterprise.installs.delete" call.

func (*InstallsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type InstallsGetCall

type InstallsGetCall struct {
	// contains filtered or unexported fields
}

func (*InstallsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstallsGetCall) Do

func (c *InstallsGetCall) Do() (*Install, error)

Do executes the "androidenterprise.installs.get" call. Exactly one of *Install or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Install.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstallsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstallsGetCall) IfNoneMatch

func (c *InstallsGetCall) IfNoneMatch(entityTag string) *InstallsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type InstallsListCall

type InstallsListCall struct {
	// contains filtered or unexported fields
}

func (*InstallsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstallsListCall) Do

Do executes the "androidenterprise.installs.list" call. Exactly one of *InstallsListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *InstallsListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstallsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InstallsListCall) IfNoneMatch

func (c *InstallsListCall) IfNoneMatch(entityTag string) *InstallsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type InstallsListResponse

type InstallsListResponse struct {
	// Install: An installation of an app for a user on a specific device.
	// The existence of an install implies that the user must have an
	// entitlement to the app.
	Install []*Install `json:"install,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#installsListResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Install") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

InstallsListResponse: The install resources for the device.

func (*InstallsListResponse) MarshalJSON

func (s *InstallsListResponse) MarshalJSON() ([]byte, error)

type InstallsPatchCall

type InstallsPatchCall struct {
	// contains filtered or unexported fields
}

func (*InstallsPatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstallsPatchCall) Do

func (c *InstallsPatchCall) Do() (*Install, error)

Do executes the "androidenterprise.installs.patch" call. Exactly one of *Install or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Install.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstallsPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type InstallsService

type InstallsService struct {
	// contains filtered or unexported fields
}

func NewInstallsService

func NewInstallsService(s *Service) *InstallsService

func (*InstallsService) Delete

func (r *InstallsService) Delete(enterpriseId string, userId string, deviceId string, installId string) *InstallsDeleteCall

Delete: Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed.

func (*InstallsService) Get

func (r *InstallsService) Get(enterpriseId string, userId string, deviceId string, installId string) *InstallsGetCall

Get: Retrieves details of an installation of an app on a device.

func (*InstallsService) List

func (r *InstallsService) List(enterpriseId string, userId string, deviceId string) *InstallsListCall

List: Retrieves the details of all apps installed on the specified device.

func (*InstallsService) Patch

func (r *InstallsService) Patch(enterpriseId string, userId string, deviceId string, installId string, install *Install) *InstallsPatchCall

Patch: Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics.

func (*InstallsService) Update

func (r *InstallsService) Update(enterpriseId string, userId string, deviceId string, installId string, install *Install) *InstallsUpdateCall

Update: Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary.

type InstallsUpdateCall

type InstallsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*InstallsUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InstallsUpdateCall) Do

func (c *InstallsUpdateCall) Do() (*Install, error)

Do executes the "androidenterprise.installs.update" call. Exactly one of *Install or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Install.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InstallsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type Permission

type Permission struct {
	// Description: A longer description of the permissions giving more
	// details of what it affects.
	Description string `json:"description,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#permission".
	Kind string `json:"kind,omitempty"`

	// Name: The name of the permission.
	Name string `json:"name,omitempty"`

	// PermissionId: An opaque string uniquely identifying the permission.
	PermissionId string `json:"permissionId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Permission: A permission represents some extra capability, to be granted to an Android app, which requires explicit consent. An enterprise admin must consent to these permissions on behalf of their users before an entitlement for the app can be created.

The permissions collection is read-only. The information provided for each permission (localized name and description) is intended to be used in the MDM user interface when obtaining consent from the enterprise.

func (*Permission) MarshalJSON

func (s *Permission) MarshalJSON() ([]byte, error)

type PermissionsGetCall

type PermissionsGetCall struct {
	// contains filtered or unexported fields
}

func (*PermissionsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PermissionsGetCall) Do

func (c *PermissionsGetCall) Do() (*Permission, error)

Do executes the "androidenterprise.permissions.get" call. Exactly one of *Permission or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Permission.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PermissionsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PermissionsGetCall) IfNoneMatch

func (c *PermissionsGetCall) IfNoneMatch(entityTag string) *PermissionsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*PermissionsGetCall) Language

func (c *PermissionsGetCall) Language(language string) *PermissionsGetCall

Language sets the optional parameter "language": The BCP47 tag for the user's preferred language (e.g. "en-US", "de")

type PermissionsService

type PermissionsService struct {
	// contains filtered or unexported fields
}

func NewPermissionsService

func NewPermissionsService(s *Service) *PermissionsService

func (*PermissionsService) Get

func (r *PermissionsService) Get(permissionId string) *PermissionsGetCall

Get: Retrieves details of an Android app permission for display to an enterprise admin.

type Product

type Product struct {
	// AppVersion: App versions currently available for this product. The
	// returned list contains only public versions. Alpha and beta versions
	// are not included.
	AppVersion []*AppVersion `json:"appVersion,omitempty"`

	// AuthorName: The name of the author of the product (e.g. the app
	// developer).
	AuthorName string `json:"authorName,omitempty"`

	// DetailsUrl: A link to the (consumer) Google Play details page for the
	// product.
	DetailsUrl string `json:"detailsUrl,omitempty"`

	// DistributionChannel: How and to whom the package is made available.
	// The value publicGoogleHosted means that the package is available
	// through the Play Store and not restricted to a specific enterprise.
	// The value privateGoogleHosted means that the package is a private app
	// (restricted to an enterprise) but hosted by Google. The value
	// privateSelfHosted means that the package is a private app (restricted
	// to an enterprise) and is privately hosted.
	DistributionChannel string `json:"distributionChannel,omitempty"`

	// IconUrl: A link to an image that can be used as an icon for the
	// product.
	IconUrl string `json:"iconUrl,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#product".
	Kind string `json:"kind,omitempty"`

	// ProductId: A string of the form app:<package name>. For example,
	// app:com.google.android.gm represents the Gmail app.
	ProductId string `json:"productId,omitempty"`

	// RequiresContainerApp: Whether this app can only be installed on
	// devices using the Android for Work container app.
	RequiresContainerApp bool `json:"requiresContainerApp,omitempty"`

	// Title: The name of the product.
	Title string `json:"title,omitempty"`

	// WorkDetailsUrl: A link to the Google Play for Work details page for
	// the product, for use by an Enterprise administrator.
	WorkDetailsUrl string `json:"workDetailsUrl,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AppVersion") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Product: A product represents an app in the Google Play Store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.)

The information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an MDM user interface.

func (*Product) MarshalJSON

func (s *Product) MarshalJSON() ([]byte, error)

type ProductPermission

type ProductPermission struct {
	// PermissionId: An opaque string uniquely identifying the permission.
	PermissionId string `json:"permissionId,omitempty"`

	// State: Whether the permission has been accepted or not.
	State string `json:"state,omitempty"`

	// ForceSendFields is a list of field names (e.g. "PermissionId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ProductPermission: A product permissions resource represents the set of permissions required by a specific app and whether or not they have been accepted by an enterprise admin.

The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted.

func (*ProductPermission) MarshalJSON

func (s *ProductPermission) MarshalJSON() ([]byte, error)

type ProductPermissions

type ProductPermissions struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#productPermissions".
	Kind string `json:"kind,omitempty"`

	// Permission: The permissions required by the app.
	Permission []*ProductPermission `json:"permission,omitempty"`

	// ProductId: The ID of the app that the permissions relate to, e.g.
	// "app:com.google.android.gm".
	ProductId string `json:"productId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ProductPermissions: Information about the permissions required by a specific app and whether they have been accepted by the enterprise.

func (*ProductPermissions) MarshalJSON

func (s *ProductPermissions) MarshalJSON() ([]byte, error)

type ProductSet

type ProductSet struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#productSet".
	Kind string `json:"kind,omitempty"`

	// ProductId: The list of product IDs making up the set of products.
	ProductId []string `json:"productId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ProductSet: A set of products.

func (*ProductSet) MarshalJSON

func (s *ProductSet) MarshalJSON() ([]byte, error)

type ProductsApproveCall

type ProductsApproveCall struct {
	// contains filtered or unexported fields
}

func (*ProductsApproveCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProductsApproveCall) Do

func (c *ProductsApproveCall) Do() error

Do executes the "androidenterprise.products.approve" call.

func (*ProductsApproveCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProductsApproveRequest

type ProductsApproveRequest struct {
	// ApprovalUrlInfo: The approval URL that was shown to the user. Only
	// the permissions shown to the user with that URL will be accepted,
	// which may not be the product's entire set of permissions. For
	// example, the URL may only display new permissions from an update
	// after the product was approved, or not include new permissions if the
	// product was updated since the URL was generated.
	ApprovalUrlInfo *ApprovalUrlInfo `json:"approvalUrlInfo,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ApprovalUrlInfo") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*ProductsApproveRequest) MarshalJSON

func (s *ProductsApproveRequest) MarshalJSON() ([]byte, error)

type ProductsGenerateApprovalUrlCall

type ProductsGenerateApprovalUrlCall struct {
	// contains filtered or unexported fields
}

func (*ProductsGenerateApprovalUrlCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProductsGenerateApprovalUrlCall) Do

Do executes the "androidenterprise.products.generateApprovalUrl" call. Exactly one of *ProductsGenerateApprovalUrlResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ProductsGenerateApprovalUrlResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProductsGenerateApprovalUrlCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProductsGenerateApprovalUrlCall) LanguageCode

LanguageCode sets the optional parameter "languageCode": The BCP 47 language code used for permission names and descriptions in the returned iframe, for instance "en-US".

type ProductsGenerateApprovalUrlResponse

type ProductsGenerateApprovalUrlResponse struct {
	// Url: A URL that can be rendered in an iframe to display the
	// permissions (if any) of a product. This URL can be used to approve
	// the product only once and only within 24 hours of being generated,
	// using the Products.approve call. If the product is currently
	// unapproved and has no permissions, this URL will point to an empty
	// page. If the product is currently approved, a URL will only be
	// generated if that product has added permissions since it was last
	// approved, and the URL will only display those new permissions that
	// have not yet been accepted.
	Url string `json:"url,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Url") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*ProductsGenerateApprovalUrlResponse) MarshalJSON

func (s *ProductsGenerateApprovalUrlResponse) MarshalJSON() ([]byte, error)

type ProductsGetAppRestrictionsSchemaCall

type ProductsGetAppRestrictionsSchemaCall struct {
	// contains filtered or unexported fields
}

func (*ProductsGetAppRestrictionsSchemaCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProductsGetAppRestrictionsSchemaCall) Do

Do executes the "androidenterprise.products.getAppRestrictionsSchema" call. Exactly one of *AppRestrictionsSchema or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AppRestrictionsSchema.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProductsGetAppRestrictionsSchemaCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProductsGetAppRestrictionsSchemaCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*ProductsGetAppRestrictionsSchemaCall) Language

Language sets the optional parameter "language": The BCP47 tag for the user's preferred language (e.g. "en-US", "de").

type ProductsGetCall

type ProductsGetCall struct {
	// contains filtered or unexported fields
}

func (*ProductsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProductsGetCall) Do

func (c *ProductsGetCall) Do() (*Product, error)

Do executes the "androidenterprise.products.get" call. Exactly one of *Product or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Product.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProductsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProductsGetCall) IfNoneMatch

func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*ProductsGetCall) Language

func (c *ProductsGetCall) Language(language string) *ProductsGetCall

Language sets the optional parameter "language": The BCP47 tag for the user's preferred language (e.g. "en-US", "de").

type ProductsGetPermissionsCall

type ProductsGetPermissionsCall struct {
	// contains filtered or unexported fields
}

func (*ProductsGetPermissionsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProductsGetPermissionsCall) Do

Do executes the "androidenterprise.products.getPermissions" call. Exactly one of *ProductPermissions or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ProductPermissions.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProductsGetPermissionsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProductsGetPermissionsCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type ProductsService

type ProductsService struct {
	// contains filtered or unexported fields
}

func NewProductsService

func NewProductsService(s *Service) *ProductsService

func (*ProductsService) Approve

func (r *ProductsService) Approve(enterpriseId string, productId string, productsapproverequest *ProductsApproveRequest) *ProductsApproveCall

Approve: Approves the specified product (and the relevant app permissions, if any).

func (*ProductsService) GenerateApprovalUrl

func (r *ProductsService) GenerateApprovalUrl(enterpriseId string, productId string) *ProductsGenerateApprovalUrlCall

GenerateApprovalUrl: Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product.

Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day.

func (*ProductsService) Get

func (r *ProductsService) Get(enterpriseId string, productId string) *ProductsGetCall

Get: Retrieves details of a product for display to an enterprise admin.

func (*ProductsService) GetAppRestrictionsSchema

func (r *ProductsService) GetAppRestrictionsSchema(enterpriseId string, productId string) *ProductsGetAppRestrictionsSchemaCall

GetAppRestrictionsSchema: Retrieves the schema defining app restrictions configurable for this product. All products have a schema, but this may be empty if no app restrictions are defined.

func (*ProductsService) GetPermissions

func (r *ProductsService) GetPermissions(enterpriseId string, productId string) *ProductsGetPermissionsCall

GetPermissions: Retrieves the Android app permissions required by this app.

func (*ProductsService) UpdatePermissions

func (r *ProductsService) UpdatePermissions(enterpriseId string, productId string, productpermissions *ProductPermissions) *ProductsUpdatePermissionsCall

UpdatePermissions: Updates the set of Android app permissions for this app that have been accepted by the enterprise.

type ProductsUpdatePermissionsCall

type ProductsUpdatePermissionsCall struct {
	// contains filtered or unexported fields
}

func (*ProductsUpdatePermissionsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProductsUpdatePermissionsCall) Do

Do executes the "androidenterprise.products.updatePermissions" call. Exactly one of *ProductPermissions or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ProductPermissions.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProductsUpdatePermissionsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Collections *CollectionsService

	Collectionviewers *CollectionviewersService

	Devices *DevicesService

	Enterprises *EnterprisesService

	Entitlements *EntitlementsService

	Grouplicenses *GrouplicensesService

	Grouplicenseusers *GrouplicenseusersService

	Installs *InstallsService

	Permissions *PermissionsService

	Products *ProductsService

	Users *UsersService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type User

type User struct {
	// Id: The unique ID for the user.
	Id string `json:"id,omitempty"`

	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#user".
	Kind string `json:"kind,omitempty"`

	// PrimaryEmail: The user's primary email, e.g. "jsmith@example.com".
	PrimaryEmail string `json:"primaryEmail,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

User: A user resource represents an individual user within the enterprise's domain.

Note that each user is associated with a Google account based on the user's corporate email address (which must be in one of the enterprise's domains). As part of installing an MDM app to manage a device the Google account must be provisioned to the device, and so the user resource must be created before that. This can be done using the Google Admin SDK Directory API.

The ID for a user is an opaque string. It can be retrieved using the list method queried by the user's primary email address.

func (*User) MarshalJSON

func (s *User) MarshalJSON() ([]byte, error)

type UserToken

type UserToken struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#userToken".
	Kind string `json:"kind,omitempty"`

	// Token: The token (activation code) to be entered by the user. This
	// consists of a sequence of decimal digits. Note that the leading digit
	// may be 0.
	Token string `json:"token,omitempty"`

	// UserId: The unique ID for the user.
	UserId string `json:"userId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

UserToken: A UserToken is used by a user when setting up a managed device or profile with their work account on a device. When the user enters their email address and token (activation code) the appropriate MDM app can be automatically downloaded.

func (*UserToken) MarshalJSON

func (s *UserToken) MarshalJSON() ([]byte, error)

type UsersGenerateTokenCall

type UsersGenerateTokenCall struct {
	// contains filtered or unexported fields
}

func (*UsersGenerateTokenCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersGenerateTokenCall) Do

Do executes the "androidenterprise.users.generateToken" call. Exactly one of *UserToken or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UserToken.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersGenerateTokenCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersGetAvailableProductSetCall

type UsersGetAvailableProductSetCall struct {
	// contains filtered or unexported fields
}

func (*UsersGetAvailableProductSetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersGetAvailableProductSetCall) Do

Do executes the "androidenterprise.users.getAvailableProductSet" call. Exactly one of *ProductSet or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ProductSet.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersGetAvailableProductSetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersGetAvailableProductSetCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type UsersGetCall

type UsersGetCall struct {
	// contains filtered or unexported fields
}

func (*UsersGetCall) Context

func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersGetCall) Do

func (c *UsersGetCall) Do() (*User, error)

Do executes the "androidenterprise.users.get" call. Exactly one of *User or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *User.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersGetCall) Fields

func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersGetCall) IfNoneMatch

func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type UsersListCall

type UsersListCall struct {
	// contains filtered or unexported fields
}

func (*UsersListCall) Context

func (c *UsersListCall) Context(ctx context.Context) *UsersListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersListCall) Do

Do executes the "androidenterprise.users.list" call. Exactly one of *UsersListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UsersListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersListCall) Fields

func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersListCall) IfNoneMatch

func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type UsersListResponse

type UsersListResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "androidenterprise#usersListResponse".
	Kind string `json:"kind,omitempty"`

	// User: A user of an enterprise.
	User []*User `json:"user,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

UsersListResponse: The matching user resources.

func (*UsersListResponse) MarshalJSON

func (s *UsersListResponse) MarshalJSON() ([]byte, error)

type UsersRevokeTokenCall

type UsersRevokeTokenCall struct {
	// contains filtered or unexported fields
}

func (*UsersRevokeTokenCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersRevokeTokenCall) Do

func (c *UsersRevokeTokenCall) Do() error

Do executes the "androidenterprise.users.revokeToken" call.

func (*UsersRevokeTokenCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersService

type UsersService struct {
	// contains filtered or unexported fields
}

func NewUsersService

func NewUsersService(s *Service) *UsersService

func (*UsersService) GenerateToken

func (r *UsersService) GenerateToken(enterpriseId string, userId string) *UsersGenerateTokenCall

GenerateToken: Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token.

func (*UsersService) Get

func (r *UsersService) Get(enterpriseId string, userId string) *UsersGetCall

Get: Retrieves a user's details.

func (*UsersService) GetAvailableProductSet

func (r *UsersService) GetAvailableProductSet(enterpriseId string, userId string) *UsersGetAvailableProductSetCall

GetAvailableProductSet: Retrieves the set of products a user is entitled to access.

func (*UsersService) List

func (r *UsersService) List(enterpriseId string, email string) *UsersListCall

List: Looks up a user by email address.

func (*UsersService) RevokeToken

func (r *UsersService) RevokeToken(enterpriseId string, userId string) *UsersRevokeTokenCall

RevokeToken: Revokes a previously generated token (activation code) for the user.

func (*UsersService) SetAvailableProductSet

func (r *UsersService) SetAvailableProductSet(enterpriseId string, userId string, productset *ProductSet) *UsersSetAvailableProductSetCall

SetAvailableProductSet: Modifies the set of products a user is entitled to access.

type UsersSetAvailableProductSetCall

type UsersSetAvailableProductSetCall struct {
	// contains filtered or unexported fields
}

func (*UsersSetAvailableProductSetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UsersSetAvailableProductSetCall) Do

Do executes the "androidenterprise.users.setAvailableProductSet" call. Exactly one of *ProductSet or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ProductSet.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersSetAvailableProductSetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL