chromemanagement

package
v0.48.1-0...-67a0a95 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package chromemanagement provides access to the Chrome Management API.

For product documentation, see: http://developers.google.com/chrome/management/

Creating a client

Usage example:

import "google.golang.org/api/chromemanagement/v1"
...
ctx := context.Background()
chromemanagementService, err := chromemanagement.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

chromemanagementService, err := chromemanagement.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
chromemanagementService, err := chromemanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (
	// See reports about devices and Chrome browsers managed within your
	// organization
	ChromeManagementReportsReadonlyScope = "https://www.googleapis.com/auth/chrome.management.reports.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomersReportsCountChromeVersionsCall

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

func (*CustomersReportsCountChromeVersionsCall) 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 (*CustomersReportsCountChromeVersionsCall) Do

Do executes the "chromemanagement.customers.reports.countChromeVersions" call. Exactly one of *GoogleChromeManagementV1CountChromeVersionsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleChromeManagementV1CountChromeVersionsResponse.ServerResponse.He ader 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 (*CustomersReportsCountChromeVersionsCall) Fields

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

func (*CustomersReportsCountChromeVersionsCall) Filter

Filter sets the optional parameter "filter": Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date

func (*CustomersReportsCountChromeVersionsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*CustomersReportsCountChromeVersionsCall) 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 (*CustomersReportsCountChromeVersionsCall) OrgUnitId

OrgUnitId sets the optional parameter "orgUnitId": The ID of the organizational unit.

func (*CustomersReportsCountChromeVersionsCall) PageSize

PageSize sets the optional parameter "pageSize": Maximum number of results to return. Maximum and default are 100.

func (*CustomersReportsCountChromeVersionsCall) PageToken

PageToken sets the optional parameter "pageToken": Token to specify the page of the request to be returned.

func (*CustomersReportsCountChromeVersionsCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CustomersReportsCountInstalledAppsCall

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

func (*CustomersReportsCountInstalledAppsCall) 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 (*CustomersReportsCountInstalledAppsCall) Do

Do executes the "chromemanagement.customers.reports.countInstalledApps" call. Exactly one of *GoogleChromeManagementV1CountInstalledAppsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleChromeManagementV1CountInstalledAppsResponse.ServerResponse.Hea der 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 (*CustomersReportsCountInstalledAppsCall) Fields

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

func (*CustomersReportsCountInstalledAppsCall) Filter

Filter sets the optional parameter "filter": Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * app_name * app_type * install_type * number_of_permissions * total_install_count * latest_profile_active_date * permission_name

func (*CustomersReportsCountInstalledAppsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*CustomersReportsCountInstalledAppsCall) 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 (*CustomersReportsCountInstalledAppsCall) OrderBy

OrderBy sets the optional parameter "orderBy": Field used to order results. Supported order by fields: * app_name * app_type * install_type * number_of_permissions * total_install_count

func (*CustomersReportsCountInstalledAppsCall) OrgUnitId

OrgUnitId sets the optional parameter "orgUnitId": The ID of the organizational unit.

func (*CustomersReportsCountInstalledAppsCall) PageSize

PageSize sets the optional parameter "pageSize": Maximum number of results to return. Maximum and default are 100.

func (*CustomersReportsCountInstalledAppsCall) PageToken

PageToken sets the optional parameter "pageToken": Token to specify the page of the request to be returned.

func (*CustomersReportsCountInstalledAppsCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CustomersReportsFindInstalledAppDevicesCall

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

func (*CustomersReportsFindInstalledAppDevicesCall) AppId

AppId sets the optional parameter "appId": Unique identifier of the app. For Chrome apps and extensions, the 32-character id (e.g. ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name (e.g. com.evernote).

func (*CustomersReportsFindInstalledAppDevicesCall) AppType

AppType sets the optional parameter "appType": Type of the app.

Possible values:

"APP_TYPE_UNSPECIFIED" - App type not specified.
"EXTENSION" - Chrome extension.
"APP" - Chrome app.
"THEME" - Chrome theme.
"HOSTED_APP" - Chrome hosted app.
"ANDROID_APP" - ARC++ app.

func (*CustomersReportsFindInstalledAppDevicesCall) 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 (*CustomersReportsFindInstalledAppDevicesCall) Do

Do executes the "chromemanagement.customers.reports.findInstalledAppDevices" call. Exactly one of *GoogleChromeManagementV1FindInstalledAppDevicesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleChromeManagementV1FindInstalledAppDevicesResponse.ServerRespons e.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 (*CustomersReportsFindInstalledAppDevicesCall) Fields

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

func (*CustomersReportsFindInstalledAppDevicesCall) Filter

Filter sets the optional parameter "filter": Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date

func (*CustomersReportsFindInstalledAppDevicesCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*CustomersReportsFindInstalledAppDevicesCall) 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 (*CustomersReportsFindInstalledAppDevicesCall) OrderBy

OrderBy sets the optional parameter "orderBy": Field used to order results. Supported order by fields: * machine * device_id

func (*CustomersReportsFindInstalledAppDevicesCall) OrgUnitId

OrgUnitId sets the optional parameter "orgUnitId": The ID of the organizational unit.

func (*CustomersReportsFindInstalledAppDevicesCall) PageSize

PageSize sets the optional parameter "pageSize": Maximum number of results to return. Maximum and default are 100.

func (*CustomersReportsFindInstalledAppDevicesCall) PageToken

PageToken sets the optional parameter "pageToken": Token to specify the page of the request to be returned.

func (*CustomersReportsFindInstalledAppDevicesCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CustomersReportsService

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

func NewCustomersReportsService

func NewCustomersReportsService(s *Service) *CustomersReportsService

func (*CustomersReportsService) CountChromeVersions

CountChromeVersions: Generate report of installed Chrome versions.

  • customer: Customer id or "my_customer" to use the customer associated to the account making the request.

func (*CustomersReportsService) CountInstalledApps

CountInstalledApps: Generate report of app installations.

  • customer: Customer id or "my_customer" to use the customer associated to the account making the request.

func (*CustomersReportsService) FindInstalledAppDevices

func (r *CustomersReportsService) FindInstalledAppDevices(customer string) *CustomersReportsFindInstalledAppDevicesCall

FindInstalledAppDevices: Generate report of devices that have a specified app installed.

  • customer: Customer id or "my_customer" to use the customer associated to the account making the request.

type CustomersService

type CustomersService struct {
	Reports *CustomersReportsService
	// contains filtered or unexported fields
}

func NewCustomersService

func NewCustomersService(s *Service) *CustomersService

type GoogleChromeManagementV1BrowserVersion

type GoogleChromeManagementV1BrowserVersion struct {
	// Channel: Output only. The release channel of the installed browser.
	//
	// Possible values:
	//   "RELEASE_CHANNEL_UNSPECIFIED" - No release channel specified.
	//   "CANARY" - Canary release channel.
	//   "DEV" - Dev release channel.
	//   "BETA" - Beta release channel.
	//   "STABLE" - Stable release channel.
	Channel string `json:"channel,omitempty"`

	// Count: Output only. Count grouped by device_system and major version
	Count int64 `json:"count,omitempty,string"`

	// DeviceOsVersion: Output only. Version of the system-specified
	// operating system.
	DeviceOsVersion string `json:"deviceOsVersion,omitempty"`

	// System: Output only. The device operating system.
	//
	// Possible values:
	//   "DEVICE_SYSTEM_UNSPECIFIED" - No operating system specified.
	//   "SYSTEM_OTHER" - Other operating system.
	//   "SYSTEM_ANDROID" - Android operating system.
	//   "SYSTEM_IOS" - Apple iOS operating system.
	//   "SYSTEM_CROS" - Chrome OS operating system.
	//   "SYSTEM_WINDOWS" - Microsoft Windows operating system.
	//   "SYSTEM_MAC" - Apple macOS operating system.
	//   "SYSTEM_LINUX" - Linux operating system.
	System string `json:"system,omitempty"`

	// Version: Output only. The full version of the installed browser.
	Version string `json:"version,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Channel") 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:"-"`

	// NullFields is a list of field names (e.g. "Channel") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleChromeManagementV1BrowserVersion: Describes a browser version and its install count.

func (*GoogleChromeManagementV1BrowserVersion) MarshalJSON

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

type GoogleChromeManagementV1CountChromeVersionsResponse

type GoogleChromeManagementV1CountChromeVersionsResponse struct {
	// BrowserVersions: List of all browser versions and their install
	// counts.
	BrowserVersions []*GoogleChromeManagementV1BrowserVersion `json:"browserVersions,omitempty"`

	// NextPageToken: Token to specify the next page of the request.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// TotalSize: Total number browser versions matching request.
	TotalSize int64 `json:"totalSize,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "BrowserVersions") 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:"-"`

	// NullFields is a list of field names (e.g. "BrowserVersions") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleChromeManagementV1CountChromeVersionsResponse: Response containing requested browser versions details and counts.

func (*GoogleChromeManagementV1CountChromeVersionsResponse) MarshalJSON

type GoogleChromeManagementV1CountInstalledAppsResponse

type GoogleChromeManagementV1CountInstalledAppsResponse struct {
	// InstalledApps: List of installed apps matching request.
	InstalledApps []*GoogleChromeManagementV1InstalledApp `json:"installedApps,omitempty"`

	// NextPageToken: Token to specify the next page of the request.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// TotalSize: Total number of installed apps matching request.
	TotalSize int64 `json:"totalSize,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "InstalledApps") 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:"-"`

	// NullFields is a list of field names (e.g. "InstalledApps") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleChromeManagementV1CountInstalledAppsResponse: Response containing details of queried installed apps.

func (*GoogleChromeManagementV1CountInstalledAppsResponse) MarshalJSON

type GoogleChromeManagementV1Device

type GoogleChromeManagementV1Device struct {
	// DeviceId: Output only. The ID of the device that reported this Chrome
	// browser information.
	DeviceId string `json:"deviceId,omitempty"`

	// Machine: Output only. The name of the machine within its local
	// network.
	Machine string `json:"machine,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DeviceId") 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:"-"`

	// NullFields is a list of field names (e.g. "DeviceId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleChromeManagementV1Device: Describes a device reporting Chrome browser information.

func (*GoogleChromeManagementV1Device) MarshalJSON

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

type GoogleChromeManagementV1FindInstalledAppDevicesResponse

type GoogleChromeManagementV1FindInstalledAppDevicesResponse struct {
	// Devices: A list of devices which have the app installed. Sorted in
	// ascending alphabetical order on the Device.machine field.
	Devices []*GoogleChromeManagementV1Device `json:"devices,omitempty"`

	// NextPageToken: Token to specify the next page of the request.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// TotalSize: Total number of devices matching request.
	TotalSize int64 `json:"totalSize,omitempty"`

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

	// ForceSendFields is a list of field names (e.g. "Devices") 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:"-"`

	// NullFields is a list of field names (e.g. "Devices") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleChromeManagementV1FindInstalledAppDevicesResponse: Response containing a list of devices with queried app installed.

func (*GoogleChromeManagementV1FindInstalledAppDevicesResponse) MarshalJSON

type GoogleChromeManagementV1InstalledApp

type GoogleChromeManagementV1InstalledApp struct {
	// AppId: Output only. Unique identifier of the app. For Chrome apps and
	// extensions, the 32-character id (e.g.
	// ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name
	// (e.g. com.evernote).
	AppId string `json:"appId,omitempty"`

	// AppInstallType: Output only. How the app was installed.
	//
	// Possible values:
	//   "APP_INSTALL_TYPE_UNSPECIFIED" - Application install type not
	// specified.
	//   "MULTIPLE" - Multiple app install types.
	//   "NORMAL" - Normal app install type.
	//   "ADMIN" - Administrator app install type.
	//   "DEVELOPMENT" - Development app install type.
	//   "SIDELOAD" - Sideloaded app install type.
	//   "OTHER" - Other app install type.
	AppInstallType string `json:"appInstallType,omitempty"`

	// AppSource: Output only. Source of the installed app.
	//
	// Possible values:
	//   "APP_SOURCE_UNSPECIFIED" - Application source not specified.
	//   "CHROME_WEBSTORE" - Generally for extensions and Chrome apps.
	//   "PLAY_STORE" - Play Store app.
	AppSource string `json:"appSource,omitempty"`

	// AppType: Output only. Type of the app.
	//
	// Possible values:
	//   "APP_TYPE_UNSPECIFIED" - App type not specified.
	//   "EXTENSION" - Chrome extension.
	//   "APP" - Chrome app.
	//   "THEME" - Chrome theme.
	//   "HOSTED_APP" - Chrome hosted app.
	//   "ANDROID_APP" - ARC++ app.
	AppType string `json:"appType,omitempty"`

	// BrowserDeviceCount: Output only. Count of browser devices with this
	// app installed.
	BrowserDeviceCount int64 `json:"browserDeviceCount,omitempty,string"`

	// Description: Output only. Description of the installed app.
	Description string `json:"description,omitempty"`

	// Disabled: Output only. Whether the app is disabled.
	Disabled bool `json:"disabled,omitempty"`

	// DisplayName: Output only. Name of the installed app.
	DisplayName string `json:"displayName,omitempty"`

	// HomepageUri: Output only. Homepage uri of the installed app.
	HomepageUri string `json:"homepageUri,omitempty"`

	// OsUserCount: Output only. Count of ChromeOS users with this app
	// installed.
	OsUserCount int64 `json:"osUserCount,omitempty,string"`

	// Permissions: Output only. Permissions of the installed app.
	Permissions []string `json:"permissions,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AppId") 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:"-"`

	// NullFields is a list of field names (e.g. "AppId") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleChromeManagementV1InstalledApp: Describes an installed app.

func (*GoogleChromeManagementV1InstalledApp) MarshalJSON

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

type Service

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

	Customers *CustomersService
	// contains filtered or unexported fields
}

func New deprecated

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

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

Jump to

Keyboard shortcuts

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