...

Source file src/google.golang.org/api/androidenterprise/v1/androidenterprise-gen.go

Documentation: google.golang.org/api/androidenterprise/v1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package androidenterprise provides access to the Google Play EMM API.
     8  //
     9  // For product documentation, see: https://developers.google.com/android/work/play/emm-api
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/androidenterprise/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	androidenterpriseService, err := androidenterprise.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	androidenterpriseService, err := androidenterprise.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	androidenterpriseService, err := androidenterprise.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package androidenterprise // import "google.golang.org/api/androidenterprise/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "androidenterprise:v1"
    90  const apiName = "androidenterprise"
    91  const apiVersion = "v1"
    92  const basePath = "https://androidenterprise.googleapis.com/"
    93  const basePathTemplate = "https://androidenterprise.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://androidenterprise.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// Manage corporate Android devices
    99  	AndroidenterpriseScope = "https://www.googleapis.com/auth/androidenterprise"
   100  )
   101  
   102  // NewService creates a new Service.
   103  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   104  	scopesOption := internaloption.WithDefaultScopes(
   105  		"https://www.googleapis.com/auth/androidenterprise",
   106  	)
   107  	// NOTE: prepend, so we don't override user-specified scopes.
   108  	opts = append([]option.ClientOption{scopesOption}, opts...)
   109  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   110  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   111  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   112  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   113  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	s, err := New(client)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	if endpoint != "" {
   122  		s.BasePath = endpoint
   123  	}
   124  	return s, nil
   125  }
   126  
   127  // New creates a new Service. It uses the provided http.Client for requests.
   128  //
   129  // Deprecated: please use NewService instead.
   130  // To provide a custom HTTP client, use option.WithHTTPClient.
   131  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   132  func New(client *http.Client) (*Service, error) {
   133  	if client == nil {
   134  		return nil, errors.New("client is nil")
   135  	}
   136  	s := &Service{client: client, BasePath: basePath}
   137  	s.Devices = NewDevicesService(s)
   138  	s.Enterprises = NewEnterprisesService(s)
   139  	s.Entitlements = NewEntitlementsService(s)
   140  	s.Grouplicenses = NewGrouplicensesService(s)
   141  	s.Grouplicenseusers = NewGrouplicenseusersService(s)
   142  	s.Installs = NewInstallsService(s)
   143  	s.Managedconfigurationsfordevice = NewManagedconfigurationsfordeviceService(s)
   144  	s.Managedconfigurationsforuser = NewManagedconfigurationsforuserService(s)
   145  	s.Managedconfigurationssettings = NewManagedconfigurationssettingsService(s)
   146  	s.Permissions = NewPermissionsService(s)
   147  	s.Products = NewProductsService(s)
   148  	s.Serviceaccountkeys = NewServiceaccountkeysService(s)
   149  	s.Storelayoutclusters = NewStorelayoutclustersService(s)
   150  	s.Storelayoutpages = NewStorelayoutpagesService(s)
   151  	s.Users = NewUsersService(s)
   152  	s.Webapps = NewWebappsService(s)
   153  	return s, nil
   154  }
   155  
   156  type Service struct {
   157  	client    *http.Client
   158  	BasePath  string // API endpoint base URL
   159  	UserAgent string // optional additional User-Agent fragment
   160  
   161  	Devices *DevicesService
   162  
   163  	Enterprises *EnterprisesService
   164  
   165  	Entitlements *EntitlementsService
   166  
   167  	Grouplicenses *GrouplicensesService
   168  
   169  	Grouplicenseusers *GrouplicenseusersService
   170  
   171  	Installs *InstallsService
   172  
   173  	Managedconfigurationsfordevice *ManagedconfigurationsfordeviceService
   174  
   175  	Managedconfigurationsforuser *ManagedconfigurationsforuserService
   176  
   177  	Managedconfigurationssettings *ManagedconfigurationssettingsService
   178  
   179  	Permissions *PermissionsService
   180  
   181  	Products *ProductsService
   182  
   183  	Serviceaccountkeys *ServiceaccountkeysService
   184  
   185  	Storelayoutclusters *StorelayoutclustersService
   186  
   187  	Storelayoutpages *StorelayoutpagesService
   188  
   189  	Users *UsersService
   190  
   191  	Webapps *WebappsService
   192  }
   193  
   194  func (s *Service) userAgent() string {
   195  	if s.UserAgent == "" {
   196  		return googleapi.UserAgent
   197  	}
   198  	return googleapi.UserAgent + " " + s.UserAgent
   199  }
   200  
   201  func NewDevicesService(s *Service) *DevicesService {
   202  	rs := &DevicesService{s: s}
   203  	return rs
   204  }
   205  
   206  type DevicesService struct {
   207  	s *Service
   208  }
   209  
   210  func NewEnterprisesService(s *Service) *EnterprisesService {
   211  	rs := &EnterprisesService{s: s}
   212  	return rs
   213  }
   214  
   215  type EnterprisesService struct {
   216  	s *Service
   217  }
   218  
   219  func NewEntitlementsService(s *Service) *EntitlementsService {
   220  	rs := &EntitlementsService{s: s}
   221  	return rs
   222  }
   223  
   224  type EntitlementsService struct {
   225  	s *Service
   226  }
   227  
   228  func NewGrouplicensesService(s *Service) *GrouplicensesService {
   229  	rs := &GrouplicensesService{s: s}
   230  	return rs
   231  }
   232  
   233  type GrouplicensesService struct {
   234  	s *Service
   235  }
   236  
   237  func NewGrouplicenseusersService(s *Service) *GrouplicenseusersService {
   238  	rs := &GrouplicenseusersService{s: s}
   239  	return rs
   240  }
   241  
   242  type GrouplicenseusersService struct {
   243  	s *Service
   244  }
   245  
   246  func NewInstallsService(s *Service) *InstallsService {
   247  	rs := &InstallsService{s: s}
   248  	return rs
   249  }
   250  
   251  type InstallsService struct {
   252  	s *Service
   253  }
   254  
   255  func NewManagedconfigurationsfordeviceService(s *Service) *ManagedconfigurationsfordeviceService {
   256  	rs := &ManagedconfigurationsfordeviceService{s: s}
   257  	return rs
   258  }
   259  
   260  type ManagedconfigurationsfordeviceService struct {
   261  	s *Service
   262  }
   263  
   264  func NewManagedconfigurationsforuserService(s *Service) *ManagedconfigurationsforuserService {
   265  	rs := &ManagedconfigurationsforuserService{s: s}
   266  	return rs
   267  }
   268  
   269  type ManagedconfigurationsforuserService struct {
   270  	s *Service
   271  }
   272  
   273  func NewManagedconfigurationssettingsService(s *Service) *ManagedconfigurationssettingsService {
   274  	rs := &ManagedconfigurationssettingsService{s: s}
   275  	return rs
   276  }
   277  
   278  type ManagedconfigurationssettingsService struct {
   279  	s *Service
   280  }
   281  
   282  func NewPermissionsService(s *Service) *PermissionsService {
   283  	rs := &PermissionsService{s: s}
   284  	return rs
   285  }
   286  
   287  type PermissionsService struct {
   288  	s *Service
   289  }
   290  
   291  func NewProductsService(s *Service) *ProductsService {
   292  	rs := &ProductsService{s: s}
   293  	return rs
   294  }
   295  
   296  type ProductsService struct {
   297  	s *Service
   298  }
   299  
   300  func NewServiceaccountkeysService(s *Service) *ServiceaccountkeysService {
   301  	rs := &ServiceaccountkeysService{s: s}
   302  	return rs
   303  }
   304  
   305  type ServiceaccountkeysService struct {
   306  	s *Service
   307  }
   308  
   309  func NewStorelayoutclustersService(s *Service) *StorelayoutclustersService {
   310  	rs := &StorelayoutclustersService{s: s}
   311  	return rs
   312  }
   313  
   314  type StorelayoutclustersService struct {
   315  	s *Service
   316  }
   317  
   318  func NewStorelayoutpagesService(s *Service) *StorelayoutpagesService {
   319  	rs := &StorelayoutpagesService{s: s}
   320  	return rs
   321  }
   322  
   323  type StorelayoutpagesService struct {
   324  	s *Service
   325  }
   326  
   327  func NewUsersService(s *Service) *UsersService {
   328  	rs := &UsersService{s: s}
   329  	return rs
   330  }
   331  
   332  type UsersService struct {
   333  	s *Service
   334  }
   335  
   336  func NewWebappsService(s *Service) *WebappsService {
   337  	rs := &WebappsService{s: s}
   338  	return rs
   339  }
   340  
   341  type WebappsService struct {
   342  	s *Service
   343  }
   344  
   345  // Administrator: This represents an enterprise admin who can manage the
   346  // enterprise in the managed Google Play store.
   347  type Administrator struct {
   348  	// Email: The admin's email address.
   349  	Email string `json:"email,omitempty"`
   350  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
   351  	// include in API requests. By default, fields with empty or default values are
   352  	// omitted from API requests. See
   353  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   354  	// details.
   355  	ForceSendFields []string `json:"-"`
   356  	// NullFields is a list of field names (e.g. "Email") to include in API
   357  	// requests with the JSON null value. By default, fields with empty values are
   358  	// omitted from API requests. See
   359  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   360  	NullFields []string `json:"-"`
   361  }
   362  
   363  func (s *Administrator) MarshalJSON() ([]byte, error) {
   364  	type NoMethod Administrator
   365  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   366  }
   367  
   368  // AdministratorWebToken: A token authorizing an admin to access an iframe.
   369  type AdministratorWebToken struct {
   370  	// Token: An opaque token to be passed to the Play front-end to generate an
   371  	// iframe.
   372  	Token string `json:"token,omitempty"`
   373  
   374  	// ServerResponse contains the HTTP response code and headers from the server.
   375  	googleapi.ServerResponse `json:"-"`
   376  	// ForceSendFields is a list of field names (e.g. "Token") to unconditionally
   377  	// include in API requests. By default, fields with empty or default values are
   378  	// omitted from API requests. See
   379  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   380  	// details.
   381  	ForceSendFields []string `json:"-"`
   382  	// NullFields is a list of field names (e.g. "Token") to include in API
   383  	// requests with the JSON null value. By default, fields with empty values are
   384  	// omitted from API requests. See
   385  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   386  	NullFields []string `json:"-"`
   387  }
   388  
   389  func (s *AdministratorWebToken) MarshalJSON() ([]byte, error) {
   390  	type NoMethod AdministratorWebToken
   391  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   392  }
   393  
   394  // AdministratorWebTokenSpec: Specification for a token used to generate
   395  // iframes. The token specifies what data the admin is allowed to modify and
   396  // the URI the iframe is allowed to communiate with.
   397  type AdministratorWebTokenSpec struct {
   398  	// ManagedConfigurations: Options for displaying the Managed Configuration
   399  	// page.
   400  	ManagedConfigurations *AdministratorWebTokenSpecManagedConfigurations `json:"managedConfigurations,omitempty"`
   401  	// Parent: The URI of the parent frame hosting the iframe. To prevent XSS, the
   402  	// iframe may not be hosted at other URIs. This URI must be https. Use
   403  	// whitespaces to separate multiple parent URIs.
   404  	Parent string `json:"parent,omitempty"`
   405  	// Permission: Deprecated. Use PlaySearch.approveApps.
   406  	//
   407  	// Possible values:
   408  	//   "unknown" - Unknown permission.
   409  	//   "approveApps" - Permission to approve and unapprove apps.
   410  	//   "manageMcm" - Permission to manage app restrictions.
   411  	Permission []string `json:"permission,omitempty"`
   412  	// PlaySearch: Options for displaying the managed Play Search apps page.
   413  	PlaySearch *AdministratorWebTokenSpecPlaySearch `json:"playSearch,omitempty"`
   414  	// PrivateApps: Options for displaying the Private Apps page.
   415  	PrivateApps *AdministratorWebTokenSpecPrivateApps `json:"privateApps,omitempty"`
   416  	// StoreBuilder: Options for displaying the Organize apps page.
   417  	StoreBuilder *AdministratorWebTokenSpecStoreBuilder `json:"storeBuilder,omitempty"`
   418  	// WebApps: Options for displaying the Web Apps page.
   419  	WebApps *AdministratorWebTokenSpecWebApps `json:"webApps,omitempty"`
   420  	// ZeroTouch: Options for displaying the Zero Touch page.
   421  	ZeroTouch *AdministratorWebTokenSpecZeroTouch `json:"zeroTouch,omitempty"`
   422  	// ForceSendFields is a list of field names (e.g. "ManagedConfigurations") to
   423  	// unconditionally include in API requests. By default, fields with empty or
   424  	// default values are omitted from API requests. See
   425  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   426  	// details.
   427  	ForceSendFields []string `json:"-"`
   428  	// NullFields is a list of field names (e.g. "ManagedConfigurations") to
   429  	// include in API requests with the JSON null value. By default, fields with
   430  	// empty values are omitted from API requests. See
   431  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   432  	NullFields []string `json:"-"`
   433  }
   434  
   435  func (s *AdministratorWebTokenSpec) MarshalJSON() ([]byte, error) {
   436  	type NoMethod AdministratorWebTokenSpec
   437  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   438  }
   439  
   440  type AdministratorWebTokenSpecManagedConfigurations struct {
   441  	// Enabled: Whether the Managed Configuration page is displayed. Default is
   442  	// true.
   443  	Enabled bool `json:"enabled,omitempty"`
   444  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
   445  	// include in API requests. By default, fields with empty or default values are
   446  	// omitted from API requests. See
   447  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   448  	// details.
   449  	ForceSendFields []string `json:"-"`
   450  	// NullFields is a list of field names (e.g. "Enabled") to include in API
   451  	// requests with the JSON null value. By default, fields with empty values are
   452  	// omitted from API requests. See
   453  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   454  	NullFields []string `json:"-"`
   455  }
   456  
   457  func (s *AdministratorWebTokenSpecManagedConfigurations) MarshalJSON() ([]byte, error) {
   458  	type NoMethod AdministratorWebTokenSpecManagedConfigurations
   459  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   460  }
   461  
   462  type AdministratorWebTokenSpecPlaySearch struct {
   463  	// ApproveApps: Allow access to the iframe in approve mode. Default is false.
   464  	ApproveApps bool `json:"approveApps,omitempty"`
   465  	// Enabled: Whether the managed Play Search apps page is displayed. Default is
   466  	// true.
   467  	Enabled bool `json:"enabled,omitempty"`
   468  	// ForceSendFields is a list of field names (e.g. "ApproveApps") to
   469  	// unconditionally include in API requests. By default, fields with empty or
   470  	// default values are omitted from API requests. See
   471  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   472  	// details.
   473  	ForceSendFields []string `json:"-"`
   474  	// NullFields is a list of field names (e.g. "ApproveApps") to include in API
   475  	// requests with the JSON null value. By default, fields with empty values are
   476  	// omitted from API requests. See
   477  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   478  	NullFields []string `json:"-"`
   479  }
   480  
   481  func (s *AdministratorWebTokenSpecPlaySearch) MarshalJSON() ([]byte, error) {
   482  	type NoMethod AdministratorWebTokenSpecPlaySearch
   483  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   484  }
   485  
   486  type AdministratorWebTokenSpecPrivateApps struct {
   487  	// Enabled: Whether the Private Apps page is displayed. Default is true.
   488  	Enabled bool `json:"enabled,omitempty"`
   489  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
   490  	// include in API requests. By default, fields with empty or default values are
   491  	// omitted from API requests. See
   492  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   493  	// details.
   494  	ForceSendFields []string `json:"-"`
   495  	// NullFields is a list of field names (e.g. "Enabled") to include in API
   496  	// requests with the JSON null value. By default, fields with empty values are
   497  	// omitted from API requests. See
   498  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   499  	NullFields []string `json:"-"`
   500  }
   501  
   502  func (s *AdministratorWebTokenSpecPrivateApps) MarshalJSON() ([]byte, error) {
   503  	type NoMethod AdministratorWebTokenSpecPrivateApps
   504  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   505  }
   506  
   507  type AdministratorWebTokenSpecStoreBuilder struct {
   508  	// Enabled: Whether the Organize apps page is displayed. Default is true.
   509  	Enabled bool `json:"enabled,omitempty"`
   510  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
   511  	// include in API requests. By default, fields with empty or default values are
   512  	// omitted from API requests. See
   513  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   514  	// details.
   515  	ForceSendFields []string `json:"-"`
   516  	// NullFields is a list of field names (e.g. "Enabled") to include in API
   517  	// requests with the JSON null value. By default, fields with empty values are
   518  	// omitted from API requests. See
   519  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   520  	NullFields []string `json:"-"`
   521  }
   522  
   523  func (s *AdministratorWebTokenSpecStoreBuilder) MarshalJSON() ([]byte, error) {
   524  	type NoMethod AdministratorWebTokenSpecStoreBuilder
   525  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   526  }
   527  
   528  type AdministratorWebTokenSpecWebApps struct {
   529  	// Enabled: Whether the Web Apps page is displayed. Default is true.
   530  	Enabled bool `json:"enabled,omitempty"`
   531  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
   532  	// include in API requests. By default, fields with empty or default values are
   533  	// omitted from API requests. See
   534  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   535  	// details.
   536  	ForceSendFields []string `json:"-"`
   537  	// NullFields is a list of field names (e.g. "Enabled") to include in API
   538  	// requests with the JSON null value. By default, fields with empty values are
   539  	// omitted from API requests. See
   540  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   541  	NullFields []string `json:"-"`
   542  }
   543  
   544  func (s *AdministratorWebTokenSpecWebApps) MarshalJSON() ([]byte, error) {
   545  	type NoMethod AdministratorWebTokenSpecWebApps
   546  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   547  }
   548  
   549  type AdministratorWebTokenSpecZeroTouch struct {
   550  	// Enabled: Whether zero-touch embedded UI is usable with this token. If
   551  	// enabled, the admin can link zero-touch customers to this enterprise.
   552  	Enabled bool `json:"enabled,omitempty"`
   553  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
   554  	// include in API requests. By default, fields with empty or default values are
   555  	// omitted from API requests. See
   556  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   557  	// details.
   558  	ForceSendFields []string `json:"-"`
   559  	// NullFields is a list of field names (e.g. "Enabled") to include in API
   560  	// requests with the JSON null value. By default, fields with empty values are
   561  	// omitted from API requests. See
   562  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   563  	NullFields []string `json:"-"`
   564  }
   565  
   566  func (s *AdministratorWebTokenSpecZeroTouch) MarshalJSON() ([]byte, error) {
   567  	type NoMethod AdministratorWebTokenSpecZeroTouch
   568  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   569  }
   570  
   571  // AppRestrictionsSchema: Represents the list of app restrictions available to
   572  // be pre-configured for the product.
   573  type AppRestrictionsSchema struct {
   574  	// Kind: Deprecated.
   575  	Kind string `json:"kind,omitempty"`
   576  	// Restrictions: The set of restrictions that make up this schema.
   577  	Restrictions []*AppRestrictionsSchemaRestriction `json:"restrictions,omitempty"`
   578  
   579  	// ServerResponse contains the HTTP response code and headers from the server.
   580  	googleapi.ServerResponse `json:"-"`
   581  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
   582  	// include in API requests. By default, fields with empty or default values are
   583  	// omitted from API requests. See
   584  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   585  	// details.
   586  	ForceSendFields []string `json:"-"`
   587  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
   588  	// with the JSON null value. By default, fields with empty values are omitted
   589  	// from API requests. See
   590  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   591  	NullFields []string `json:"-"`
   592  }
   593  
   594  func (s *AppRestrictionsSchema) MarshalJSON() ([]byte, error) {
   595  	type NoMethod AppRestrictionsSchema
   596  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   597  }
   598  
   599  // AppRestrictionsSchemaChangeEvent: An event generated when a new app version
   600  // is uploaded to Google Play and its app restrictions schema changed. To fetch
   601  // the app restrictions schema for an app, use
   602  // Products.getAppRestrictionsSchema on the EMM API.
   603  type AppRestrictionsSchemaChangeEvent struct {
   604  	// ProductId: The id of the product (e.g. "app:com.google.android.gm") for
   605  	// which the app restriction schema changed. This field will always be present.
   606  	ProductId string `json:"productId,omitempty"`
   607  	// ForceSendFields is a list of field names (e.g. "ProductId") to
   608  	// unconditionally include in API requests. By default, fields with empty or
   609  	// default values are omitted from API requests. See
   610  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   611  	// details.
   612  	ForceSendFields []string `json:"-"`
   613  	// NullFields is a list of field names (e.g. "ProductId") to include in API
   614  	// requests with the JSON null value. By default, fields with empty values are
   615  	// omitted from API requests. See
   616  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   617  	NullFields []string `json:"-"`
   618  }
   619  
   620  func (s *AppRestrictionsSchemaChangeEvent) MarshalJSON() ([]byte, error) {
   621  	type NoMethod AppRestrictionsSchemaChangeEvent
   622  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   623  }
   624  
   625  // AppRestrictionsSchemaRestriction: A restriction in the App Restriction
   626  // Schema represents a piece of configuration that may be pre-applied.
   627  type AppRestrictionsSchemaRestriction struct {
   628  	// DefaultValue: The default value of the restriction. bundle and bundleArray
   629  	// restrictions never have a default value.
   630  	DefaultValue *AppRestrictionsSchemaRestrictionRestrictionValue `json:"defaultValue,omitempty"`
   631  	// Description: A longer description of the restriction, giving more detail of
   632  	// what it affects.
   633  	Description string `json:"description,omitempty"`
   634  	// Entry: For choice or multiselect restrictions, the list of possible entries'
   635  	// human-readable names.
   636  	Entry []string `json:"entry,omitempty"`
   637  	// EntryValue: For choice or multiselect restrictions, the list of possible
   638  	// entries' machine-readable values. These values should be used in the
   639  	// configuration, either as a single string value for a choice restriction or
   640  	// in a stringArray for a multiselect restriction.
   641  	EntryValue []string `json:"entryValue,omitempty"`
   642  	// Key: The unique key that the product uses to identify the restriction, e.g.
   643  	// "com.google.android.gm.fieldname".
   644  	Key string `json:"key,omitempty"`
   645  	// NestedRestriction: For bundle or bundleArray restrictions, the list of
   646  	// nested restrictions. A bundle restriction is always nested within a
   647  	// bundleArray restriction, and a bundleArray restriction is at most two levels
   648  	// deep.
   649  	NestedRestriction []*AppRestrictionsSchemaRestriction `json:"nestedRestriction,omitempty"`
   650  	// RestrictionType: The type of the restriction.
   651  	//
   652  	// Possible values:
   653  	//   "bool" - A restriction of boolean type.
   654  	//   "string" - A restriction of string type.
   655  	//   "integer" - A restriction of integer type.
   656  	//   "choice" - A choice of one item from a set.
   657  	//   "multiselect" - A choice of multiple items from a set.
   658  	//   "hidden" - A hidden restriction of string type (the default value can be
   659  	// used to pass along information that cannot be modified, such as a version
   660  	// code).
   661  	//   "bundle" - [M+ devices only] A bundle of restrictions
   662  	//   "bundleArray" - [M+ devices only] An array of restriction bundles
   663  	RestrictionType string `json:"restrictionType,omitempty"`
   664  	// Title: The name of the restriction.
   665  	Title string `json:"title,omitempty"`
   666  	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
   667  	// unconditionally include in API requests. By default, fields with empty or
   668  	// default values are omitted from API requests. See
   669  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   670  	// details.
   671  	ForceSendFields []string `json:"-"`
   672  	// NullFields is a list of field names (e.g. "DefaultValue") to include in API
   673  	// requests with the JSON null value. By default, fields with empty values are
   674  	// omitted from API requests. See
   675  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   676  	NullFields []string `json:"-"`
   677  }
   678  
   679  func (s *AppRestrictionsSchemaRestriction) MarshalJSON() ([]byte, error) {
   680  	type NoMethod AppRestrictionsSchemaRestriction
   681  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   682  }
   683  
   684  // AppRestrictionsSchemaRestrictionRestrictionValue: A typed value for the
   685  // restriction.
   686  type AppRestrictionsSchemaRestrictionRestrictionValue struct {
   687  	// Type: The type of the value being provided.
   688  	//
   689  	// Possible values:
   690  	//   "bool" - A restriction of boolean type.
   691  	//   "string" - A restriction of string type.
   692  	//   "integer" - A restriction of integer type.
   693  	//   "choice" - A choice of one item from a set.
   694  	//   "multiselect" - A choice of multiple items from a set.
   695  	//   "hidden" - A hidden restriction of string type (the default value can be
   696  	// used to pass along information that cannot be modified, such as a version
   697  	// code).
   698  	//   "bundle" - [M+ devices only] A bundle of restrictions
   699  	//   "bundleArray" - [M+ devices only] An array of restriction bundles
   700  	Type string `json:"type,omitempty"`
   701  	// ValueBool: The boolean value - this will only be present if type is bool.
   702  	ValueBool bool `json:"valueBool,omitempty"`
   703  	// ValueInteger: The integer value - this will only be present if type is
   704  	// integer.
   705  	ValueInteger int64 `json:"valueInteger,omitempty"`
   706  	// ValueMultiselect: The list of string values - this will only be present if
   707  	// type is multiselect.
   708  	ValueMultiselect []string `json:"valueMultiselect,omitempty"`
   709  	// ValueString: The string value - this will be present for types string,
   710  	// choice and hidden.
   711  	ValueString string `json:"valueString,omitempty"`
   712  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
   713  	// include in API requests. By default, fields with empty or default values are
   714  	// omitted from API requests. See
   715  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   716  	// details.
   717  	ForceSendFields []string `json:"-"`
   718  	// NullFields is a list of field names (e.g. "Type") to include in API requests
   719  	// with the JSON null value. By default, fields with empty values are omitted
   720  	// from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   722  	NullFields []string `json:"-"`
   723  }
   724  
   725  func (s *AppRestrictionsSchemaRestrictionRestrictionValue) MarshalJSON() ([]byte, error) {
   726  	type NoMethod AppRestrictionsSchemaRestrictionRestrictionValue
   727  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   728  }
   729  
   730  // AppState: List of states set by the app.
   731  type AppState struct {
   732  	// KeyedAppState: List of keyed app states. This field will always be present.
   733  	KeyedAppState []*KeyedAppState `json:"keyedAppState,omitempty"`
   734  	// PackageName: The package name of the app. This field will always be present.
   735  	PackageName string `json:"packageName,omitempty"`
   736  	// ForceSendFields is a list of field names (e.g. "KeyedAppState") to
   737  	// unconditionally include in API requests. By default, fields with empty or
   738  	// default values are omitted from API requests. See
   739  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   740  	// details.
   741  	ForceSendFields []string `json:"-"`
   742  	// NullFields is a list of field names (e.g. "KeyedAppState") to include in API
   743  	// requests with the JSON null value. By default, fields with empty values are
   744  	// omitted from API requests. See
   745  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   746  	NullFields []string `json:"-"`
   747  }
   748  
   749  func (s *AppState) MarshalJSON() ([]byte, error) {
   750  	type NoMethod AppState
   751  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   752  }
   753  
   754  // AppUpdateEvent: An event generated when a new version of an app is uploaded
   755  // to Google Play. Notifications are sent for new public versions only: alpha,
   756  // beta, or canary versions do not generate this event. To fetch up-to-date
   757  // version history for an app, use Products.Get on the EMM API.
   758  type AppUpdateEvent struct {
   759  	// ProductId: The id of the product (e.g. "app:com.google.android.gm") that was
   760  	// updated. This field will always be present.
   761  	ProductId string `json:"productId,omitempty"`
   762  	// ForceSendFields is a list of field names (e.g. "ProductId") to
   763  	// unconditionally include in API requests. By default, fields with empty or
   764  	// default values are omitted from API requests. See
   765  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   766  	// details.
   767  	ForceSendFields []string `json:"-"`
   768  	// NullFields is a list of field names (e.g. "ProductId") to include in API
   769  	// requests with the JSON null value. By default, fields with empty values are
   770  	// omitted from API requests. See
   771  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   772  	NullFields []string `json:"-"`
   773  }
   774  
   775  func (s *AppUpdateEvent) MarshalJSON() ([]byte, error) {
   776  	type NoMethod AppUpdateEvent
   777  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   778  }
   779  
   780  // AppVersion: This represents a single version of the app.
   781  type AppVersion struct {
   782  	// IsProduction: True if this version is a production APK.
   783  	IsProduction bool `json:"isProduction,omitempty"`
   784  	// TargetSdkVersion: The SDK version this app targets, as specified in the
   785  	// manifest of the APK. See
   786  	// http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
   787  	TargetSdkVersion int64 `json:"targetSdkVersion,omitempty"`
   788  	// Track: Deprecated, use trackId instead.
   789  	//
   790  	// Possible values:
   791  	//   "appTrackUnspecified"
   792  	//   "production"
   793  	//   "beta"
   794  	//   "alpha"
   795  	Track string `json:"track,omitempty"`
   796  	// TrackId: Track ids that the app version is published in. Replaces the track
   797  	// field (deprecated), but doesn't include the production track (see
   798  	// isProduction instead).
   799  	TrackId []string `json:"trackId,omitempty"`
   800  	// VersionCode: Unique increasing identifier for the app version.
   801  	VersionCode int64 `json:"versionCode,omitempty"`
   802  	// VersionString: The string used in the Play store by the app developer to
   803  	// identify the version. The string is not necessarily unique or localized (for
   804  	// example, the string could be "1.4").
   805  	VersionString string `json:"versionString,omitempty"`
   806  	// ForceSendFields is a list of field names (e.g. "IsProduction") to
   807  	// unconditionally include in API requests. By default, fields with empty or
   808  	// default values are omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   810  	// details.
   811  	ForceSendFields []string `json:"-"`
   812  	// NullFields is a list of field names (e.g. "IsProduction") to include in API
   813  	// requests with the JSON null value. By default, fields with empty values are
   814  	// omitted from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   816  	NullFields []string `json:"-"`
   817  }
   818  
   819  func (s *AppVersion) MarshalJSON() ([]byte, error) {
   820  	type NoMethod AppVersion
   821  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   822  }
   823  
   824  // ApprovalUrlInfo: Information on an approval URL.
   825  type ApprovalUrlInfo struct {
   826  	// ApprovalUrl: A URL that displays a product's permissions and that can also
   827  	// be used to approve the product with the Products.approve call.
   828  	ApprovalUrl string `json:"approvalUrl,omitempty"`
   829  	// ForceSendFields is a list of field names (e.g. "ApprovalUrl") to
   830  	// unconditionally include in API requests. By default, fields with empty or
   831  	// default values are omitted from API requests. See
   832  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   833  	// details.
   834  	ForceSendFields []string `json:"-"`
   835  	// NullFields is a list of field names (e.g. "ApprovalUrl") to include in API
   836  	// requests with the JSON null value. By default, fields with empty values are
   837  	// omitted from API requests. See
   838  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   839  	NullFields []string `json:"-"`
   840  }
   841  
   842  func (s *ApprovalUrlInfo) MarshalJSON() ([]byte, error) {
   843  	type NoMethod ApprovalUrlInfo
   844  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   845  }
   846  
   847  // AuthenticationToken: An AuthenticationToken is used by the EMM's device
   848  // policy client on a device to provision the given EMM-managed user on that
   849  // device.
   850  type AuthenticationToken struct {
   851  	// Token: The authentication token to be passed to the device policy client on
   852  	// the device where it can be used to provision the account for which this
   853  	// token was generated.
   854  	Token string `json:"token,omitempty"`
   855  
   856  	// ServerResponse contains the HTTP response code and headers from the server.
   857  	googleapi.ServerResponse `json:"-"`
   858  	// ForceSendFields is a list of field names (e.g. "Token") to unconditionally
   859  	// include in API requests. By default, fields with empty or default values are
   860  	// omitted from API requests. See
   861  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   862  	// details.
   863  	ForceSendFields []string `json:"-"`
   864  	// NullFields is a list of field names (e.g. "Token") to include in API
   865  	// requests with the JSON null value. By default, fields with empty values are
   866  	// omitted from API requests. See
   867  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   868  	NullFields []string `json:"-"`
   869  }
   870  
   871  func (s *AuthenticationToken) MarshalJSON() ([]byte, error) {
   872  	type NoMethod AuthenticationToken
   873  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   874  }
   875  
   876  // AutoInstallConstraint: The auto-install constraint. Defines a set of
   877  // restrictions for installation. At least one of the fields must be set.
   878  type AutoInstallConstraint struct {
   879  	// ChargingStateConstraint: Charging state constraint.
   880  	//
   881  	// Possible values:
   882  	//   "chargingStateConstraintUnspecified"
   883  	//   "chargingNotRequired" - Device doesn't have to be charging.
   884  	//   "chargingRequired" - Device has to be charging.
   885  	ChargingStateConstraint string `json:"chargingStateConstraint,omitempty"`
   886  	// DeviceIdleStateConstraint: Device idle state constraint.
   887  	//
   888  	// Possible values:
   889  	//   "deviceIdleStateConstraintUnspecified"
   890  	//   "deviceIdleNotRequired" - Device doesn't have to be idle, app can be
   891  	// installed while the user is interacting with the device.
   892  	//   "deviceIdleRequired" - Device has to be idle.
   893  	DeviceIdleStateConstraint string `json:"deviceIdleStateConstraint,omitempty"`
   894  	// NetworkTypeConstraint: Network type constraint.
   895  	//
   896  	// Possible values:
   897  	//   "networkTypeConstraintUnspecified"
   898  	//   "anyNetwork" - Any active networks (Wi-Fi, cellular, etc.).
   899  	//   "unmeteredNetwork" - Any unmetered network (e.g. Wi-FI).
   900  	NetworkTypeConstraint string `json:"networkTypeConstraint,omitempty"`
   901  	// ForceSendFields is a list of field names (e.g. "ChargingStateConstraint") to
   902  	// unconditionally include in API requests. By default, fields with empty or
   903  	// default values are omitted from API requests. See
   904  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   905  	// details.
   906  	ForceSendFields []string `json:"-"`
   907  	// NullFields is a list of field names (e.g. "ChargingStateConstraint") to
   908  	// include in API requests with the JSON null value. By default, fields with
   909  	// empty values are omitted from API requests. See
   910  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   911  	NullFields []string `json:"-"`
   912  }
   913  
   914  func (s *AutoInstallConstraint) MarshalJSON() ([]byte, error) {
   915  	type NoMethod AutoInstallConstraint
   916  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   917  }
   918  
   919  type AutoInstallPolicy struct {
   920  	// AutoInstallConstraint: The constraints for auto-installing the app. You can
   921  	// specify a maximum of one constraint.
   922  	AutoInstallConstraint []*AutoInstallConstraint `json:"autoInstallConstraint,omitempty"`
   923  	// AutoInstallMode: The auto-install mode. If unset, defaults to
   924  	// "doNotAutoInstall". An app is automatically installed regardless of a set
   925  	// maintenance window.
   926  	//
   927  	// Possible values:
   928  	//   "autoInstallModeUnspecified"
   929  	//   "doNotAutoInstall" - The product is not installed automatically, the user
   930  	// needs to install it from the Play Store.
   931  	//   "autoInstallOnce" - The product is automatically installed once, if the
   932  	// user uninstalls the product it will not be installed again.
   933  	//   "forceAutoInstall" - The product is automatically installed, if the user
   934  	// uninstalls the product it will be installed again. On managed devices the
   935  	// DPC should block uninstall.
   936  	AutoInstallMode string `json:"autoInstallMode,omitempty"`
   937  	// AutoInstallPriority: The priority of the install, as an unsigned integer. A
   938  	// lower number means higher priority.
   939  	AutoInstallPriority int64 `json:"autoInstallPriority,omitempty"`
   940  	// MinimumVersionCode: The minimum version of the app. If a lower version of
   941  	// the app is installed, then the app will be auto-updated according to the
   942  	// auto-install constraints, instead of waiting for the regular auto-update.
   943  	// You can set a minimum version code for at most 20 apps per device.
   944  	MinimumVersionCode int64 `json:"minimumVersionCode,omitempty"`
   945  	// ForceSendFields is a list of field names (e.g. "AutoInstallConstraint") to
   946  	// unconditionally include in API requests. By default, fields with empty or
   947  	// default values are omitted from API requests. See
   948  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   949  	// details.
   950  	ForceSendFields []string `json:"-"`
   951  	// NullFields is a list of field names (e.g. "AutoInstallConstraint") to
   952  	// include in API requests with the JSON null value. By default, fields with
   953  	// empty values are omitted from API requests. See
   954  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   955  	NullFields []string `json:"-"`
   956  }
   957  
   958  func (s *AutoInstallPolicy) MarshalJSON() ([]byte, error) {
   959  	type NoMethod AutoInstallPolicy
   960  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   961  }
   962  
   963  // ConfigurationVariables: A configuration variables resource contains the
   964  // managed configuration settings ID to be applied to a single user, as well as
   965  // the variable set that is attributed to the user. The variable set will be
   966  // used to replace placeholders in the managed configuration settings.
   967  type ConfigurationVariables struct {
   968  	// McmId: The ID of the managed configurations settings.
   969  	McmId string `json:"mcmId,omitempty"`
   970  	// VariableSet: The variable set that is attributed to the user.
   971  	VariableSet []*VariableSet `json:"variableSet,omitempty"`
   972  	// ForceSendFields is a list of field names (e.g. "McmId") to unconditionally
   973  	// include in API requests. By default, fields with empty or default values are
   974  	// omitted from API requests. See
   975  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   976  	// details.
   977  	ForceSendFields []string `json:"-"`
   978  	// NullFields is a list of field names (e.g. "McmId") to include in API
   979  	// requests with the JSON null value. By default, fields with empty values are
   980  	// omitted from API requests. See
   981  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   982  	NullFields []string `json:"-"`
   983  }
   984  
   985  func (s *ConfigurationVariables) MarshalJSON() ([]byte, error) {
   986  	type NoMethod ConfigurationVariables
   987  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   988  }
   989  
   990  // CreateEnrollmentTokenResponse: Response message for create enrollment token.
   991  type CreateEnrollmentTokenResponse struct {
   992  	// EnrollmentToken: Enrollment token.
   993  	EnrollmentToken string `json:"enrollmentToken,omitempty"`
   994  
   995  	// ServerResponse contains the HTTP response code and headers from the server.
   996  	googleapi.ServerResponse `json:"-"`
   997  	// ForceSendFields is a list of field names (e.g. "EnrollmentToken") to
   998  	// unconditionally include in API requests. By default, fields with empty or
   999  	// default values are omitted from API requests. See
  1000  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1001  	// details.
  1002  	ForceSendFields []string `json:"-"`
  1003  	// NullFields is a list of field names (e.g. "EnrollmentToken") to include in
  1004  	// API requests with the JSON null value. By default, fields with empty values
  1005  	// are omitted from API requests. See
  1006  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1007  	NullFields []string `json:"-"`
  1008  }
  1009  
  1010  func (s *CreateEnrollmentTokenResponse) MarshalJSON() ([]byte, error) {
  1011  	type NoMethod CreateEnrollmentTokenResponse
  1012  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1013  }
  1014  
  1015  // Device: A Devices resource represents a mobile device managed by the EMM and
  1016  // belonging to a specific enterprise user.
  1017  type Device struct {
  1018  	// AndroidId: The Google Play Services Android ID for the device encoded as a
  1019  	// lowercase hex string. For example, "123456789abcdef0".
  1020  	AndroidId string `json:"androidId,omitempty"`
  1021  	// Device: The internal hardware codename of the device. This comes from
  1022  	// android.os.Build.DEVICE. (field named "device" per
  1023  	// logs/wireless/android/android_checkin.proto)
  1024  	Device string `json:"device,omitempty"`
  1025  	// LatestBuildFingerprint: The build fingerprint of the device if known.
  1026  	LatestBuildFingerprint string `json:"latestBuildFingerprint,omitempty"`
  1027  	// Maker: The manufacturer of the device. This comes from
  1028  	// android.os.Build.MANUFACTURER.
  1029  	Maker string `json:"maker,omitempty"`
  1030  	// ManagementType: Identifies the extent to which the device is controlled by a
  1031  	// managed Google Play EMM in various deployment configurations. Possible
  1032  	// values include: - "managedDevice", a device that has the EMM's device policy
  1033  	// controller (DPC) as the device owner. - "managedProfile", a device that has
  1034  	// a profile managed by the DPC (DPC is profile owner) in addition to a
  1035  	// separate, personal profile that is unavailable to the DPC. - "containerApp",
  1036  	// no longer used (deprecated). - "unmanagedProfile", a device that has been
  1037  	// allowed (by the domain's admin, using the Admin Console to enable the
  1038  	// privilege) to use managed Google Play, but the profile is itself not owned
  1039  	// by a DPC.
  1040  	//
  1041  	// Possible values:
  1042  	//   "managedDevice"
  1043  	//   "managedProfile"
  1044  	//   "containerApp"
  1045  	//   "unmanagedProfile"
  1046  	ManagementType string `json:"managementType,omitempty"`
  1047  	// Model: The model name of the device. This comes from android.os.Build.MODEL.
  1048  	Model string `json:"model,omitempty"`
  1049  	// Policy: The policy enforced on the device.
  1050  	Policy *Policy `json:"policy,omitempty"`
  1051  	// Product: The product name of the device. This comes from
  1052  	// android.os.Build.PRODUCT.
  1053  	Product string `json:"product,omitempty"`
  1054  	// Report: The device report updated with the latest app states.
  1055  	Report *DeviceReport `json:"report,omitempty"`
  1056  	// RetailBrand: Retail brand for the device, if set. See android.os.Build.BRAND
  1057  	RetailBrand string `json:"retailBrand,omitempty"`
  1058  	// SdkVersion: API compatibility version.
  1059  	SdkVersion int64 `json:"sdkVersion,omitempty"`
  1060  
  1061  	// ServerResponse contains the HTTP response code and headers from the server.
  1062  	googleapi.ServerResponse `json:"-"`
  1063  	// ForceSendFields is a list of field names (e.g. "AndroidId") to
  1064  	// unconditionally include in API requests. By default, fields with empty or
  1065  	// default values are omitted from API requests. See
  1066  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1067  	// details.
  1068  	ForceSendFields []string `json:"-"`
  1069  	// NullFields is a list of field names (e.g. "AndroidId") to include in API
  1070  	// requests with the JSON null value. By default, fields with empty values are
  1071  	// omitted from API requests. See
  1072  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1073  	NullFields []string `json:"-"`
  1074  }
  1075  
  1076  func (s *Device) MarshalJSON() ([]byte, error) {
  1077  	type NoMethod Device
  1078  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1079  }
  1080  
  1081  // DeviceReport: Device report updated with the latest app states for managed
  1082  // apps on the device.
  1083  type DeviceReport struct {
  1084  	// AppState: List of app states set by managed apps on the device. App states
  1085  	// are defined by the app's developers. This field will always be present.
  1086  	AppState []*AppState `json:"appState,omitempty"`
  1087  	// LastUpdatedTimestampMillis: The timestamp of the last report update in
  1088  	// milliseconds since epoch. This field will always be present.
  1089  	LastUpdatedTimestampMillis int64 `json:"lastUpdatedTimestampMillis,omitempty,string"`
  1090  	// ForceSendFields is a list of field names (e.g. "AppState") to
  1091  	// unconditionally include in API requests. By default, fields with empty or
  1092  	// default values are omitted from API requests. See
  1093  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1094  	// details.
  1095  	ForceSendFields []string `json:"-"`
  1096  	// NullFields is a list of field names (e.g. "AppState") to include in API
  1097  	// requests with the JSON null value. By default, fields with empty values are
  1098  	// omitted from API requests. See
  1099  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1100  	NullFields []string `json:"-"`
  1101  }
  1102  
  1103  func (s *DeviceReport) MarshalJSON() ([]byte, error) {
  1104  	type NoMethod DeviceReport
  1105  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1106  }
  1107  
  1108  // DeviceReportUpdateEvent: An event generated when an updated device report is
  1109  // available.
  1110  type DeviceReportUpdateEvent struct {
  1111  	// DeviceId: The Android ID of the device. This field will always be present.
  1112  	DeviceId string `json:"deviceId,omitempty"`
  1113  	// Report: The device report updated with the latest app states. This field
  1114  	// will always be present.
  1115  	Report *DeviceReport `json:"report,omitempty"`
  1116  	// UserId: The ID of the user. This field will always be present.
  1117  	UserId string `json:"userId,omitempty"`
  1118  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
  1119  	// unconditionally include in API requests. By default, fields with empty or
  1120  	// default values are omitted from API requests. See
  1121  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1122  	// details.
  1123  	ForceSendFields []string `json:"-"`
  1124  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
  1125  	// requests with the JSON null value. By default, fields with empty values are
  1126  	// omitted from API requests. See
  1127  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1128  	NullFields []string `json:"-"`
  1129  }
  1130  
  1131  func (s *DeviceReportUpdateEvent) MarshalJSON() ([]byte, error) {
  1132  	type NoMethod DeviceReportUpdateEvent
  1133  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1134  }
  1135  
  1136  // DeviceState: The state of a user's device, as accessed by the getState and
  1137  // setState methods on device resources.
  1138  type DeviceState struct {
  1139  	// AccountState: The state of the Google account on the device. "enabled"
  1140  	// indicates that the Google account on the device can be used to access Google
  1141  	// services (including Google Play), while "disabled" means that it cannot. A
  1142  	// new device is initially in the "disabled" state.
  1143  	//
  1144  	// Possible values:
  1145  	//   "enabled"
  1146  	//   "disabled"
  1147  	AccountState string `json:"accountState,omitempty"`
  1148  
  1149  	// ServerResponse contains the HTTP response code and headers from the server.
  1150  	googleapi.ServerResponse `json:"-"`
  1151  	// ForceSendFields is a list of field names (e.g. "AccountState") to
  1152  	// unconditionally include in API requests. By default, fields with empty or
  1153  	// default values are omitted from API requests. See
  1154  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1155  	// details.
  1156  	ForceSendFields []string `json:"-"`
  1157  	// NullFields is a list of field names (e.g. "AccountState") to include in API
  1158  	// requests with the JSON null value. By default, fields with empty values are
  1159  	// omitted from API requests. See
  1160  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1161  	NullFields []string `json:"-"`
  1162  }
  1163  
  1164  func (s *DeviceState) MarshalJSON() ([]byte, error) {
  1165  	type NoMethod DeviceState
  1166  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1167  }
  1168  
  1169  type DevicesListResponse struct {
  1170  	// Device: A managed device.
  1171  	Device []*Device `json:"device,omitempty"`
  1172  
  1173  	// ServerResponse contains the HTTP response code and headers from the server.
  1174  	googleapi.ServerResponse `json:"-"`
  1175  	// ForceSendFields is a list of field names (e.g. "Device") to unconditionally
  1176  	// include in API requests. By default, fields with empty or default values are
  1177  	// omitted from API requests. See
  1178  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1179  	// details.
  1180  	ForceSendFields []string `json:"-"`
  1181  	// NullFields is a list of field names (e.g. "Device") to include in API
  1182  	// requests with the JSON null value. By default, fields with empty values are
  1183  	// omitted from API requests. See
  1184  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1185  	NullFields []string `json:"-"`
  1186  }
  1187  
  1188  func (s *DevicesListResponse) MarshalJSON() ([]byte, error) {
  1189  	type NoMethod DevicesListResponse
  1190  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1191  }
  1192  
  1193  // Enterprise: An Enterprises resource represents the binding between an EMM
  1194  // and a specific organization. That binding can be instantiated in one of two
  1195  // different ways using this API as follows: - For Google managed domain
  1196  // customers, the process involves using Enterprises.enroll and
  1197  // Enterprises.setAccount (in conjunction with artifacts obtained from the
  1198  // Admin console and the Google API Console) and submitted to the EMM through a
  1199  // more-or-less manual process. - For managed Google Play Accounts customers,
  1200  // the process involves using Enterprises.generateSignupUrl and
  1201  // Enterprises.completeSignup in conjunction with the managed Google Play
  1202  // sign-up UI (Google-provided mechanism) to create the binding without manual
  1203  // steps. As an EMM, you can support either or both approaches in your EMM
  1204  // console. See Create an Enterprise for details.
  1205  type Enterprise struct {
  1206  	// Administrator: Admins of the enterprise. This is only supported for
  1207  	// enterprises created via the EMM-initiated flow.
  1208  	Administrator []*Administrator `json:"administrator,omitempty"`
  1209  	// GoogleAuthenticationSettings: Output only. Settings for Google-provided user
  1210  	// authentication.
  1211  	GoogleAuthenticationSettings *GoogleAuthenticationSettings `json:"googleAuthenticationSettings,omitempty"`
  1212  	// Id: The unique ID for the enterprise.
  1213  	Id string `json:"id,omitempty"`
  1214  	// Name: The name of the enterprise, for example, "Example, Inc".
  1215  	Name string `json:"name,omitempty"`
  1216  	// PrimaryDomain: The enterprise's primary domain, such as "example.com".
  1217  	PrimaryDomain string `json:"primaryDomain,omitempty"`
  1218  
  1219  	// ServerResponse contains the HTTP response code and headers from the server.
  1220  	googleapi.ServerResponse `json:"-"`
  1221  	// ForceSendFields is a list of field names (e.g. "Administrator") to
  1222  	// unconditionally include in API requests. By default, fields with empty or
  1223  	// default values are omitted from API requests. See
  1224  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1225  	// details.
  1226  	ForceSendFields []string `json:"-"`
  1227  	// NullFields is a list of field names (e.g. "Administrator") to include in API
  1228  	// requests with the JSON null value. By default, fields with empty values are
  1229  	// omitted from API requests. See
  1230  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1231  	NullFields []string `json:"-"`
  1232  }
  1233  
  1234  func (s *Enterprise) MarshalJSON() ([]byte, error) {
  1235  	type NoMethod Enterprise
  1236  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1237  }
  1238  
  1239  // EnterpriseAccount: A service account that can be used to authenticate as the
  1240  // enterprise to API calls that require such authentication.
  1241  type EnterpriseAccount struct {
  1242  	// AccountEmail: The email address of the service account.
  1243  	AccountEmail string `json:"accountEmail,omitempty"`
  1244  
  1245  	// ServerResponse contains the HTTP response code and headers from the server.
  1246  	googleapi.ServerResponse `json:"-"`
  1247  	// ForceSendFields is a list of field names (e.g. "AccountEmail") to
  1248  	// unconditionally include in API requests. By default, fields with empty or
  1249  	// default values are omitted from API requests. See
  1250  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1251  	// details.
  1252  	ForceSendFields []string `json:"-"`
  1253  	// NullFields is a list of field names (e.g. "AccountEmail") to include in API
  1254  	// requests with the JSON null value. By default, fields with empty values are
  1255  	// omitted from API requests. See
  1256  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1257  	NullFields []string `json:"-"`
  1258  }
  1259  
  1260  func (s *EnterpriseAccount) MarshalJSON() ([]byte, error) {
  1261  	type NoMethod EnterpriseAccount
  1262  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1263  }
  1264  
  1265  // EnterpriseAuthenticationAppLinkConfig: An authentication URL configuration
  1266  // for the authenticator app of an identity provider.
  1267  type EnterpriseAuthenticationAppLinkConfig struct {
  1268  	// Uri: An authentication url.
  1269  	Uri string `json:"uri,omitempty"`
  1270  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1271  	// include in API requests. By default, fields with empty or default values are
  1272  	// omitted from API requests. See
  1273  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1274  	// details.
  1275  	ForceSendFields []string `json:"-"`
  1276  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1277  	// with the JSON null value. By default, fields with empty values are omitted
  1278  	// from API requests. See
  1279  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1280  	NullFields []string `json:"-"`
  1281  }
  1282  
  1283  func (s *EnterpriseAuthenticationAppLinkConfig) MarshalJSON() ([]byte, error) {
  1284  	type NoMethod EnterpriseAuthenticationAppLinkConfig
  1285  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1286  }
  1287  
  1288  type EnterprisesListResponse struct {
  1289  	// Enterprise: An enterprise.
  1290  	Enterprise []*Enterprise `json:"enterprise,omitempty"`
  1291  
  1292  	// ServerResponse contains the HTTP response code and headers from the server.
  1293  	googleapi.ServerResponse `json:"-"`
  1294  	// ForceSendFields is a list of field names (e.g. "Enterprise") to
  1295  	// unconditionally include in API requests. By default, fields with empty or
  1296  	// default values are omitted from API requests. See
  1297  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1298  	// details.
  1299  	ForceSendFields []string `json:"-"`
  1300  	// NullFields is a list of field names (e.g. "Enterprise") to include in API
  1301  	// requests with the JSON null value. By default, fields with empty values are
  1302  	// omitted from API requests. See
  1303  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1304  	NullFields []string `json:"-"`
  1305  }
  1306  
  1307  func (s *EnterprisesListResponse) MarshalJSON() ([]byte, error) {
  1308  	type NoMethod EnterprisesListResponse
  1309  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1310  }
  1311  
  1312  type EnterprisesSendTestPushNotificationResponse struct {
  1313  	// MessageId: The message ID of the test push notification that was sent.
  1314  	MessageId string `json:"messageId,omitempty"`
  1315  	// TopicName: The name of the Cloud Pub/Sub topic to which notifications for
  1316  	// this enterprise's enrolled account will be sent.
  1317  	TopicName string `json:"topicName,omitempty"`
  1318  
  1319  	// ServerResponse contains the HTTP response code and headers from the server.
  1320  	googleapi.ServerResponse `json:"-"`
  1321  	// ForceSendFields is a list of field names (e.g. "MessageId") to
  1322  	// unconditionally include in API requests. By default, fields with empty or
  1323  	// default values are omitted from API requests. See
  1324  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1325  	// details.
  1326  	ForceSendFields []string `json:"-"`
  1327  	// NullFields is a list of field names (e.g. "MessageId") to include in API
  1328  	// requests with the JSON null value. By default, fields with empty values are
  1329  	// omitted from API requests. See
  1330  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1331  	NullFields []string `json:"-"`
  1332  }
  1333  
  1334  func (s *EnterprisesSendTestPushNotificationResponse) MarshalJSON() ([]byte, error) {
  1335  	type NoMethod EnterprisesSendTestPushNotificationResponse
  1336  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1337  }
  1338  
  1339  // Entitlement: The presence of an Entitlements resource indicates that a user
  1340  // has the right to use a particular app. Entitlements are user specific, not
  1341  // device specific. This allows a user with an entitlement to an app to install
  1342  // the app on all their devices. It's also possible for a user to hold an
  1343  // entitlement to an app without installing the app on any device. The API can
  1344  // be used to create an entitlement. As an option, you can also use the API to
  1345  // trigger the installation of an app on all a user's managed devices at the
  1346  // same time the entitlement is created. If the app is free, creating the
  1347  // entitlement also creates a group license for that app. For paid apps,
  1348  // creating the entitlement consumes one license, and that license remains
  1349  // consumed until the entitlement is removed. If the enterprise hasn't
  1350  // purchased enough licenses, then no entitlement is created and the
  1351  // installation fails. An entitlement is also not created for an app if the app
  1352  // requires permissions that the enterprise hasn't accepted. If an entitlement
  1353  // is deleted, the app may be uninstalled from a user's device. As a best
  1354  // practice, uninstall the app by calling Installs.delete() before deleting the
  1355  // entitlement. Entitlements for apps that a user pays for on an unmanaged
  1356  // profile have "userPurchase" as the entitlement reason. These entitlements
  1357  // cannot be removed via the API.
  1358  type Entitlement struct {
  1359  	// ProductId: The ID of the product that the entitlement is for. For example,
  1360  	// "app:com.google.android.gm".
  1361  	ProductId string `json:"productId,omitempty"`
  1362  	// Reason: The reason for the entitlement. For example, "free" for free apps.
  1363  	// This property is temporary: it will be replaced by the acquisition kind
  1364  	// field of group licenses.
  1365  	//
  1366  	// Possible values:
  1367  	//   "free"
  1368  	//   "groupLicense"
  1369  	//   "userPurchase"
  1370  	Reason string `json:"reason,omitempty"`
  1371  
  1372  	// ServerResponse contains the HTTP response code and headers from the server.
  1373  	googleapi.ServerResponse `json:"-"`
  1374  	// ForceSendFields is a list of field names (e.g. "ProductId") to
  1375  	// unconditionally include in API requests. By default, fields with empty or
  1376  	// default values are omitted from API requests. See
  1377  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1378  	// details.
  1379  	ForceSendFields []string `json:"-"`
  1380  	// NullFields is a list of field names (e.g. "ProductId") to include in API
  1381  	// requests with the JSON null value. By default, fields with empty values are
  1382  	// omitted from API requests. See
  1383  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1384  	NullFields []string `json:"-"`
  1385  }
  1386  
  1387  func (s *Entitlement) MarshalJSON() ([]byte, error) {
  1388  	type NoMethod Entitlement
  1389  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1390  }
  1391  
  1392  type EntitlementsListResponse struct {
  1393  	// Entitlement: An entitlement of a user to a product (e.g. an app). For
  1394  	// example, a free app that they have installed, or a paid app that they have
  1395  	// been allocated a license to.
  1396  	Entitlement []*Entitlement `json:"entitlement,omitempty"`
  1397  
  1398  	// ServerResponse contains the HTTP response code and headers from the server.
  1399  	googleapi.ServerResponse `json:"-"`
  1400  	// ForceSendFields is a list of field names (e.g. "Entitlement") to
  1401  	// unconditionally include in API requests. By default, fields with empty or
  1402  	// default values are omitted from API requests. See
  1403  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1404  	// details.
  1405  	ForceSendFields []string `json:"-"`
  1406  	// NullFields is a list of field names (e.g. "Entitlement") to include in API
  1407  	// requests with the JSON null value. By default, fields with empty values are
  1408  	// omitted from API requests. See
  1409  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1410  	NullFields []string `json:"-"`
  1411  }
  1412  
  1413  func (s *EntitlementsListResponse) MarshalJSON() ([]byte, error) {
  1414  	type NoMethod EntitlementsListResponse
  1415  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1416  }
  1417  
  1418  // GoogleAuthenticationSettings: Contains settings for Google-provided user
  1419  // authentication.
  1420  type GoogleAuthenticationSettings struct {
  1421  	// DedicatedDevicesAllowed: Whether dedicated devices are allowed.
  1422  	//
  1423  	// Possible values:
  1424  	//   "dedicatedDevicesAllowedUnspecified" - This value is unused.
  1425  	//   "disallowed" - Dedicated devices are not allowed.
  1426  	//   "allowed" - Dedicated devices are allowed.
  1427  	DedicatedDevicesAllowed string `json:"dedicatedDevicesAllowed,omitempty"`
  1428  	// GoogleAuthenticationRequired: Whether Google authentication is required.
  1429  	//
  1430  	// Possible values:
  1431  	//   "googleAuthenticationRequiredUnspecified" - This value is unused.
  1432  	//   "notRequired" - Google authentication is not required.
  1433  	//   "required" - User is required to be successfully authenticated by Google.
  1434  	GoogleAuthenticationRequired string `json:"googleAuthenticationRequired,omitempty"`
  1435  	// ForceSendFields is a list of field names (e.g. "DedicatedDevicesAllowed") to
  1436  	// unconditionally include in API requests. By default, fields with empty or
  1437  	// default values are omitted from API requests. See
  1438  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1439  	// details.
  1440  	ForceSendFields []string `json:"-"`
  1441  	// NullFields is a list of field names (e.g. "DedicatedDevicesAllowed") to
  1442  	// include in API requests with the JSON null value. By default, fields with
  1443  	// empty values are omitted from API requests. See
  1444  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1445  	NullFields []string `json:"-"`
  1446  }
  1447  
  1448  func (s *GoogleAuthenticationSettings) MarshalJSON() ([]byte, error) {
  1449  	type NoMethod GoogleAuthenticationSettings
  1450  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1451  }
  1452  
  1453  // GroupLicense: Group license objects allow you to keep track of licenses
  1454  // (called entitlements) for both free and paid apps. For a free app, a group
  1455  // license is created when an enterprise admin first approves the product in
  1456  // Google Play or when the first entitlement for the product is created for a
  1457  // user via the API. For a paid app, a group license object is only created
  1458  // when an enterprise admin purchases the product in Google Play for the first
  1459  // time. Use the API to query group licenses. A Grouplicenses resource includes
  1460  // the total number of licenses purchased (paid apps only) and the total number
  1461  // of licenses currently in use. In other words, the total number of
  1462  // Entitlements that exist for the product. Only one group license object is
  1463  // created per product and group license objects are never deleted. If a
  1464  // product is unapproved, its group license remains. This allows enterprise
  1465  // admins to keep track of any remaining entitlements for the product.
  1466  type GroupLicense struct {
  1467  	// AcquisitionKind: How this group license was acquired. "bulkPurchase" means
  1468  	// that this Grouplicenses resource was created because the enterprise
  1469  	// purchased licenses for this product; otherwise, the value is "free" (for
  1470  	// free products).
  1471  	//
  1472  	// Possible values:
  1473  	//   "free"
  1474  	//   "bulkPurchase"
  1475  	AcquisitionKind string `json:"acquisitionKind,omitempty"`
  1476  	// Approval: Whether the product to which this group license relates is
  1477  	// currently approved by the enterprise. Products are approved when a group
  1478  	// license is first created, but this approval may be revoked by an enterprise
  1479  	// admin via Google Play. Unapproved products will not be visible to end users
  1480  	// in collections, and new entitlements to them should not normally be created.
  1481  	//
  1482  	// Possible values:
  1483  	//   "approved"
  1484  	//   "unapproved"
  1485  	Approval string `json:"approval,omitempty"`
  1486  	// NumProvisioned: The total number of provisioned licenses for this product.
  1487  	// Returned by read operations, but ignored in write operations.
  1488  	NumProvisioned int64 `json:"numProvisioned,omitempty"`
  1489  	// NumPurchased: The number of purchased licenses (possibly in multiple
  1490  	// purchases). If this field is omitted, then there is no limit on the number
  1491  	// of licenses that can be provisioned (for example, if the acquisition kind is
  1492  	// "free").
  1493  	NumPurchased int64 `json:"numPurchased,omitempty"`
  1494  	// Permissions: The permission approval status of the product. This field is
  1495  	// only set if the product is approved. Possible states are: -
  1496  	// "currentApproved", the current set of permissions is approved, but
  1497  	// additional permissions will require the administrator to reapprove the
  1498  	// product (If the product was approved without specifying the approved
  1499  	// permissions setting, then this is the default behavior.), -
  1500  	// "needsReapproval", the product has unapproved permissions. No additional
  1501  	// product licenses can be assigned until the product is reapproved, -
  1502  	// "allCurrentAndFutureApproved", the current permissions are approved and any
  1503  	// future permission updates will be automatically approved without
  1504  	// administrator review.
  1505  	//
  1506  	// Possible values:
  1507  	//   "currentApproved"
  1508  	//   "needsReapproval"
  1509  	//   "allCurrentAndFutureApproved"
  1510  	Permissions string `json:"permissions,omitempty"`
  1511  	// ProductId: The ID of the product that the license is for. For example,
  1512  	// "app:com.google.android.gm".
  1513  	ProductId string `json:"productId,omitempty"`
  1514  
  1515  	// ServerResponse contains the HTTP response code and headers from the server.
  1516  	googleapi.ServerResponse `json:"-"`
  1517  	// ForceSendFields is a list of field names (e.g. "AcquisitionKind") to
  1518  	// unconditionally include in API requests. By default, fields with empty or
  1519  	// default values are omitted from API requests. See
  1520  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1521  	// details.
  1522  	ForceSendFields []string `json:"-"`
  1523  	// NullFields is a list of field names (e.g. "AcquisitionKind") to include in
  1524  	// API requests with the JSON null value. By default, fields with empty values
  1525  	// are omitted from API requests. See
  1526  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1527  	NullFields []string `json:"-"`
  1528  }
  1529  
  1530  func (s *GroupLicense) MarshalJSON() ([]byte, error) {
  1531  	type NoMethod GroupLicense
  1532  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1533  }
  1534  
  1535  type GroupLicenseUsersListResponse struct {
  1536  	// User: A user of an enterprise.
  1537  	User []*User `json:"user,omitempty"`
  1538  
  1539  	// ServerResponse contains the HTTP response code and headers from the server.
  1540  	googleapi.ServerResponse `json:"-"`
  1541  	// ForceSendFields is a list of field names (e.g. "User") to unconditionally
  1542  	// include in API requests. By default, fields with empty or default values are
  1543  	// omitted from API requests. See
  1544  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1545  	// details.
  1546  	ForceSendFields []string `json:"-"`
  1547  	// NullFields is a list of field names (e.g. "User") to include in API requests
  1548  	// with the JSON null value. By default, fields with empty values are omitted
  1549  	// from API requests. See
  1550  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1551  	NullFields []string `json:"-"`
  1552  }
  1553  
  1554  func (s *GroupLicenseUsersListResponse) MarshalJSON() ([]byte, error) {
  1555  	type NoMethod GroupLicenseUsersListResponse
  1556  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1557  }
  1558  
  1559  type GroupLicensesListResponse struct {
  1560  	// GroupLicense: A group license for a product approved for use in the
  1561  	// enterprise.
  1562  	GroupLicense []*GroupLicense `json:"groupLicense,omitempty"`
  1563  
  1564  	// ServerResponse contains the HTTP response code and headers from the server.
  1565  	googleapi.ServerResponse `json:"-"`
  1566  	// ForceSendFields is a list of field names (e.g. "GroupLicense") to
  1567  	// unconditionally include in API requests. By default, fields with empty or
  1568  	// default values are omitted from API requests. See
  1569  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1570  	// details.
  1571  	ForceSendFields []string `json:"-"`
  1572  	// NullFields is a list of field names (e.g. "GroupLicense") to include in API
  1573  	// requests with the JSON null value. By default, fields with empty values are
  1574  	// omitted from API requests. See
  1575  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1576  	NullFields []string `json:"-"`
  1577  }
  1578  
  1579  func (s *GroupLicensesListResponse) MarshalJSON() ([]byte, error) {
  1580  	type NoMethod GroupLicensesListResponse
  1581  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1582  }
  1583  
  1584  // Install: The existence of an Installs resource indicates that an app is
  1585  // installed on a particular device (or that an install is pending). The API
  1586  // can be used to create an install resource using the update method. This
  1587  // triggers the actual install of the app on the device. If the user does not
  1588  // already have an entitlement for the app, then an attempt is made to create
  1589  // one. If this fails (for example, because the app is not free and there is no
  1590  // available license), then the creation of the install fails. The API can also
  1591  // be used to update an installed app. If the update method is used on an
  1592  // existing install, then the app will be updated to the latest available
  1593  // version. Note that it is not possible to force the installation of a
  1594  // specific version of an app: the version code is read-only. If a user
  1595  // installs an app themselves (as permitted by the enterprise), then again an
  1596  // install resource and possibly an entitlement resource are automatically
  1597  // created. The API can also be used to delete an install resource, which
  1598  // triggers the removal of the app from the device. Note that deleting an
  1599  // install does not automatically remove the corresponding entitlement, even if
  1600  // there are no remaining installs. The install resource will also be deleted
  1601  // if the user uninstalls the app themselves.
  1602  type Install struct {
  1603  	// InstallState: Install state. The state "installPending" means that an
  1604  	// install request has recently been made and download to the device is in
  1605  	// progress. The state "installed" means that the app has been installed. This
  1606  	// field is read-only.
  1607  	//
  1608  	// Possible values:
  1609  	//   "installed"
  1610  	//   "installPending"
  1611  	InstallState string `json:"installState,omitempty"`
  1612  	// ProductId: The ID of the product that the install is for. For example,
  1613  	// "app:com.google.android.gm".
  1614  	ProductId string `json:"productId,omitempty"`
  1615  	// VersionCode: The version of the installed product. Guaranteed to be set only
  1616  	// if the install state is "installed".
  1617  	VersionCode int64 `json:"versionCode,omitempty"`
  1618  
  1619  	// ServerResponse contains the HTTP response code and headers from the server.
  1620  	googleapi.ServerResponse `json:"-"`
  1621  	// ForceSendFields is a list of field names (e.g. "InstallState") to
  1622  	// unconditionally include in API requests. By default, fields with empty or
  1623  	// default values are omitted from API requests. See
  1624  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1625  	// details.
  1626  	ForceSendFields []string `json:"-"`
  1627  	// NullFields is a list of field names (e.g. "InstallState") to include in API
  1628  	// requests with the JSON null value. By default, fields with empty values are
  1629  	// omitted from API requests. See
  1630  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1631  	NullFields []string `json:"-"`
  1632  }
  1633  
  1634  func (s *Install) MarshalJSON() ([]byte, error) {
  1635  	type NoMethod Install
  1636  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1637  }
  1638  
  1639  // InstallFailureEvent: An event generated when an app installation failed on a
  1640  // device
  1641  type InstallFailureEvent struct {
  1642  	// DeviceId: The Android ID of the device. This field will always be present.
  1643  	DeviceId string `json:"deviceId,omitempty"`
  1644  	// FailureDetails: Additional details on the failure if applicable.
  1645  	FailureDetails string `json:"failureDetails,omitempty"`
  1646  	// FailureReason: The reason for the installation failure. This field will
  1647  	// always be present.
  1648  	//
  1649  	// Possible values:
  1650  	//   "unknown" - Used whenever no better reason for failure can be provided.
  1651  	//   "timeout" - Used when the installation timed out. This can cover a number
  1652  	// of situations, for example when the device did not have connectivity at any
  1653  	// point during the retry period, or if the device is OOM.
  1654  	FailureReason string `json:"failureReason,omitempty"`
  1655  	// ProductId: The id of the product (e.g. "app:com.google.android.gm") for
  1656  	// which the install failure event occured. This field will always be present.
  1657  	ProductId string `json:"productId,omitempty"`
  1658  	// UserId: The ID of the user. This field will always be present.
  1659  	UserId string `json:"userId,omitempty"`
  1660  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
  1661  	// unconditionally include in API requests. By default, fields with empty or
  1662  	// default values are omitted from API requests. See
  1663  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1664  	// details.
  1665  	ForceSendFields []string `json:"-"`
  1666  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
  1667  	// requests with the JSON null value. By default, fields with empty values are
  1668  	// omitted from API requests. See
  1669  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1670  	NullFields []string `json:"-"`
  1671  }
  1672  
  1673  func (s *InstallFailureEvent) MarshalJSON() ([]byte, error) {
  1674  	type NoMethod InstallFailureEvent
  1675  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1676  }
  1677  
  1678  type InstallsListResponse struct {
  1679  	// Install: An installation of an app for a user on a specific device. The
  1680  	// existence of an install implies that the user must have an entitlement to
  1681  	// the app.
  1682  	Install []*Install `json:"install,omitempty"`
  1683  
  1684  	// ServerResponse contains the HTTP response code and headers from the server.
  1685  	googleapi.ServerResponse `json:"-"`
  1686  	// ForceSendFields is a list of field names (e.g. "Install") to unconditionally
  1687  	// include in API requests. By default, fields with empty or default values are
  1688  	// omitted from API requests. See
  1689  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1690  	// details.
  1691  	ForceSendFields []string `json:"-"`
  1692  	// NullFields is a list of field names (e.g. "Install") to include in API
  1693  	// requests with the JSON null value. By default, fields with empty values are
  1694  	// omitted from API requests. See
  1695  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1696  	NullFields []string `json:"-"`
  1697  }
  1698  
  1699  func (s *InstallsListResponse) MarshalJSON() ([]byte, error) {
  1700  	type NoMethod InstallsListResponse
  1701  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1702  }
  1703  
  1704  // KeyedAppState: Represents a keyed app state containing a key, timestamp,
  1705  // severity level, optional description, and optional data.
  1706  type KeyedAppState struct {
  1707  	// Data: Additional field intended for machine-readable data. For example, a
  1708  	// number or JSON object. To prevent XSS, we recommend removing any HTML from
  1709  	// the data before displaying it.
  1710  	Data string `json:"data,omitempty"`
  1711  	// Key: Key indicating what the app is providing a state for. The content of
  1712  	// the key is set by the app's developer. To prevent XSS, we recommend removing
  1713  	// any HTML from the key before displaying it. This field will always be
  1714  	// present.
  1715  	Key string `json:"key,omitempty"`
  1716  	// Message: Free-form, human-readable message describing the app state. For
  1717  	// example, an error message. To prevent XSS, we recommend removing any HTML
  1718  	// from the message before displaying it.
  1719  	Message string `json:"message,omitempty"`
  1720  	// Severity: Severity of the app state. This field will always be present.
  1721  	//
  1722  	// Possible values:
  1723  	//   "severityUnknown"
  1724  	//   "severityInfo"
  1725  	//   "severityError"
  1726  	Severity string `json:"severity,omitempty"`
  1727  	// StateTimestampMillis: Timestamp of when the app set the state in
  1728  	// milliseconds since epoch. This field will always be present.
  1729  	StateTimestampMillis int64 `json:"stateTimestampMillis,omitempty,string"`
  1730  	// ForceSendFields is a list of field names (e.g. "Data") to unconditionally
  1731  	// include in API requests. By default, fields with empty or default values are
  1732  	// omitted from API requests. See
  1733  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1734  	// details.
  1735  	ForceSendFields []string `json:"-"`
  1736  	// NullFields is a list of field names (e.g. "Data") to include in API requests
  1737  	// with the JSON null value. By default, fields with empty values are omitted
  1738  	// from API requests. See
  1739  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1740  	NullFields []string `json:"-"`
  1741  }
  1742  
  1743  func (s *KeyedAppState) MarshalJSON() ([]byte, error) {
  1744  	type NoMethod KeyedAppState
  1745  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1746  }
  1747  
  1748  // LocalizedText: A localized string with its locale.
  1749  type LocalizedText struct {
  1750  	// Locale: The BCP47 tag for a locale. (e.g. "en-US", "de").
  1751  	Locale string `json:"locale,omitempty"`
  1752  	// Text: The text localized in the associated locale.
  1753  	Text string `json:"text,omitempty"`
  1754  	// ForceSendFields is a list of field names (e.g. "Locale") to unconditionally
  1755  	// include in API requests. By default, fields with empty or default values are
  1756  	// omitted from API requests. See
  1757  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1758  	// details.
  1759  	ForceSendFields []string `json:"-"`
  1760  	// NullFields is a list of field names (e.g. "Locale") to include in API
  1761  	// requests with the JSON null value. By default, fields with empty values are
  1762  	// omitted from API requests. See
  1763  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1764  	NullFields []string `json:"-"`
  1765  }
  1766  
  1767  func (s *LocalizedText) MarshalJSON() ([]byte, error) {
  1768  	type NoMethod LocalizedText
  1769  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1770  }
  1771  
  1772  // MaintenanceWindow: Maintenance window for managed Google Play Accounts. This
  1773  // allows Play store to update the apps on the foreground in the designated
  1774  // window.
  1775  type MaintenanceWindow struct {
  1776  	// DurationMs: Duration of the maintenance window, in milliseconds. The
  1777  	// duration must be between 30 minutes and 24 hours (inclusive).
  1778  	DurationMs int64 `json:"durationMs,omitempty,string"`
  1779  	// StartTimeAfterMidnightMs: Start time of the maintenance window, in
  1780  	// milliseconds after midnight on the device. Windows can span midnight.
  1781  	StartTimeAfterMidnightMs int64 `json:"startTimeAfterMidnightMs,omitempty,string"`
  1782  	// ForceSendFields is a list of field names (e.g. "DurationMs") to
  1783  	// unconditionally include in API requests. By default, fields with empty or
  1784  	// default values are omitted from API requests. See
  1785  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1786  	// details.
  1787  	ForceSendFields []string `json:"-"`
  1788  	// NullFields is a list of field names (e.g. "DurationMs") to include in API
  1789  	// requests with the JSON null value. By default, fields with empty values are
  1790  	// omitted from API requests. See
  1791  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1792  	NullFields []string `json:"-"`
  1793  }
  1794  
  1795  func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
  1796  	type NoMethod MaintenanceWindow
  1797  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1798  }
  1799  
  1800  // ManagedConfiguration: A managed configuration resource contains the set of
  1801  // managed properties defined by the app developer in the app's managed
  1802  // configurations schema, as well as any configuration variables defined for
  1803  // the user.
  1804  type ManagedConfiguration struct {
  1805  	// ConfigurationVariables: Contains the ID of the managed configuration profile
  1806  	// and the set of configuration variables (if any) defined for the user.
  1807  	ConfigurationVariables *ConfigurationVariables `json:"configurationVariables,omitempty"`
  1808  	// Kind: Deprecated.
  1809  	Kind string `json:"kind,omitempty"`
  1810  	// ManagedProperty: The set of managed properties for this configuration.
  1811  	ManagedProperty []*ManagedProperty `json:"managedProperty,omitempty"`
  1812  	// ProductId: The ID of the product that the managed configuration is for, e.g.
  1813  	// "app:com.google.android.gm".
  1814  	ProductId string `json:"productId,omitempty"`
  1815  
  1816  	// ServerResponse contains the HTTP response code and headers from the server.
  1817  	googleapi.ServerResponse `json:"-"`
  1818  	// ForceSendFields is a list of field names (e.g. "ConfigurationVariables") to
  1819  	// unconditionally include in API requests. By default, fields with empty or
  1820  	// default values are omitted from API requests. See
  1821  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1822  	// details.
  1823  	ForceSendFields []string `json:"-"`
  1824  	// NullFields is a list of field names (e.g. "ConfigurationVariables") to
  1825  	// include in API requests with the JSON null value. By default, fields with
  1826  	// empty values are omitted from API requests. See
  1827  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1828  	NullFields []string `json:"-"`
  1829  }
  1830  
  1831  func (s *ManagedConfiguration) MarshalJSON() ([]byte, error) {
  1832  	type NoMethod ManagedConfiguration
  1833  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1834  }
  1835  
  1836  type ManagedConfigurationsForDeviceListResponse struct {
  1837  	// ManagedConfigurationForDevice: A managed configuration for an app on a
  1838  	// specific device.
  1839  	ManagedConfigurationForDevice []*ManagedConfiguration `json:"managedConfigurationForDevice,omitempty"`
  1840  
  1841  	// ServerResponse contains the HTTP response code and headers from the server.
  1842  	googleapi.ServerResponse `json:"-"`
  1843  	// ForceSendFields is a list of field names (e.g.
  1844  	// "ManagedConfigurationForDevice") to unconditionally include in API requests.
  1845  	// By default, fields with empty or default values are omitted from API
  1846  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  1847  	// for more details.
  1848  	ForceSendFields []string `json:"-"`
  1849  	// NullFields is a list of field names (e.g. "ManagedConfigurationForDevice")
  1850  	// to include in API requests with the JSON null value. By default, fields with
  1851  	// empty values are omitted from API requests. See
  1852  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1853  	NullFields []string `json:"-"`
  1854  }
  1855  
  1856  func (s *ManagedConfigurationsForDeviceListResponse) MarshalJSON() ([]byte, error) {
  1857  	type NoMethod ManagedConfigurationsForDeviceListResponse
  1858  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1859  }
  1860  
  1861  type ManagedConfigurationsForUserListResponse struct {
  1862  	// ManagedConfigurationForUser: A managed configuration for an app for a
  1863  	// specific user.
  1864  	ManagedConfigurationForUser []*ManagedConfiguration `json:"managedConfigurationForUser,omitempty"`
  1865  
  1866  	// ServerResponse contains the HTTP response code and headers from the server.
  1867  	googleapi.ServerResponse `json:"-"`
  1868  	// ForceSendFields is a list of field names (e.g.
  1869  	// "ManagedConfigurationForUser") to unconditionally include in API requests.
  1870  	// By default, fields with empty or default values are omitted from API
  1871  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  1872  	// for more details.
  1873  	ForceSendFields []string `json:"-"`
  1874  	// NullFields is a list of field names (e.g. "ManagedConfigurationForUser") to
  1875  	// include in API requests with the JSON null value. By default, fields with
  1876  	// empty values are omitted from API requests. See
  1877  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1878  	NullFields []string `json:"-"`
  1879  }
  1880  
  1881  func (s *ManagedConfigurationsForUserListResponse) MarshalJSON() ([]byte, error) {
  1882  	type NoMethod ManagedConfigurationsForUserListResponse
  1883  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1884  }
  1885  
  1886  // ManagedConfigurationsSettings: A managed configurations settings resource
  1887  // contains the set of managed properties that have been configured for an
  1888  // Android app to be applied to a set of users. The app's developer would have
  1889  // defined configurable properties in the managed configurations schema.
  1890  type ManagedConfigurationsSettings struct {
  1891  	// LastUpdatedTimestampMillis: The last updated time of the managed
  1892  	// configuration settings in milliseconds since 1970-01-01T00:00:00Z.
  1893  	LastUpdatedTimestampMillis int64 `json:"lastUpdatedTimestampMillis,omitempty,string"`
  1894  	// McmId: The ID of the managed configurations settings.
  1895  	McmId string `json:"mcmId,omitempty"`
  1896  	// Name: The name of the managed configurations settings.
  1897  	Name string `json:"name,omitempty"`
  1898  	// ForceSendFields is a list of field names (e.g. "LastUpdatedTimestampMillis")
  1899  	// to unconditionally include in API requests. By default, fields with empty or
  1900  	// default values are omitted from API requests. See
  1901  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1902  	// details.
  1903  	ForceSendFields []string `json:"-"`
  1904  	// NullFields is a list of field names (e.g. "LastUpdatedTimestampMillis") to
  1905  	// include in API requests with the JSON null value. By default, fields with
  1906  	// empty values are omitted from API requests. See
  1907  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1908  	NullFields []string `json:"-"`
  1909  }
  1910  
  1911  func (s *ManagedConfigurationsSettings) MarshalJSON() ([]byte, error) {
  1912  	type NoMethod ManagedConfigurationsSettings
  1913  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1914  }
  1915  
  1916  type ManagedConfigurationsSettingsListResponse struct {
  1917  	// ManagedConfigurationsSettings: A managed configurations settings for an app
  1918  	// that may be assigned to a group of users in an enterprise.
  1919  	ManagedConfigurationsSettings []*ManagedConfigurationsSettings `json:"managedConfigurationsSettings,omitempty"`
  1920  
  1921  	// ServerResponse contains the HTTP response code and headers from the server.
  1922  	googleapi.ServerResponse `json:"-"`
  1923  	// ForceSendFields is a list of field names (e.g.
  1924  	// "ManagedConfigurationsSettings") to unconditionally include in API requests.
  1925  	// By default, fields with empty or default values are omitted from API
  1926  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  1927  	// for more details.
  1928  	ForceSendFields []string `json:"-"`
  1929  	// NullFields is a list of field names (e.g. "ManagedConfigurationsSettings")
  1930  	// to include in API requests with the JSON null value. By default, fields with
  1931  	// empty values are omitted from API requests. See
  1932  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1933  	NullFields []string `json:"-"`
  1934  }
  1935  
  1936  func (s *ManagedConfigurationsSettingsListResponse) MarshalJSON() ([]byte, error) {
  1937  	type NoMethod ManagedConfigurationsSettingsListResponse
  1938  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1939  }
  1940  
  1941  // ManagedProperty: A managed property of a managed configuration. The property
  1942  // must match one of the properties in the app restrictions schema of the
  1943  // product. Exactly one of the value fields must be populated, and it must
  1944  // match the property's type in the app restrictions schema.
  1945  type ManagedProperty struct {
  1946  	// Key: The unique key that identifies the property.
  1947  	Key string `json:"key,omitempty"`
  1948  	// ValueBool: The boolean value - this will only be present if type of the
  1949  	// property is bool.
  1950  	ValueBool bool `json:"valueBool,omitempty"`
  1951  	// ValueBundle: The bundle of managed properties - this will only be present if
  1952  	// type of the property is bundle.
  1953  	ValueBundle *ManagedPropertyBundle `json:"valueBundle,omitempty"`
  1954  	// ValueBundleArray: The list of bundles of properties - this will only be
  1955  	// present if type of the property is bundle_array.
  1956  	ValueBundleArray []*ManagedPropertyBundle `json:"valueBundleArray,omitempty"`
  1957  	// ValueInteger: The integer value - this will only be present if type of the
  1958  	// property is integer.
  1959  	ValueInteger int64 `json:"valueInteger,omitempty"`
  1960  	// ValueString: The string value - this will only be present if type of the
  1961  	// property is string, choice or hidden.
  1962  	ValueString string `json:"valueString,omitempty"`
  1963  	// ValueStringArray: The list of string values - this will only be present if
  1964  	// type of the property is multiselect.
  1965  	ValueStringArray []string `json:"valueStringArray,omitempty"`
  1966  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  1967  	// include in API requests. By default, fields with empty or default values are
  1968  	// omitted from API requests. See
  1969  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1970  	// details.
  1971  	ForceSendFields []string `json:"-"`
  1972  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  1973  	// with the JSON null value. By default, fields with empty values are omitted
  1974  	// from API requests. See
  1975  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1976  	NullFields []string `json:"-"`
  1977  }
  1978  
  1979  func (s *ManagedProperty) MarshalJSON() ([]byte, error) {
  1980  	type NoMethod ManagedProperty
  1981  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1982  }
  1983  
  1984  // ManagedPropertyBundle: A bundle of managed properties.
  1985  type ManagedPropertyBundle struct {
  1986  	// ManagedProperty: The list of managed properties.
  1987  	ManagedProperty []*ManagedProperty `json:"managedProperty,omitempty"`
  1988  	// ForceSendFields is a list of field names (e.g. "ManagedProperty") to
  1989  	// unconditionally include in API requests. By default, fields with empty or
  1990  	// default values are omitted from API requests. See
  1991  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1992  	// details.
  1993  	ForceSendFields []string `json:"-"`
  1994  	// NullFields is a list of field names (e.g. "ManagedProperty") to include in
  1995  	// API requests with the JSON null value. By default, fields with empty values
  1996  	// are omitted from API requests. See
  1997  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1998  	NullFields []string `json:"-"`
  1999  }
  2000  
  2001  func (s *ManagedPropertyBundle) MarshalJSON() ([]byte, error) {
  2002  	type NoMethod ManagedPropertyBundle
  2003  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2004  }
  2005  
  2006  // NewDeviceEvent: An event generated when a new device is ready to be managed.
  2007  type NewDeviceEvent struct {
  2008  	// DeviceId: The Android ID of the device. This field will always be present.
  2009  	DeviceId string `json:"deviceId,omitempty"`
  2010  	// DpcPackageName: Policy app on the device.
  2011  	DpcPackageName string `json:"dpcPackageName,omitempty"`
  2012  	// ManagementType: Identifies the extent to which the device is controlled by
  2013  	// an Android EMM in various deployment configurations. Possible values
  2014  	// include: - "managedDevice", a device where the DPC is set as device owner, -
  2015  	// "managedProfile", a device where the DPC is set as profile owner.
  2016  	//
  2017  	// Possible values:
  2018  	//   "managedDevice"
  2019  	//   "managedProfile"
  2020  	ManagementType string `json:"managementType,omitempty"`
  2021  	// UserId: The ID of the user. This field will always be present.
  2022  	UserId string `json:"userId,omitempty"`
  2023  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
  2024  	// unconditionally include in API requests. By default, fields with empty or
  2025  	// default values are omitted from API requests. See
  2026  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2027  	// details.
  2028  	ForceSendFields []string `json:"-"`
  2029  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
  2030  	// requests with the JSON null value. By default, fields with empty values are
  2031  	// omitted from API requests. See
  2032  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2033  	NullFields []string `json:"-"`
  2034  }
  2035  
  2036  func (s *NewDeviceEvent) MarshalJSON() ([]byte, error) {
  2037  	type NoMethod NewDeviceEvent
  2038  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2039  }
  2040  
  2041  // NewPermissionsEvent: An event generated when new permissions are added to an
  2042  // app.
  2043  type NewPermissionsEvent struct {
  2044  	// ApprovedPermissions: The set of permissions that the enterprise admin has
  2045  	// already approved for this application. Use Permissions.Get on the EMM API to
  2046  	// retrieve details about these permissions.
  2047  	ApprovedPermissions []string `json:"approvedPermissions,omitempty"`
  2048  	// ProductId: The id of the product (e.g. "app:com.google.android.gm") for
  2049  	// which new permissions were added. This field will always be present.
  2050  	ProductId string `json:"productId,omitempty"`
  2051  	// RequestedPermissions: The set of permissions that the app is currently
  2052  	// requesting. Use Permissions.Get on the EMM API to retrieve details about
  2053  	// these permissions.
  2054  	RequestedPermissions []string `json:"requestedPermissions,omitempty"`
  2055  	// ForceSendFields is a list of field names (e.g. "ApprovedPermissions") to
  2056  	// unconditionally include in API requests. By default, fields with empty or
  2057  	// default values are omitted from API requests. See
  2058  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2059  	// details.
  2060  	ForceSendFields []string `json:"-"`
  2061  	// NullFields is a list of field names (e.g. "ApprovedPermissions") to include
  2062  	// in API requests with the JSON null value. By default, fields with empty
  2063  	// values are omitted from API requests. See
  2064  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2065  	NullFields []string `json:"-"`
  2066  }
  2067  
  2068  func (s *NewPermissionsEvent) MarshalJSON() ([]byte, error) {
  2069  	type NoMethod NewPermissionsEvent
  2070  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2071  }
  2072  
  2073  // Notification: A notification of one event relating to an enterprise.
  2074  type Notification struct {
  2075  	// AppRestrictionsSchemaChangeEvent: Notifications about new app restrictions
  2076  	// schema changes.
  2077  	AppRestrictionsSchemaChangeEvent *AppRestrictionsSchemaChangeEvent `json:"appRestrictionsSchemaChangeEvent,omitempty"`
  2078  	// AppUpdateEvent: Notifications about app updates.
  2079  	AppUpdateEvent *AppUpdateEvent `json:"appUpdateEvent,omitempty"`
  2080  	// DeviceReportUpdateEvent: Notifications about device report updates.
  2081  	DeviceReportUpdateEvent *DeviceReportUpdateEvent `json:"deviceReportUpdateEvent,omitempty"`
  2082  	// EnterpriseId: The ID of the enterprise for which the notification is sent.
  2083  	// This will always be present.
  2084  	EnterpriseId string `json:"enterpriseId,omitempty"`
  2085  	// InstallFailureEvent: Notifications about an app installation failure.
  2086  	InstallFailureEvent *InstallFailureEvent `json:"installFailureEvent,omitempty"`
  2087  	// NewDeviceEvent: Notifications about new devices.
  2088  	NewDeviceEvent *NewDeviceEvent `json:"newDeviceEvent,omitempty"`
  2089  	// NewPermissionsEvent: Notifications about new app permissions.
  2090  	NewPermissionsEvent *NewPermissionsEvent `json:"newPermissionsEvent,omitempty"`
  2091  	// NotificationType: Type of the notification.
  2092  	//
  2093  	// Possible values:
  2094  	//   "unknown"
  2095  	//   "testNotification" - A test push notification.
  2096  	//   "productApproval" - Notification about change to a product's approval
  2097  	// status.
  2098  	//   "installFailure" - Notification about an app installation failure.
  2099  	//   "appUpdate" - Notification about app update.
  2100  	//   "newPermissions" - Notification about new app permissions.
  2101  	//   "appRestricionsSchemaChange" - Notification about new app restrictions
  2102  	// schema change.
  2103  	//   "productAvailabilityChange" - Notification about product availability
  2104  	// change.
  2105  	//   "newDevice" - Notification about a new device.
  2106  	//   "deviceReportUpdate" - Notification about an updated device report.
  2107  	NotificationType string `json:"notificationType,omitempty"`
  2108  	// ProductApprovalEvent: Notifications about changes to a product's approval
  2109  	// status.
  2110  	ProductApprovalEvent *ProductApprovalEvent `json:"productApprovalEvent,omitempty"`
  2111  	// ProductAvailabilityChangeEvent: Notifications about product availability
  2112  	// changes.
  2113  	ProductAvailabilityChangeEvent *ProductAvailabilityChangeEvent `json:"productAvailabilityChangeEvent,omitempty"`
  2114  	// TimestampMillis: The time when the notification was published in
  2115  	// milliseconds since 1970-01-01T00:00:00Z. This will always be present.
  2116  	TimestampMillis int64 `json:"timestampMillis,omitempty,string"`
  2117  	// ForceSendFields is a list of field names (e.g.
  2118  	// "AppRestrictionsSchemaChangeEvent") to unconditionally include in API
  2119  	// requests. By default, fields with empty or default values are omitted from
  2120  	// API requests. See
  2121  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2122  	// details.
  2123  	ForceSendFields []string `json:"-"`
  2124  	// NullFields is a list of field names (e.g.
  2125  	// "AppRestrictionsSchemaChangeEvent") to include in API requests with the JSON
  2126  	// null value. By default, fields with empty values are omitted from API
  2127  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for
  2128  	// more details.
  2129  	NullFields []string `json:"-"`
  2130  }
  2131  
  2132  func (s *Notification) MarshalJSON() ([]byte, error) {
  2133  	type NoMethod Notification
  2134  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2135  }
  2136  
  2137  // NotificationSet: A resource returned by the PullNotificationSet API, which
  2138  // contains a collection of notifications for enterprises associated with the
  2139  // service account authenticated for the request.
  2140  type NotificationSet struct {
  2141  	// Notification: The notifications received, or empty if no notifications are
  2142  	// present.
  2143  	Notification []*Notification `json:"notification,omitempty"`
  2144  	// NotificationSetId: The notification set ID, required to mark the
  2145  	// notification as received with the Enterprises.AcknowledgeNotification API.
  2146  	// This will be omitted if no notifications are present.
  2147  	NotificationSetId string `json:"notificationSetId,omitempty"`
  2148  
  2149  	// ServerResponse contains the HTTP response code and headers from the server.
  2150  	googleapi.ServerResponse `json:"-"`
  2151  	// ForceSendFields is a list of field names (e.g. "Notification") to
  2152  	// unconditionally include in API requests. By default, fields with empty or
  2153  	// default values are omitted from API requests. See
  2154  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2155  	// details.
  2156  	ForceSendFields []string `json:"-"`
  2157  	// NullFields is a list of field names (e.g. "Notification") to include in API
  2158  	// requests with the JSON null value. By default, fields with empty values are
  2159  	// omitted from API requests. See
  2160  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2161  	NullFields []string `json:"-"`
  2162  }
  2163  
  2164  func (s *NotificationSet) MarshalJSON() ([]byte, error) {
  2165  	type NoMethod NotificationSet
  2166  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2167  }
  2168  
  2169  // PageInfo: Information about the current page. List operations that supports
  2170  // paging return only one "page" of results. This protocol buffer message
  2171  // describes the page that has been returned.
  2172  type PageInfo struct {
  2173  	// ResultPerPage: Maximum number of results returned in one page. ! The number
  2174  	// of results included in the API response.
  2175  	ResultPerPage int64 `json:"resultPerPage,omitempty"`
  2176  	// StartIndex: Index of the first result returned in the current page.
  2177  	StartIndex int64 `json:"startIndex,omitempty"`
  2178  	// TotalResults: Total number of results available on the backend ! The total
  2179  	// number of results in the result set.
  2180  	TotalResults int64 `json:"totalResults,omitempty"`
  2181  	// ForceSendFields is a list of field names (e.g. "ResultPerPage") to
  2182  	// unconditionally include in API requests. By default, fields with empty or
  2183  	// default values are omitted from API requests. See
  2184  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2185  	// details.
  2186  	ForceSendFields []string `json:"-"`
  2187  	// NullFields is a list of field names (e.g. "ResultPerPage") to include in API
  2188  	// requests with the JSON null value. By default, fields with empty values are
  2189  	// omitted from API requests. See
  2190  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2191  	NullFields []string `json:"-"`
  2192  }
  2193  
  2194  func (s *PageInfo) MarshalJSON() ([]byte, error) {
  2195  	type NoMethod PageInfo
  2196  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2197  }
  2198  
  2199  // Permission: A Permissions resource represents some extra capability, to be
  2200  // granted to an Android app, which requires explicit consent. An enterprise
  2201  // admin must consent to these permissions on behalf of their users before an
  2202  // entitlement for the app can be created. The permissions collection is
  2203  // read-only. The information provided for each permission (localized name and
  2204  // description) is intended to be used in the MDM user interface when obtaining
  2205  // consent from the enterprise.
  2206  type Permission struct {
  2207  	// Description: A longer description of the Permissions resource, giving more
  2208  	// details of what it affects.
  2209  	Description string `json:"description,omitempty"`
  2210  	// Name: The name of the permission.
  2211  	Name string `json:"name,omitempty"`
  2212  	// PermissionId: An opaque string uniquely identifying the permission.
  2213  	PermissionId string `json:"permissionId,omitempty"`
  2214  
  2215  	// ServerResponse contains the HTTP response code and headers from the server.
  2216  	googleapi.ServerResponse `json:"-"`
  2217  	// ForceSendFields is a list of field names (e.g. "Description") to
  2218  	// unconditionally include in API requests. By default, fields with empty or
  2219  	// default values are omitted from API requests. See
  2220  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2221  	// details.
  2222  	ForceSendFields []string `json:"-"`
  2223  	// NullFields is a list of field names (e.g. "Description") to include in API
  2224  	// requests with the JSON null value. By default, fields with empty values are
  2225  	// omitted from API requests. See
  2226  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2227  	NullFields []string `json:"-"`
  2228  }
  2229  
  2230  func (s *Permission) MarshalJSON() ([]byte, error) {
  2231  	type NoMethod Permission
  2232  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2233  }
  2234  
  2235  // Policy: The device policy for a given managed device.
  2236  type Policy struct {
  2237  	// AutoUpdatePolicy: Controls when automatic app updates on the device can be
  2238  	// applied. Recommended alternative: autoUpdateMode which is set per app,
  2239  	// provides greater flexibility around update frequency. When autoUpdateMode is
  2240  	// set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, autoUpdatePolicy
  2241  	// has no effect. "choiceToTheUser" allows the device's user to configure the
  2242  	// app update policy. "always" enables auto updates. "never" disables auto
  2243  	// updates. "wifiOnly" enables auto updates only when the device is connected
  2244  	// to wifi.
  2245  	//
  2246  	// Possible values:
  2247  	//   "autoUpdatePolicyUnspecified" - The auto update policy is not set.
  2248  	//   "choiceToTheUser" - The user can control auto-updates.
  2249  	//   "never" - Apps are never auto-updated.
  2250  	//   "wifiOnly" - Apps are auto-updated over WiFi only.
  2251  	//   "always" - Apps are auto-updated at any time. Data charges may apply.
  2252  	AutoUpdatePolicy string `json:"autoUpdatePolicy,omitempty"`
  2253  	// DeviceReportPolicy: Whether the device reports app states to the EMM. The
  2254  	// default value is "deviceReportDisabled".
  2255  	//
  2256  	// Possible values:
  2257  	//   "deviceReportPolicyUnspecified" - The device report policy is not set.
  2258  	//   "deviceReportDisabled" - Device reports are disabled.
  2259  	//   "deviceReportEnabled" - Device reports are enabled.
  2260  	DeviceReportPolicy string `json:"deviceReportPolicy,omitempty"`
  2261  	// MaintenanceWindow: The maintenance window defining when apps running in the
  2262  	// foreground should be updated.
  2263  	MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
  2264  	// ProductAvailabilityPolicy: The availability granted to the device for the
  2265  	// specified products. "all" gives the device access to all products,
  2266  	// regardless of approval status. "all" does not enable automatic visibility of
  2267  	// "alpha" or "beta" tracks. "whitelist" grants the device access the products
  2268  	// specified in productPolicy[]. Only products that are approved or products
  2269  	// that were previously approved (products with revoked approval) by the
  2270  	// enterprise can be whitelisted. If no value is provided, the availability set
  2271  	// at the user level is applied by default.
  2272  	//
  2273  	// Possible values:
  2274  	//   "productAvailabilityPolicyUnspecified" - Unspecified, applies the user
  2275  	// available product set by default.
  2276  	//   "whitelist" - The approved products with product availability set to
  2277  	// AVAILABLE in the product policy are available.
  2278  	//   "all" - All products are available except those explicitly marked as
  2279  	// unavailable in the product availability policy.
  2280  	ProductAvailabilityPolicy string `json:"productAvailabilityPolicy,omitempty"`
  2281  	// ProductPolicy: The list of product policies. The productAvailabilityPolicy
  2282  	// needs to be set to WHITELIST or ALL for the product policies to be applied.
  2283  	ProductPolicy []*ProductPolicy `json:"productPolicy,omitempty"`
  2284  	// ForceSendFields is a list of field names (e.g. "AutoUpdatePolicy") to
  2285  	// unconditionally include in API requests. By default, fields with empty or
  2286  	// default values are omitted from API requests. See
  2287  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2288  	// details.
  2289  	ForceSendFields []string `json:"-"`
  2290  	// NullFields is a list of field names (e.g. "AutoUpdatePolicy") to include in
  2291  	// API requests with the JSON null value. By default, fields with empty values
  2292  	// are omitted from API requests. See
  2293  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2294  	NullFields []string `json:"-"`
  2295  }
  2296  
  2297  func (s *Policy) MarshalJSON() ([]byte, error) {
  2298  	type NoMethod Policy
  2299  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2300  }
  2301  
  2302  // Product: A Products resource represents an app in the Google Play store that
  2303  // is available to at least some users in the enterprise. (Some apps are
  2304  // restricted to a single enterprise, and no information about them is made
  2305  // available outside that enterprise.) The information provided for each
  2306  // product (localized name, icon, link to the full Google Play details page) is
  2307  // intended to allow a basic representation of the product within an EMM user
  2308  // interface.
  2309  type Product struct {
  2310  	// AppRestrictionsSchema: The app restriction schema
  2311  	AppRestrictionsSchema *AppRestrictionsSchema `json:"appRestrictionsSchema,omitempty"`
  2312  	// AppTracks: The tracks visible to the enterprise.
  2313  	AppTracks []*TrackInfo `json:"appTracks,omitempty"`
  2314  	// AppVersion: App versions currently available for this product.
  2315  	AppVersion []*AppVersion `json:"appVersion,omitempty"`
  2316  	// AuthorName: The name of the author of the product (for example, the app
  2317  	// developer).
  2318  	AuthorName string `json:"authorName,omitempty"`
  2319  	// AvailableCountries: The countries which this app is available in.
  2320  	AvailableCountries []string `json:"availableCountries,omitempty"`
  2321  	// AvailableTracks: Deprecated, use appTracks instead.
  2322  	//
  2323  	// Possible values:
  2324  	//   "appTrackUnspecified"
  2325  	//   "production"
  2326  	//   "beta"
  2327  	//   "alpha"
  2328  	AvailableTracks []string `json:"availableTracks,omitempty"`
  2329  	// Category: The app category (e.g. RACING, SOCIAL, etc.)
  2330  	Category string `json:"category,omitempty"`
  2331  	// ContentRating: The content rating for this app.
  2332  	//
  2333  	// Possible values:
  2334  	//   "ratingUnknown"
  2335  	//   "all"
  2336  	//   "preTeen"
  2337  	//   "teen"
  2338  	//   "mature"
  2339  	ContentRating string `json:"contentRating,omitempty"`
  2340  	// Description: The localized promotional description, if available.
  2341  	Description string `json:"description,omitempty"`
  2342  	// DetailsUrl: A link to the (consumer) Google Play details page for the
  2343  	// product.
  2344  	DetailsUrl string `json:"detailsUrl,omitempty"`
  2345  	// DistributionChannel: How and to whom the package is made available. The
  2346  	// value publicGoogleHosted means that the package is available through the
  2347  	// Play store and not restricted to a specific enterprise. The value
  2348  	// privateGoogleHosted means that the package is a private app (restricted to
  2349  	// an enterprise) but hosted by Google. The value privateSelfHosted means that
  2350  	// the package is a private app (restricted to an enterprise) and is privately
  2351  	// hosted.
  2352  	//
  2353  	// Possible values:
  2354  	//   "publicGoogleHosted"
  2355  	//   "privateGoogleHosted"
  2356  	//   "privateSelfHosted"
  2357  	DistributionChannel string `json:"distributionChannel,omitempty"`
  2358  	// Features: Noteworthy features (if any) of this product.
  2359  	//
  2360  	// Possible values:
  2361  	//   "featureUnknown"
  2362  	//   "vpnApp" - The app is a VPN.
  2363  	Features []string `json:"features,omitempty"`
  2364  	// FullDescription: The localized full app store description, if available.
  2365  	FullDescription string `json:"fullDescription,omitempty"`
  2366  	// IconUrl: A link to an image that can be used as an icon for the product.
  2367  	// This image is suitable for use at up to 512px x 512px.
  2368  	IconUrl string `json:"iconUrl,omitempty"`
  2369  	// LastUpdatedTimestampMillis: The approximate time (within 7 days) the app was
  2370  	// last published, expressed in milliseconds since epoch.
  2371  	LastUpdatedTimestampMillis int64 `json:"lastUpdatedTimestampMillis,omitempty,string"`
  2372  	// MinAndroidSdkVersion: The minimum Android SDK necessary to run the app.
  2373  	MinAndroidSdkVersion int64 `json:"minAndroidSdkVersion,omitempty"`
  2374  	// Permissions: A list of permissions required by the app.
  2375  	Permissions []*ProductPermission `json:"permissions,omitempty"`
  2376  	// ProductId: A string of the form *app:<package name>*. For example,
  2377  	// app:com.google.android.gm represents the Gmail app.
  2378  	ProductId string `json:"productId,omitempty"`
  2379  	// ProductPricing: Whether this product is free, free with in-app purchases, or
  2380  	// paid. If the pricing is unknown, this means the product is not generally
  2381  	// available anymore (even though it might still be available to people who own
  2382  	// it).
  2383  	//
  2384  	// Possible values:
  2385  	//   "unknown" - Unknown pricing, used to denote an approved product that is
  2386  	// not generally available.
  2387  	//   "free" - The product is free.
  2388  	//   "freeWithInAppPurchase" - The product is free, but offers in-app
  2389  	// purchases.
  2390  	//   "paid" - The product is paid.
  2391  	ProductPricing string `json:"productPricing,omitempty"`
  2392  	// RecentChanges: A description of the recent changes made to the app.
  2393  	RecentChanges string `json:"recentChanges,omitempty"`
  2394  	// RequiresContainerApp: Deprecated.
  2395  	RequiresContainerApp bool `json:"requiresContainerApp,omitempty"`
  2396  	// ScreenshotUrls: A list of screenshot links representing the app.
  2397  	ScreenshotUrls []string `json:"screenshotUrls,omitempty"`
  2398  	// SigningCertificate: The certificate used to sign this product.
  2399  	SigningCertificate *ProductSigningCertificate `json:"signingCertificate,omitempty"`
  2400  	// SmallIconUrl: A link to a smaller image that can be used as an icon for the
  2401  	// product. This image is suitable for use at up to 128px x 128px.
  2402  	SmallIconUrl string `json:"smallIconUrl,omitempty"`
  2403  	// Title: The name of the product.
  2404  	Title string `json:"title,omitempty"`
  2405  	// WorkDetailsUrl: A link to the managed Google Play details page for the
  2406  	// product, for use by an Enterprise admin.
  2407  	WorkDetailsUrl string `json:"workDetailsUrl,omitempty"`
  2408  
  2409  	// ServerResponse contains the HTTP response code and headers from the server.
  2410  	googleapi.ServerResponse `json:"-"`
  2411  	// ForceSendFields is a list of field names (e.g. "AppRestrictionsSchema") to
  2412  	// unconditionally include in API requests. By default, fields with empty or
  2413  	// default values are omitted from API requests. See
  2414  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2415  	// details.
  2416  	ForceSendFields []string `json:"-"`
  2417  	// NullFields is a list of field names (e.g. "AppRestrictionsSchema") to
  2418  	// include in API requests with the JSON null value. By default, fields with
  2419  	// empty values are omitted from API requests. See
  2420  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2421  	NullFields []string `json:"-"`
  2422  }
  2423  
  2424  func (s *Product) MarshalJSON() ([]byte, error) {
  2425  	type NoMethod Product
  2426  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2427  }
  2428  
  2429  // ProductApprovalEvent: An event generated when a product's approval status is
  2430  // changed.
  2431  type ProductApprovalEvent struct {
  2432  	// Approved: Whether the product was approved or unapproved. This field will
  2433  	// always be present.
  2434  	//
  2435  	// Possible values:
  2436  	//   "unknown" - Conveys no information.
  2437  	//   "approved" - The product was approved.
  2438  	//   "unapproved" - The product was unapproved.
  2439  	Approved string `json:"approved,omitempty"`
  2440  	// ProductId: The id of the product (e.g. "app:com.google.android.gm") for
  2441  	// which the approval status has changed. This field will always be present.
  2442  	ProductId string `json:"productId,omitempty"`
  2443  	// ForceSendFields is a list of field names (e.g. "Approved") to
  2444  	// unconditionally include in API requests. By default, fields with empty or
  2445  	// default values are omitted from API requests. See
  2446  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2447  	// details.
  2448  	ForceSendFields []string `json:"-"`
  2449  	// NullFields is a list of field names (e.g. "Approved") to include in API
  2450  	// requests with the JSON null value. By default, fields with empty values are
  2451  	// omitted from API requests. See
  2452  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2453  	NullFields []string `json:"-"`
  2454  }
  2455  
  2456  func (s *ProductApprovalEvent) MarshalJSON() ([]byte, error) {
  2457  	type NoMethod ProductApprovalEvent
  2458  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2459  }
  2460  
  2461  // ProductAvailabilityChangeEvent: An event generated whenever a product's
  2462  // availability changes.
  2463  type ProductAvailabilityChangeEvent struct {
  2464  	// AvailabilityStatus: The new state of the product. This field will always be
  2465  	// present.
  2466  	//
  2467  	// Possible values:
  2468  	//   "unknown" - Conveys no information.
  2469  	//   "available" - The previously unavailable product is again available on
  2470  	// Google Play.
  2471  	//   "removed" - The product was removed from Google Play.
  2472  	//   "unpublished" - The product was unpublished by the developer.
  2473  	AvailabilityStatus string `json:"availabilityStatus,omitempty"`
  2474  	// ProductId: The id of the product (e.g. "app:com.google.android.gm") for
  2475  	// which the product availability changed. This field will always be present.
  2476  	ProductId string `json:"productId,omitempty"`
  2477  	// ForceSendFields is a list of field names (e.g. "AvailabilityStatus") to
  2478  	// unconditionally include in API requests. By default, fields with empty or
  2479  	// default values are omitted from API requests. See
  2480  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2481  	// details.
  2482  	ForceSendFields []string `json:"-"`
  2483  	// NullFields is a list of field names (e.g. "AvailabilityStatus") to include
  2484  	// in API requests with the JSON null value. By default, fields with empty
  2485  	// values are omitted from API requests. See
  2486  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2487  	NullFields []string `json:"-"`
  2488  }
  2489  
  2490  func (s *ProductAvailabilityChangeEvent) MarshalJSON() ([]byte, error) {
  2491  	type NoMethod ProductAvailabilityChangeEvent
  2492  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2493  }
  2494  
  2495  // ProductPermission: A product permissions resource represents the set of
  2496  // permissions required by a specific app and whether or not they have been
  2497  // accepted by an enterprise admin. The API can be used to read the set of
  2498  // permissions, and also to update the set to indicate that permissions have
  2499  // been accepted.
  2500  type ProductPermission struct {
  2501  	// PermissionId: An opaque string uniquely identifying the permission.
  2502  	PermissionId string `json:"permissionId,omitempty"`
  2503  	// State: Whether the permission has been accepted or not.
  2504  	//
  2505  	// Possible values:
  2506  	//   "required" - The permission is required by the app but has not yet been
  2507  	// accepted by the enterprise.
  2508  	//   "accepted" - The permission has been accepted by the enterprise.
  2509  	State string `json:"state,omitempty"`
  2510  	// ForceSendFields is a list of field names (e.g. "PermissionId") to
  2511  	// unconditionally include in API requests. By default, fields with empty or
  2512  	// default values are omitted from API requests. See
  2513  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2514  	// details.
  2515  	ForceSendFields []string `json:"-"`
  2516  	// NullFields is a list of field names (e.g. "PermissionId") to include in API
  2517  	// requests with the JSON null value. By default, fields with empty values are
  2518  	// omitted from API requests. See
  2519  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2520  	NullFields []string `json:"-"`
  2521  }
  2522  
  2523  func (s *ProductPermission) MarshalJSON() ([]byte, error) {
  2524  	type NoMethod ProductPermission
  2525  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2526  }
  2527  
  2528  // ProductPermissions: Information about the permissions required by a specific
  2529  // app and whether they have been accepted by the enterprise.
  2530  type ProductPermissions struct {
  2531  	// Permission: The permissions required by the app.
  2532  	Permission []*ProductPermission `json:"permission,omitempty"`
  2533  	// ProductId: The ID of the app that the permissions relate to, e.g.
  2534  	// "app:com.google.android.gm".
  2535  	ProductId string `json:"productId,omitempty"`
  2536  
  2537  	// ServerResponse contains the HTTP response code and headers from the server.
  2538  	googleapi.ServerResponse `json:"-"`
  2539  	// ForceSendFields is a list of field names (e.g. "Permission") to
  2540  	// unconditionally include in API requests. By default, fields with empty or
  2541  	// default values are omitted from API requests. See
  2542  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2543  	// details.
  2544  	ForceSendFields []string `json:"-"`
  2545  	// NullFields is a list of field names (e.g. "Permission") to include in API
  2546  	// requests with the JSON null value. By default, fields with empty values are
  2547  	// omitted from API requests. See
  2548  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2549  	NullFields []string `json:"-"`
  2550  }
  2551  
  2552  func (s *ProductPermissions) MarshalJSON() ([]byte, error) {
  2553  	type NoMethod ProductPermissions
  2554  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2555  }
  2556  
  2557  // ProductPolicy: The policy for a product.
  2558  type ProductPolicy struct {
  2559  	// AutoInstallPolicy: The auto-install policy for the product.
  2560  	AutoInstallPolicy *AutoInstallPolicy `json:"autoInstallPolicy,omitempty"`
  2561  	// AutoUpdateMode: The auto-update mode for the product. When autoUpdateMode is
  2562  	// used, it always takes precedence over the user's choice. So when a user
  2563  	// makes changes to the device settings manually, these changes are ignored.
  2564  	//
  2565  	// Possible values:
  2566  	//   "autoUpdateModeUnspecified" - Unspecified. Defaults to
  2567  	// AUTO_UPDATE_DEFAULT.
  2568  	//   "autoUpdateDefault" - The app is automatically updated with low priority
  2569  	// to minimize the impact on the user. The app is updated when the following
  2570  	// constraints are met: * The device is not actively used * The device is
  2571  	// connected to an unmetered network * The device is charging The device is
  2572  	// notified about a new update within 24 hours after it is published by the
  2573  	// developer, after which the app is updated the next time the constraints
  2574  	// above are met.
  2575  	//   "autoUpdatePostponed" - The app is not automatically updated for a maximum
  2576  	// of 90 days after the app becomes out of date. 90 days after the app becomes
  2577  	// out of date, the latest available version is installed automatically with
  2578  	// low priority (see AUTO_UPDATE_DEFAULT). After the app is updated it is not
  2579  	// automatically updated again until 90 days after it becomes out of date
  2580  	// again. The user can still manually update the app from the Play Store at any
  2581  	// time.
  2582  	//   "autoUpdateHighPriority" - The app is updated as soon as possible. No
  2583  	// constraints are applied. The device is notified as soon as possible about a
  2584  	// new app update after it is published by the developer.
  2585  	AutoUpdateMode string `json:"autoUpdateMode,omitempty"`
  2586  	// EnterpriseAuthenticationAppLinkConfigs: An authentication URL configuration
  2587  	// for the authenticator app of an identity provider. This helps to launch the
  2588  	// identity provider's authenticator app during the authentication happening in
  2589  	// a private app using Android WebView. Authenticator app should already be the
  2590  	// default handler for the authentication url on the device.
  2591  	EnterpriseAuthenticationAppLinkConfigs []*EnterpriseAuthenticationAppLinkConfig `json:"enterpriseAuthenticationAppLinkConfigs,omitempty"`
  2592  	// ManagedConfiguration: The managed configuration for the product.
  2593  	ManagedConfiguration *ManagedConfiguration `json:"managedConfiguration,omitempty"`
  2594  	// ProductId: The ID of the product. For example, "app:com.google.android.gm".
  2595  	ProductId string `json:"productId,omitempty"`
  2596  	// TrackIds: Grants the device visibility to the specified product release
  2597  	// track(s), identified by trackIds. The list of release tracks of a product
  2598  	// can be obtained by calling Products.Get.
  2599  	TrackIds []string `json:"trackIds,omitempty"`
  2600  	// Tracks: Deprecated. Use trackIds instead.
  2601  	//
  2602  	// Possible values:
  2603  	//   "appTrackUnspecified"
  2604  	//   "production"
  2605  	//   "beta"
  2606  	//   "alpha"
  2607  	Tracks []string `json:"tracks,omitempty"`
  2608  	// ForceSendFields is a list of field names (e.g. "AutoInstallPolicy") to
  2609  	// unconditionally include in API requests. By default, fields with empty or
  2610  	// default values are omitted from API requests. See
  2611  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2612  	// details.
  2613  	ForceSendFields []string `json:"-"`
  2614  	// NullFields is a list of field names (e.g. "AutoInstallPolicy") to include in
  2615  	// API requests with the JSON null value. By default, fields with empty values
  2616  	// are omitted from API requests. See
  2617  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2618  	NullFields []string `json:"-"`
  2619  }
  2620  
  2621  func (s *ProductPolicy) MarshalJSON() ([]byte, error) {
  2622  	type NoMethod ProductPolicy
  2623  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2624  }
  2625  
  2626  // ProductSet: A set of products.
  2627  type ProductSet struct {
  2628  	// ProductId: The list of product IDs making up the set of products.
  2629  	ProductId []string `json:"productId,omitempty"`
  2630  	// ProductSetBehavior: The interpretation of this product set. "unknown" should
  2631  	// never be sent and is ignored if received. "whitelist" means that the user is
  2632  	// entitled to access the product set. "includeAll" means that all products are
  2633  	// accessible, including products that are approved, products with revoked
  2634  	// approval, and products that have never been approved. "allApproved" means
  2635  	// that the user is entitled to access all products that are approved for the
  2636  	// enterprise. If the value is "allApproved" or "includeAll", the productId
  2637  	// field is ignored. If no value is provided, it is interpreted as "whitelist"
  2638  	// for backwards compatibility. Further "allApproved" or "includeAll" does not
  2639  	// enable automatic visibility of "alpha" or "beta" tracks for Android app. Use
  2640  	// ProductVisibility to enable "alpha" or "beta" tracks per user.
  2641  	//
  2642  	// Possible values:
  2643  	//   "unknown" - This value should never be sent and ignored if received.
  2644  	//   "whitelist" - This product set constitutes a whitelist.
  2645  	//   "includeAll" - This product set represents all products. For Android app
  2646  	// it represents only "production" track. (The value of the productId field is
  2647  	// therefore ignored).
  2648  	//   "allApproved" - This product set represents all approved products. For
  2649  	// Android app it represents only "production" track. (The value of the
  2650  	// product_id field is therefore ignored).
  2651  	ProductSetBehavior string `json:"productSetBehavior,omitempty"`
  2652  	// ProductVisibility: Additional list of product IDs making up the product set.
  2653  	// Unlike the productID array, in this list It's possible to specify which
  2654  	// tracks (alpha, beta, production) of a product are visible to the user. See
  2655  	// ProductVisibility and its fields for more information. Specifying the same
  2656  	// product ID both here and in the productId array is not allowed and it will
  2657  	// result in an error.
  2658  	ProductVisibility []*ProductVisibility `json:"productVisibility,omitempty"`
  2659  
  2660  	// ServerResponse contains the HTTP response code and headers from the server.
  2661  	googleapi.ServerResponse `json:"-"`
  2662  	// ForceSendFields is a list of field names (e.g. "ProductId") to
  2663  	// unconditionally include in API requests. By default, fields with empty or
  2664  	// default values are omitted from API requests. See
  2665  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2666  	// details.
  2667  	ForceSendFields []string `json:"-"`
  2668  	// NullFields is a list of field names (e.g. "ProductId") to include in API
  2669  	// requests with the JSON null value. By default, fields with empty values are
  2670  	// omitted from API requests. See
  2671  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2672  	NullFields []string `json:"-"`
  2673  }
  2674  
  2675  func (s *ProductSet) MarshalJSON() ([]byte, error) {
  2676  	type NoMethod ProductSet
  2677  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2678  }
  2679  
  2680  type ProductSigningCertificate struct {
  2681  	// CertificateHashSha1: The base64 urlsafe encoded SHA1 hash of the
  2682  	// certificate. (This field is deprecated in favor of SHA2-256. It should not
  2683  	// be used and may be removed at any time.)
  2684  	CertificateHashSha1 string `json:"certificateHashSha1,omitempty"`
  2685  	// CertificateHashSha256: The base64 urlsafe encoded SHA2-256 hash of the
  2686  	// certificate.
  2687  	CertificateHashSha256 string `json:"certificateHashSha256,omitempty"`
  2688  	// ForceSendFields is a list of field names (e.g. "CertificateHashSha1") to
  2689  	// unconditionally include in API requests. By default, fields with empty or
  2690  	// default values are omitted from API requests. See
  2691  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2692  	// details.
  2693  	ForceSendFields []string `json:"-"`
  2694  	// NullFields is a list of field names (e.g. "CertificateHashSha1") to include
  2695  	// in API requests with the JSON null value. By default, fields with empty
  2696  	// values are omitted from API requests. See
  2697  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2698  	NullFields []string `json:"-"`
  2699  }
  2700  
  2701  func (s *ProductSigningCertificate) MarshalJSON() ([]byte, error) {
  2702  	type NoMethod ProductSigningCertificate
  2703  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2704  }
  2705  
  2706  // ProductVisibility: A product to be made visible to a user.
  2707  type ProductVisibility struct {
  2708  	// ProductId: The product ID to make visible to the user. Required for each
  2709  	// item in the productVisibility list.
  2710  	ProductId string `json:"productId,omitempty"`
  2711  	// TrackIds: Grants the user visibility to the specified product track(s),
  2712  	// identified by trackIds.
  2713  	TrackIds []string `json:"trackIds,omitempty"`
  2714  	// Tracks: Deprecated. Use trackIds instead.
  2715  	//
  2716  	// Possible values:
  2717  	//   "appTrackUnspecified"
  2718  	//   "production"
  2719  	//   "beta"
  2720  	//   "alpha"
  2721  	Tracks []string `json:"tracks,omitempty"`
  2722  	// ForceSendFields is a list of field names (e.g. "ProductId") to
  2723  	// unconditionally include in API requests. By default, fields with empty or
  2724  	// default values are omitted from API requests. See
  2725  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2726  	// details.
  2727  	ForceSendFields []string `json:"-"`
  2728  	// NullFields is a list of field names (e.g. "ProductId") to include in API
  2729  	// requests with the JSON null value. By default, fields with empty values are
  2730  	// omitted from API requests. See
  2731  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2732  	NullFields []string `json:"-"`
  2733  }
  2734  
  2735  func (s *ProductVisibility) MarshalJSON() ([]byte, error) {
  2736  	type NoMethod ProductVisibility
  2737  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2738  }
  2739  
  2740  type ProductsApproveRequest struct {
  2741  	// ApprovalUrlInfo: The approval URL that was shown to the user. Only the
  2742  	// permissions shown to the user with that URL will be accepted, which may not
  2743  	// be the product's entire set of permissions. For example, the URL may only
  2744  	// display new permissions from an update after the product was approved, or
  2745  	// not include new permissions if the product was updated since the URL was
  2746  	// generated.
  2747  	ApprovalUrlInfo *ApprovalUrlInfo `json:"approvalUrlInfo,omitempty"`
  2748  	// ApprovedPermissions: Sets how new permission requests for the product are
  2749  	// handled. "allPermissions" automatically approves all current and future
  2750  	// permissions for the product. "currentPermissionsOnly" approves the current
  2751  	// set of permissions for the product, but any future permissions added through
  2752  	// updates will require manual reapproval. If not specified, only the current
  2753  	// set of permissions will be approved.
  2754  	//
  2755  	// Possible values:
  2756  	//   "currentPermissionsOnly" - Approve only the permissions the product
  2757  	// requires at approval time. If an update requires additional permissions, the
  2758  	// app will not be updated on devices associated with enterprise users until
  2759  	// the additional permissions are approved.
  2760  	//   "allPermissions" - All current and future permissions the app requires are
  2761  	// automatically approved.
  2762  	ApprovedPermissions string `json:"approvedPermissions,omitempty"`
  2763  	// ForceSendFields is a list of field names (e.g. "ApprovalUrlInfo") to
  2764  	// unconditionally include in API requests. By default, fields with empty or
  2765  	// default values are omitted from API requests. See
  2766  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2767  	// details.
  2768  	ForceSendFields []string `json:"-"`
  2769  	// NullFields is a list of field names (e.g. "ApprovalUrlInfo") to include in
  2770  	// API requests with the JSON null value. By default, fields with empty values
  2771  	// are omitted from API requests. See
  2772  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2773  	NullFields []string `json:"-"`
  2774  }
  2775  
  2776  func (s *ProductsApproveRequest) MarshalJSON() ([]byte, error) {
  2777  	type NoMethod ProductsApproveRequest
  2778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2779  }
  2780  
  2781  type ProductsGenerateApprovalUrlResponse struct {
  2782  	// Url: A URL that can be rendered in an iframe to display the permissions (if
  2783  	// any) of a product. This URL can be used to approve the product only once and
  2784  	// only within 24 hours of being generated, using the Products.approve call. If
  2785  	// the product is currently unapproved and has no permissions, this URL will
  2786  	// point to an empty page. If the product is currently approved, a URL will
  2787  	// only be generated if that product has added permissions since it was last
  2788  	// approved, and the URL will only display those new permissions that have not
  2789  	// yet been accepted.
  2790  	Url string `json:"url,omitempty"`
  2791  
  2792  	// ServerResponse contains the HTTP response code and headers from the server.
  2793  	googleapi.ServerResponse `json:"-"`
  2794  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
  2795  	// include in API requests. By default, fields with empty or default values are
  2796  	// omitted from API requests. See
  2797  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2798  	// details.
  2799  	ForceSendFields []string `json:"-"`
  2800  	// NullFields is a list of field names (e.g. "Url") to include in API requests
  2801  	// with the JSON null value. By default, fields with empty values are omitted
  2802  	// from API requests. See
  2803  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2804  	NullFields []string `json:"-"`
  2805  }
  2806  
  2807  func (s *ProductsGenerateApprovalUrlResponse) MarshalJSON() ([]byte, error) {
  2808  	type NoMethod ProductsGenerateApprovalUrlResponse
  2809  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2810  }
  2811  
  2812  type ProductsListResponse struct {
  2813  	// PageInfo: General pagination information.
  2814  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  2815  	// Product: Information about a product (e.g. an app) in the Google Play store,
  2816  	// for display to an enterprise admin.
  2817  	Product []*Product `json:"product,omitempty"`
  2818  	// TokenPagination: Pagination information for token pagination.
  2819  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  2820  
  2821  	// ServerResponse contains the HTTP response code and headers from the server.
  2822  	googleapi.ServerResponse `json:"-"`
  2823  	// ForceSendFields is a list of field names (e.g. "PageInfo") to
  2824  	// unconditionally include in API requests. By default, fields with empty or
  2825  	// default values are omitted from API requests. See
  2826  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2827  	// details.
  2828  	ForceSendFields []string `json:"-"`
  2829  	// NullFields is a list of field names (e.g. "PageInfo") to include in API
  2830  	// requests with the JSON null value. By default, fields with empty values are
  2831  	// omitted from API requests. See
  2832  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2833  	NullFields []string `json:"-"`
  2834  }
  2835  
  2836  func (s *ProductsListResponse) MarshalJSON() ([]byte, error) {
  2837  	type NoMethod ProductsListResponse
  2838  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2839  }
  2840  
  2841  // ServiceAccount: A service account identity, including the name and
  2842  // credentials that can be used to authenticate as the service account.
  2843  type ServiceAccount struct {
  2844  	// Key: Credentials that can be used to authenticate as this ServiceAccount.
  2845  	Key *ServiceAccountKey `json:"key,omitempty"`
  2846  	// Name: The account name of the service account, in the form of an email
  2847  	// address. Assigned by the server.
  2848  	Name string `json:"name,omitempty"`
  2849  
  2850  	// ServerResponse contains the HTTP response code and headers from the server.
  2851  	googleapi.ServerResponse `json:"-"`
  2852  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  2853  	// include in API requests. By default, fields with empty or default values are
  2854  	// omitted from API requests. See
  2855  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2856  	// details.
  2857  	ForceSendFields []string `json:"-"`
  2858  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  2859  	// with the JSON null value. By default, fields with empty values are omitted
  2860  	// from API requests. See
  2861  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2862  	NullFields []string `json:"-"`
  2863  }
  2864  
  2865  func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  2866  	type NoMethod ServiceAccount
  2867  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2868  }
  2869  
  2870  // ServiceAccountKey: Credentials that can be used to authenticate as a service
  2871  // account.
  2872  type ServiceAccountKey struct {
  2873  	// Data: The body of the private key credentials file, in string format. This
  2874  	// is only populated when the ServiceAccountKey is created, and is not stored
  2875  	// by Google.
  2876  	Data string `json:"data,omitempty"`
  2877  	// Id: An opaque, unique identifier for this ServiceAccountKey. Assigned by the
  2878  	// server.
  2879  	Id string `json:"id,omitempty"`
  2880  	// PublicData: Public key data for the credentials file. This is an X.509 cert.
  2881  	// If you are using the googleCredentials key type, this is identical to the
  2882  	// cert that can be retrieved by using the X.509 cert url inside of the
  2883  	// credentials file.
  2884  	PublicData string `json:"publicData,omitempty"`
  2885  	// Type: The file format of the generated key data.
  2886  	//
  2887  	// Possible values:
  2888  	//   "googleCredentials" - Google Credentials File format.
  2889  	//   "pkcs12" - PKCS12 format. The password for the PKCS12 file is
  2890  	// 'notasecret'. For more information, see https://tools.ietf.org/html/rfc7292.
  2891  	// The data for keys of this type are base64 encoded according to RFC 4648
  2892  	// Section 4. See http://tools.ietf.org/html/rfc4648#section-4.
  2893  	Type string `json:"type,omitempty"`
  2894  
  2895  	// ServerResponse contains the HTTP response code and headers from the server.
  2896  	googleapi.ServerResponse `json:"-"`
  2897  	// ForceSendFields is a list of field names (e.g. "Data") to unconditionally
  2898  	// include in API requests. By default, fields with empty or default values are
  2899  	// omitted from API requests. See
  2900  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2901  	// details.
  2902  	ForceSendFields []string `json:"-"`
  2903  	// NullFields is a list of field names (e.g. "Data") to include in API requests
  2904  	// with the JSON null value. By default, fields with empty values are omitted
  2905  	// from API requests. See
  2906  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2907  	NullFields []string `json:"-"`
  2908  }
  2909  
  2910  func (s *ServiceAccountKey) MarshalJSON() ([]byte, error) {
  2911  	type NoMethod ServiceAccountKey
  2912  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2913  }
  2914  
  2915  type ServiceAccountKeysListResponse struct {
  2916  	// ServiceAccountKey: The service account credentials.
  2917  	ServiceAccountKey []*ServiceAccountKey `json:"serviceAccountKey,omitempty"`
  2918  
  2919  	// ServerResponse contains the HTTP response code and headers from the server.
  2920  	googleapi.ServerResponse `json:"-"`
  2921  	// ForceSendFields is a list of field names (e.g. "ServiceAccountKey") to
  2922  	// unconditionally include in API requests. By default, fields with empty or
  2923  	// default values are omitted from API requests. See
  2924  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2925  	// details.
  2926  	ForceSendFields []string `json:"-"`
  2927  	// NullFields is a list of field names (e.g. "ServiceAccountKey") to include in
  2928  	// API requests with the JSON null value. By default, fields with empty values
  2929  	// are omitted from API requests. See
  2930  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2931  	NullFields []string `json:"-"`
  2932  }
  2933  
  2934  func (s *ServiceAccountKeysListResponse) MarshalJSON() ([]byte, error) {
  2935  	type NoMethod ServiceAccountKeysListResponse
  2936  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2937  }
  2938  
  2939  // SignupInfo: A resource returned by the GenerateSignupUrl API, which contains
  2940  // the Signup URL and Completion Token.
  2941  type SignupInfo struct {
  2942  	// CompletionToken: An opaque token that will be required, along with the
  2943  	// Enterprise Token, for obtaining the enterprise resource from CompleteSignup.
  2944  	CompletionToken string `json:"completionToken,omitempty"`
  2945  	// Kind: Deprecated.
  2946  	Kind string `json:"kind,omitempty"`
  2947  	// Url: A URL under which the Admin can sign up for an enterprise. The page
  2948  	// pointed to cannot be rendered in an iframe.
  2949  	Url string `json:"url,omitempty"`
  2950  
  2951  	// ServerResponse contains the HTTP response code and headers from the server.
  2952  	googleapi.ServerResponse `json:"-"`
  2953  	// ForceSendFields is a list of field names (e.g. "CompletionToken") to
  2954  	// unconditionally include in API requests. By default, fields with empty or
  2955  	// default values are omitted from API requests. See
  2956  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2957  	// details.
  2958  	ForceSendFields []string `json:"-"`
  2959  	// NullFields is a list of field names (e.g. "CompletionToken") to include in
  2960  	// API requests with the JSON null value. By default, fields with empty values
  2961  	// are omitted from API requests. See
  2962  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2963  	NullFields []string `json:"-"`
  2964  }
  2965  
  2966  func (s *SignupInfo) MarshalJSON() ([]byte, error) {
  2967  	type NoMethod SignupInfo
  2968  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2969  }
  2970  
  2971  // StoreCluster: Definition of a managed Google Play store cluster, a list of
  2972  // products displayed as part of a store page.
  2973  type StoreCluster struct {
  2974  	// Id: Unique ID of this cluster. Assigned by the server. Immutable once
  2975  	// assigned.
  2976  	Id string `json:"id,omitempty"`
  2977  	// Name: Ordered list of localized strings giving the name of this page. The
  2978  	// text displayed is the one that best matches the user locale, or the first
  2979  	// entry if there is no good match. There needs to be at least one entry.
  2980  	Name []*LocalizedText `json:"name,omitempty"`
  2981  	// OrderInPage: String (US-ASCII only) used to determine order of this cluster
  2982  	// within the parent page's elements. Page elements are sorted in lexicographic
  2983  	// order of this field. Duplicated values are allowed, but ordering between
  2984  	// elements with duplicate order is undefined. The value of this field is never
  2985  	// visible to a user, it is used solely for the purpose of defining an
  2986  	// ordering. Maximum length is 256 characters.
  2987  	OrderInPage string `json:"orderInPage,omitempty"`
  2988  	// ProductId: List of products in the order they are displayed in the cluster.
  2989  	// There should not be duplicates within a cluster.
  2990  	ProductId []string `json:"productId,omitempty"`
  2991  
  2992  	// ServerResponse contains the HTTP response code and headers from the server.
  2993  	googleapi.ServerResponse `json:"-"`
  2994  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2995  	// include in API requests. By default, fields with empty or default values are
  2996  	// omitted from API requests. See
  2997  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2998  	// details.
  2999  	ForceSendFields []string `json:"-"`
  3000  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3001  	// with the JSON null value. By default, fields with empty values are omitted
  3002  	// from API requests. See
  3003  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3004  	NullFields []string `json:"-"`
  3005  }
  3006  
  3007  func (s *StoreCluster) MarshalJSON() ([]byte, error) {
  3008  	type NoMethod StoreCluster
  3009  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3010  }
  3011  
  3012  // StoreLayout: General setting for the managed Google Play store layout,
  3013  // currently only specifying the page to display the first time the store is
  3014  // opened.
  3015  type StoreLayout struct {
  3016  	// HomepageId: The ID of the store page to be used as the homepage. The
  3017  	// homepage is the first page shown in the managed Google Play Store. Not
  3018  	// specifying a homepage is equivalent to setting the store layout type to
  3019  	// "basic".
  3020  	HomepageId string `json:"homepageId,omitempty"`
  3021  	// StoreLayoutType: The store layout type. By default, this value is set to
  3022  	// "basic" if the homepageId field is not set, and to "custom" otherwise. If
  3023  	// set to "basic", the layout will consist of all approved apps that have been
  3024  	// whitelisted for the user.
  3025  	//
  3026  	// Possible values:
  3027  	//   "unknown"
  3028  	//   "basic"
  3029  	//   "custom"
  3030  	StoreLayoutType string `json:"storeLayoutType,omitempty"`
  3031  
  3032  	// ServerResponse contains the HTTP response code and headers from the server.
  3033  	googleapi.ServerResponse `json:"-"`
  3034  	// ForceSendFields is a list of field names (e.g. "HomepageId") to
  3035  	// unconditionally include in API requests. By default, fields with empty or
  3036  	// default values are omitted from API requests. See
  3037  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3038  	// details.
  3039  	ForceSendFields []string `json:"-"`
  3040  	// NullFields is a list of field names (e.g. "HomepageId") to include in API
  3041  	// requests with the JSON null value. By default, fields with empty values are
  3042  	// omitted from API requests. See
  3043  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3044  	NullFields []string `json:"-"`
  3045  }
  3046  
  3047  func (s *StoreLayout) MarshalJSON() ([]byte, error) {
  3048  	type NoMethod StoreLayout
  3049  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3050  }
  3051  
  3052  type StoreLayoutClustersListResponse struct {
  3053  	// Cluster: A store cluster of an enterprise.
  3054  	Cluster []*StoreCluster `json:"cluster,omitempty"`
  3055  
  3056  	// ServerResponse contains the HTTP response code and headers from the server.
  3057  	googleapi.ServerResponse `json:"-"`
  3058  	// ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
  3059  	// include in API requests. By default, fields with empty or default values are
  3060  	// omitted from API requests. See
  3061  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3062  	// details.
  3063  	ForceSendFields []string `json:"-"`
  3064  	// NullFields is a list of field names (e.g. "Cluster") to include in API
  3065  	// requests with the JSON null value. By default, fields with empty values are
  3066  	// omitted from API requests. See
  3067  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3068  	NullFields []string `json:"-"`
  3069  }
  3070  
  3071  func (s *StoreLayoutClustersListResponse) MarshalJSON() ([]byte, error) {
  3072  	type NoMethod StoreLayoutClustersListResponse
  3073  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3074  }
  3075  
  3076  type StoreLayoutPagesListResponse struct {
  3077  	// Page: A store page of an enterprise.
  3078  	Page []*StorePage `json:"page,omitempty"`
  3079  
  3080  	// ServerResponse contains the HTTP response code and headers from the server.
  3081  	googleapi.ServerResponse `json:"-"`
  3082  	// ForceSendFields is a list of field names (e.g. "Page") to unconditionally
  3083  	// include in API requests. By default, fields with empty or default values are
  3084  	// omitted from API requests. See
  3085  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3086  	// details.
  3087  	ForceSendFields []string `json:"-"`
  3088  	// NullFields is a list of field names (e.g. "Page") to include in API requests
  3089  	// with the JSON null value. By default, fields with empty values are omitted
  3090  	// from API requests. See
  3091  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3092  	NullFields []string `json:"-"`
  3093  }
  3094  
  3095  func (s *StoreLayoutPagesListResponse) MarshalJSON() ([]byte, error) {
  3096  	type NoMethod StoreLayoutPagesListResponse
  3097  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3098  }
  3099  
  3100  // StorePage: Definition of a managed Google Play store page, made of a
  3101  // localized name and links to other pages. A page also contains clusters
  3102  // defined as a subcollection. *Deprecated* The managed Google Play Store
  3103  // homepage shows all apps listed in the Devices policy. If IT admins want to
  3104  // customize the homepage layout, they can organize apps into collections in
  3105  // the managed Google Play iframe.
  3106  type StorePage struct {
  3107  	// Id: Unique ID of this page. Assigned by the server. Immutable once assigned.
  3108  	Id string `json:"id,omitempty"`
  3109  	// Link: Ordered list of pages a user should be able to reach from this page.
  3110  	// The list can't include this page. It is recommended that the basic pages are
  3111  	// created first, before adding the links between pages. The API doesn't verify
  3112  	// that the pages exist or the pages are reachable.
  3113  	Link []string `json:"link,omitempty"`
  3114  	// Name: Ordered list of localized strings giving the name of this page. The
  3115  	// text displayed is the one that best matches the user locale, or the first
  3116  	// entry if there is no good match. There needs to be at least one entry.
  3117  	Name []*LocalizedText `json:"name,omitempty"`
  3118  
  3119  	// ServerResponse contains the HTTP response code and headers from the server.
  3120  	googleapi.ServerResponse `json:"-"`
  3121  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  3122  	// include in API requests. By default, fields with empty or default values are
  3123  	// omitted from API requests. See
  3124  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3125  	// details.
  3126  	ForceSendFields []string `json:"-"`
  3127  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3128  	// with the JSON null value. By default, fields with empty values are omitted
  3129  	// from API requests. See
  3130  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3131  	NullFields []string `json:"-"`
  3132  }
  3133  
  3134  func (s *StorePage) MarshalJSON() ([]byte, error) {
  3135  	type NoMethod StorePage
  3136  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3137  }
  3138  
  3139  // TokenPagination: Pagination information returned by a List operation when
  3140  // token pagination is enabled. List operations that supports paging return
  3141  // only one "page" of results. This protocol buffer message describes the page
  3142  // that has been returned. When using token pagination, clients should use the
  3143  // next/previous token to get another page of the result. The presence or
  3144  // absence of next/previous token indicates whether a next/previous page is
  3145  // available and provides a mean of accessing this page. ListRequest.page_token
  3146  // should be set to either next_page_token or previous_page_token to access
  3147  // another page.
  3148  type TokenPagination struct {
  3149  	// NextPageToken: Tokens to pass to the standard list field 'page_token'.
  3150  	// Whenever available, tokens are preferred over manipulating start_index.
  3151  	NextPageToken     string `json:"nextPageToken,omitempty"`
  3152  	PreviousPageToken string `json:"previousPageToken,omitempty"`
  3153  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3154  	// unconditionally include in API requests. By default, fields with empty or
  3155  	// default values are omitted from API requests. See
  3156  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3157  	// details.
  3158  	ForceSendFields []string `json:"-"`
  3159  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3160  	// requests with the JSON null value. By default, fields with empty values are
  3161  	// omitted from API requests. See
  3162  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3163  	NullFields []string `json:"-"`
  3164  }
  3165  
  3166  func (s *TokenPagination) MarshalJSON() ([]byte, error) {
  3167  	type NoMethod TokenPagination
  3168  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3169  }
  3170  
  3171  // TrackInfo: Id to name association of a track.
  3172  type TrackInfo struct {
  3173  	// TrackAlias: A modifiable name for a track. This is the visible name in the
  3174  	// play developer console.
  3175  	TrackAlias string `json:"trackAlias,omitempty"`
  3176  	// TrackId: Unmodifiable, unique track identifier. This identifier is the
  3177  	// releaseTrackId in the url of the play developer console page that displays
  3178  	// the track information.
  3179  	TrackId string `json:"trackId,omitempty"`
  3180  	// ForceSendFields is a list of field names (e.g. "TrackAlias") to
  3181  	// unconditionally include in API requests. By default, fields with empty or
  3182  	// default values are omitted from API requests. See
  3183  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3184  	// details.
  3185  	ForceSendFields []string `json:"-"`
  3186  	// NullFields is a list of field names (e.g. "TrackAlias") to include in API
  3187  	// requests with the JSON null value. By default, fields with empty values are
  3188  	// omitted from API requests. See
  3189  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3190  	NullFields []string `json:"-"`
  3191  }
  3192  
  3193  func (s *TrackInfo) MarshalJSON() ([]byte, error) {
  3194  	type NoMethod TrackInfo
  3195  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3196  }
  3197  
  3198  // User: A Users resource represents an account associated with an enterprise.
  3199  // The account may be specific to a device or to an individual user (who can
  3200  // then use the account across multiple devices). The account may provide
  3201  // access to managed Google Play only, or to other Google services, depending
  3202  // on the identity model: - The Google managed domain identity model requires
  3203  // synchronization to Google account sources (via primaryEmail). - The managed
  3204  // Google Play Accounts identity model provides a dynamic means for enterprises
  3205  // to create user or device accounts as needed. These accounts provide access
  3206  // to managed Google Play.
  3207  type User struct {
  3208  	// AccountIdentifier: A unique identifier you create for this user, such as
  3209  	// "user342" or "asset#44418". Do not use personally identifiable information
  3210  	// (PII) for this property. Must always be set for EMM-managed users. Not set
  3211  	// for Google-managed users.
  3212  	AccountIdentifier string `json:"accountIdentifier,omitempty"`
  3213  	// AccountType: The type of account that this user represents. A userAccount
  3214  	// can be installed on multiple devices, but a deviceAccount is specific to a
  3215  	// single device. An EMM-managed user (emmManaged) can be either type
  3216  	// (userAccount, deviceAccount), but a Google-managed user (googleManaged) is
  3217  	// always a userAccount.
  3218  	//
  3219  	// Possible values:
  3220  	//   "deviceAccount"
  3221  	//   "userAccount"
  3222  	AccountType string `json:"accountType,omitempty"`
  3223  	// DisplayName: The name that will appear in user interfaces. Setting this
  3224  	// property is optional when creating EMM-managed users. If you do set this
  3225  	// property, use something generic about the organization (such as "Example,
  3226  	// Inc.") or your name (as EMM). Not used for Google-managed user accounts.
  3227  	// @mutable androidenterprise.users.update
  3228  	DisplayName string `json:"displayName,omitempty"`
  3229  	// Id: The unique ID for the user.
  3230  	Id string `json:"id,omitempty"`
  3231  	// ManagementType: The entity that manages the user. With googleManaged users,
  3232  	// the source of truth is Google so EMMs have to make sure a Google Account
  3233  	// exists for the user. With emmManaged users, the EMM is in charge.
  3234  	//
  3235  	// Possible values:
  3236  	//   "googleManaged"
  3237  	//   "emmManaged"
  3238  	ManagementType string `json:"managementType,omitempty"`
  3239  	// PrimaryEmail: The user's primary email address, for example,
  3240  	// "jsmith@example.com". Will always be set for Google managed users and not
  3241  	// set for EMM managed users.
  3242  	PrimaryEmail string `json:"primaryEmail,omitempty"`
  3243  
  3244  	// ServerResponse contains the HTTP response code and headers from the server.
  3245  	googleapi.ServerResponse `json:"-"`
  3246  	// ForceSendFields is a list of field names (e.g. "AccountIdentifier") to
  3247  	// unconditionally include in API requests. By default, fields with empty or
  3248  	// default values are omitted from API requests. See
  3249  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3250  	// details.
  3251  	ForceSendFields []string `json:"-"`
  3252  	// NullFields is a list of field names (e.g. "AccountIdentifier") to include in
  3253  	// API requests with the JSON null value. By default, fields with empty values
  3254  	// are omitted from API requests. See
  3255  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3256  	NullFields []string `json:"-"`
  3257  }
  3258  
  3259  func (s *User) MarshalJSON() ([]byte, error) {
  3260  	type NoMethod User
  3261  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3262  }
  3263  
  3264  type UsersListResponse struct {
  3265  	// User: A user of an enterprise.
  3266  	User []*User `json:"user,omitempty"`
  3267  
  3268  	// ServerResponse contains the HTTP response code and headers from the server.
  3269  	googleapi.ServerResponse `json:"-"`
  3270  	// ForceSendFields is a list of field names (e.g. "User") to unconditionally
  3271  	// include in API requests. By default, fields with empty or default values are
  3272  	// omitted from API requests. See
  3273  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3274  	// details.
  3275  	ForceSendFields []string `json:"-"`
  3276  	// NullFields is a list of field names (e.g. "User") to include in API requests
  3277  	// with the JSON null value. By default, fields with empty values are omitted
  3278  	// from API requests. See
  3279  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3280  	NullFields []string `json:"-"`
  3281  }
  3282  
  3283  func (s *UsersListResponse) MarshalJSON() ([]byte, error) {
  3284  	type NoMethod UsersListResponse
  3285  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3286  }
  3287  
  3288  // VariableSet: A variable set is a key-value pair of EMM-provided placeholders
  3289  // and its corresponding value, which is attributed to a user. For example,
  3290  // $FIRSTNAME could be a placeholder, and its value could be Alice.
  3291  // Placeholders should start with a '$' sign and should be alphanumeric only.
  3292  type VariableSet struct {
  3293  	// Placeholder: The placeholder string; defined by EMM.
  3294  	Placeholder string `json:"placeholder,omitempty"`
  3295  	// UserValue: The value of the placeholder, specific to the user.
  3296  	UserValue string `json:"userValue,omitempty"`
  3297  	// ForceSendFields is a list of field names (e.g. "Placeholder") to
  3298  	// unconditionally include in API requests. By default, fields with empty or
  3299  	// default values are omitted from API requests. See
  3300  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3301  	// details.
  3302  	ForceSendFields []string `json:"-"`
  3303  	// NullFields is a list of field names (e.g. "Placeholder") to include in API
  3304  	// requests with the JSON null value. By default, fields with empty values are
  3305  	// omitted from API requests. See
  3306  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3307  	NullFields []string `json:"-"`
  3308  }
  3309  
  3310  func (s *VariableSet) MarshalJSON() ([]byte, error) {
  3311  	type NoMethod VariableSet
  3312  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3313  }
  3314  
  3315  // WebApp: A WebApps resource represents a web app created for an enterprise.
  3316  // Web apps are published to managed Google Play and can be distributed like
  3317  // other Android apps. On a user's device, a web app opens its specified URL.
  3318  type WebApp struct {
  3319  	// DisplayMode: The display mode of the web app. Possible values include: -
  3320  	// "minimalUi", the device's status bar, navigation bar, the app's URL, and a
  3321  	// refresh button are visible when the app is open. For HTTP URLs, you can only
  3322  	// select this option. - "standalone", the device's status bar and navigation
  3323  	// bar are visible when the app is open. - "fullScreen", the app opens in full
  3324  	// screen mode, hiding the device's status and navigation bars. All browser UI
  3325  	// elements, page URL, system status bar and back button are not visible, and
  3326  	// the web app takes up the entirety of the available display area.
  3327  	//
  3328  	// Possible values:
  3329  	//   "displayModeUnspecified"
  3330  	//   "minimalUi" - Opens the web app with a minimal set of browser UI elements
  3331  	// for controlling navigation and viewing the page URL.
  3332  	//   "standalone" - Opens the web app to look and feel like a standalone native
  3333  	// application. The browser UI elements and page URL are not visible, however
  3334  	// the system status bar and back button are visible.
  3335  	//   "fullScreen" - Opens the web app in full screen without any visible
  3336  	// controls. The browser UI elements, page URL, system status bar and back
  3337  	// button are not visible, and the web app takes up the entirety of the
  3338  	// available display area.
  3339  	DisplayMode string `json:"displayMode,omitempty"`
  3340  	// Icons: A list of icons representing this website. If absent, a default icon
  3341  	// (for create) or the current icon (for update) will be used.
  3342  	Icons []*WebAppIcon `json:"icons,omitempty"`
  3343  	// IsPublished: A flag whether the app has been published to the Play store
  3344  	// yet.
  3345  	IsPublished bool `json:"isPublished,omitempty"`
  3346  	// StartUrl: The start URL, i.e. the URL that should load when the user opens
  3347  	// the application.
  3348  	StartUrl string `json:"startUrl,omitempty"`
  3349  	// Title: The title of the web app as displayed to the user (e.g., amongst a
  3350  	// list of other applications, or as a label for an icon).
  3351  	Title string `json:"title,omitempty"`
  3352  	// VersionCode: The current version of the app. Note that the version can
  3353  	// automatically increase during the lifetime of the web app, while Google does
  3354  	// internal housekeeping to keep the web app up-to-date.
  3355  	VersionCode int64 `json:"versionCode,omitempty,string"`
  3356  	// WebAppId: The ID of the application. A string of the form "app:<package
  3357  	// name>" where the package name always starts with the prefix
  3358  	// "com.google.enterprise.webapp." followed by a random id.
  3359  	WebAppId string `json:"webAppId,omitempty"`
  3360  
  3361  	// ServerResponse contains the HTTP response code and headers from the server.
  3362  	googleapi.ServerResponse `json:"-"`
  3363  	// ForceSendFields is a list of field names (e.g. "DisplayMode") to
  3364  	// unconditionally include in API requests. By default, fields with empty or
  3365  	// default values are omitted from API requests. See
  3366  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3367  	// details.
  3368  	ForceSendFields []string `json:"-"`
  3369  	// NullFields is a list of field names (e.g. "DisplayMode") to include in API
  3370  	// requests with the JSON null value. By default, fields with empty values are
  3371  	// omitted from API requests. See
  3372  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3373  	NullFields []string `json:"-"`
  3374  }
  3375  
  3376  func (s *WebApp) MarshalJSON() ([]byte, error) {
  3377  	type NoMethod WebApp
  3378  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3379  }
  3380  
  3381  // WebAppIcon: Icon for a web app.
  3382  type WebAppIcon struct {
  3383  	// ImageData: The actual bytes of the image in a base64url encoded string (c.f.
  3384  	// RFC4648, section 5 "Base 64 Encoding with URL and Filename Safe Alphabet").
  3385  	// - The image type can be png or jpg. - The image should ideally be square. -
  3386  	// The image should ideally have a size of 512x512.
  3387  	ImageData string `json:"imageData,omitempty"`
  3388  	// ForceSendFields is a list of field names (e.g. "ImageData") to
  3389  	// unconditionally include in API requests. By default, fields with empty or
  3390  	// default values are omitted from API requests. See
  3391  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3392  	// details.
  3393  	ForceSendFields []string `json:"-"`
  3394  	// NullFields is a list of field names (e.g. "ImageData") to include in API
  3395  	// requests with the JSON null value. By default, fields with empty values are
  3396  	// omitted from API requests. See
  3397  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3398  	NullFields []string `json:"-"`
  3399  }
  3400  
  3401  func (s *WebAppIcon) MarshalJSON() ([]byte, error) {
  3402  	type NoMethod WebAppIcon
  3403  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3404  }
  3405  
  3406  type WebAppsListResponse struct {
  3407  	// WebApp: The manifest describing a web app.
  3408  	WebApp []*WebApp `json:"webApp,omitempty"`
  3409  
  3410  	// ServerResponse contains the HTTP response code and headers from the server.
  3411  	googleapi.ServerResponse `json:"-"`
  3412  	// ForceSendFields is a list of field names (e.g. "WebApp") to unconditionally
  3413  	// include in API requests. By default, fields with empty or default values are
  3414  	// omitted from API requests. See
  3415  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3416  	// details.
  3417  	ForceSendFields []string `json:"-"`
  3418  	// NullFields is a list of field names (e.g. "WebApp") to include in API
  3419  	// requests with the JSON null value. By default, fields with empty values are
  3420  	// omitted from API requests. See
  3421  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3422  	NullFields []string `json:"-"`
  3423  }
  3424  
  3425  func (s *WebAppsListResponse) MarshalJSON() ([]byte, error) {
  3426  	type NoMethod WebAppsListResponse
  3427  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3428  }
  3429  
  3430  type DevicesForceReportUploadCall struct {
  3431  	s            *Service
  3432  	enterpriseId string
  3433  	userId       string
  3434  	deviceId     string
  3435  	urlParams_   gensupport.URLParams
  3436  	ctx_         context.Context
  3437  	header_      http.Header
  3438  }
  3439  
  3440  // ForceReportUpload: Uploads a report containing any changes in app states on
  3441  // the device since the last report was generated. You can call this method up
  3442  // to 3 times every 24 hours for a given device. If you exceed the quota, then
  3443  // the Google Play EMM API returns HTTP 429 Too Many Requests.
  3444  //
  3445  // - deviceId: The ID of the device.
  3446  // - enterpriseId: The ID of the enterprise.
  3447  // - userId: The ID of the user.
  3448  func (r *DevicesService) ForceReportUpload(enterpriseId string, userId string, deviceId string) *DevicesForceReportUploadCall {
  3449  	c := &DevicesForceReportUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3450  	c.enterpriseId = enterpriseId
  3451  	c.userId = userId
  3452  	c.deviceId = deviceId
  3453  	return c
  3454  }
  3455  
  3456  // Fields allows partial responses to be retrieved. See
  3457  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3458  // details.
  3459  func (c *DevicesForceReportUploadCall) Fields(s ...googleapi.Field) *DevicesForceReportUploadCall {
  3460  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3461  	return c
  3462  }
  3463  
  3464  // Context sets the context to be used in this call's Do method.
  3465  func (c *DevicesForceReportUploadCall) Context(ctx context.Context) *DevicesForceReportUploadCall {
  3466  	c.ctx_ = ctx
  3467  	return c
  3468  }
  3469  
  3470  // Header returns a http.Header that can be modified by the caller to add
  3471  // headers to the request.
  3472  func (c *DevicesForceReportUploadCall) Header() http.Header {
  3473  	if c.header_ == nil {
  3474  		c.header_ = make(http.Header)
  3475  	}
  3476  	return c.header_
  3477  }
  3478  
  3479  func (c *DevicesForceReportUploadCall) doRequest(alt string) (*http.Response, error) {
  3480  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3481  	var body io.Reader = nil
  3482  	c.urlParams_.Set("alt", alt)
  3483  	c.urlParams_.Set("prettyPrint", "false")
  3484  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/forceReportUpload")
  3485  	urls += "?" + c.urlParams_.Encode()
  3486  	req, err := http.NewRequest("POST", urls, body)
  3487  	if err != nil {
  3488  		return nil, err
  3489  	}
  3490  	req.Header = reqHeaders
  3491  	googleapi.Expand(req.URL, map[string]string{
  3492  		"enterpriseId": c.enterpriseId,
  3493  		"userId":       c.userId,
  3494  		"deviceId":     c.deviceId,
  3495  	})
  3496  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3497  }
  3498  
  3499  // Do executes the "androidenterprise.devices.forceReportUpload" call.
  3500  func (c *DevicesForceReportUploadCall) Do(opts ...googleapi.CallOption) error {
  3501  	gensupport.SetOptions(c.urlParams_, opts...)
  3502  	res, err := c.doRequest("json")
  3503  	if err != nil {
  3504  		return err
  3505  	}
  3506  	defer googleapi.CloseBody(res)
  3507  	if err := googleapi.CheckResponse(res); err != nil {
  3508  		return gensupport.WrapError(err)
  3509  	}
  3510  	return nil
  3511  }
  3512  
  3513  type DevicesGetCall struct {
  3514  	s            *Service
  3515  	enterpriseId string
  3516  	userId       string
  3517  	deviceId     string
  3518  	urlParams_   gensupport.URLParams
  3519  	ifNoneMatch_ string
  3520  	ctx_         context.Context
  3521  	header_      http.Header
  3522  }
  3523  
  3524  // Get: Retrieves the details of a device.
  3525  //
  3526  // - deviceId: The ID of the device.
  3527  // - enterpriseId: The ID of the enterprise.
  3528  // - userId: The ID of the user.
  3529  func (r *DevicesService) Get(enterpriseId string, userId string, deviceId string) *DevicesGetCall {
  3530  	c := &DevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3531  	c.enterpriseId = enterpriseId
  3532  	c.userId = userId
  3533  	c.deviceId = deviceId
  3534  	return c
  3535  }
  3536  
  3537  // Fields allows partial responses to be retrieved. See
  3538  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3539  // details.
  3540  func (c *DevicesGetCall) Fields(s ...googleapi.Field) *DevicesGetCall {
  3541  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3542  	return c
  3543  }
  3544  
  3545  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3546  // object's ETag matches the given value. This is useful for getting updates
  3547  // only after the object has changed since the last request.
  3548  func (c *DevicesGetCall) IfNoneMatch(entityTag string) *DevicesGetCall {
  3549  	c.ifNoneMatch_ = entityTag
  3550  	return c
  3551  }
  3552  
  3553  // Context sets the context to be used in this call's Do method.
  3554  func (c *DevicesGetCall) Context(ctx context.Context) *DevicesGetCall {
  3555  	c.ctx_ = ctx
  3556  	return c
  3557  }
  3558  
  3559  // Header returns a http.Header that can be modified by the caller to add
  3560  // headers to the request.
  3561  func (c *DevicesGetCall) Header() http.Header {
  3562  	if c.header_ == nil {
  3563  		c.header_ = make(http.Header)
  3564  	}
  3565  	return c.header_
  3566  }
  3567  
  3568  func (c *DevicesGetCall) doRequest(alt string) (*http.Response, error) {
  3569  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3570  	if c.ifNoneMatch_ != "" {
  3571  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3572  	}
  3573  	var body io.Reader = nil
  3574  	c.urlParams_.Set("alt", alt)
  3575  	c.urlParams_.Set("prettyPrint", "false")
  3576  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}")
  3577  	urls += "?" + c.urlParams_.Encode()
  3578  	req, err := http.NewRequest("GET", urls, body)
  3579  	if err != nil {
  3580  		return nil, err
  3581  	}
  3582  	req.Header = reqHeaders
  3583  	googleapi.Expand(req.URL, map[string]string{
  3584  		"enterpriseId": c.enterpriseId,
  3585  		"userId":       c.userId,
  3586  		"deviceId":     c.deviceId,
  3587  	})
  3588  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3589  }
  3590  
  3591  // Do executes the "androidenterprise.devices.get" call.
  3592  // Any non-2xx status code is an error. Response headers are in either
  3593  // *Device.ServerResponse.Header or (if a response was returned at all) in
  3594  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3595  // whether the returned error was because http.StatusNotModified was returned.
  3596  func (c *DevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) {
  3597  	gensupport.SetOptions(c.urlParams_, opts...)
  3598  	res, err := c.doRequest("json")
  3599  	if res != nil && res.StatusCode == http.StatusNotModified {
  3600  		if res.Body != nil {
  3601  			res.Body.Close()
  3602  		}
  3603  		return nil, gensupport.WrapError(&googleapi.Error{
  3604  			Code:   res.StatusCode,
  3605  			Header: res.Header,
  3606  		})
  3607  	}
  3608  	if err != nil {
  3609  		return nil, err
  3610  	}
  3611  	defer googleapi.CloseBody(res)
  3612  	if err := googleapi.CheckResponse(res); err != nil {
  3613  		return nil, gensupport.WrapError(err)
  3614  	}
  3615  	ret := &Device{
  3616  		ServerResponse: googleapi.ServerResponse{
  3617  			Header:         res.Header,
  3618  			HTTPStatusCode: res.StatusCode,
  3619  		},
  3620  	}
  3621  	target := &ret
  3622  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3623  		return nil, err
  3624  	}
  3625  	return ret, nil
  3626  }
  3627  
  3628  type DevicesGetStateCall struct {
  3629  	s            *Service
  3630  	enterpriseId string
  3631  	userId       string
  3632  	deviceId     string
  3633  	urlParams_   gensupport.URLParams
  3634  	ifNoneMatch_ string
  3635  	ctx_         context.Context
  3636  	header_      http.Header
  3637  }
  3638  
  3639  // GetState: Retrieves whether a device's access to Google services is enabled
  3640  // or disabled. The device state takes effect only if enforcing EMM policies on
  3641  // Android devices is enabled in the Google Admin Console. Otherwise, the
  3642  // device state is ignored and all devices are allowed access to Google
  3643  // services. This is only supported for Google-managed users.
  3644  //
  3645  // - deviceId: The ID of the device.
  3646  // - enterpriseId: The ID of the enterprise.
  3647  // - userId: The ID of the user.
  3648  func (r *DevicesService) GetState(enterpriseId string, userId string, deviceId string) *DevicesGetStateCall {
  3649  	c := &DevicesGetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3650  	c.enterpriseId = enterpriseId
  3651  	c.userId = userId
  3652  	c.deviceId = deviceId
  3653  	return c
  3654  }
  3655  
  3656  // Fields allows partial responses to be retrieved. See
  3657  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3658  // details.
  3659  func (c *DevicesGetStateCall) Fields(s ...googleapi.Field) *DevicesGetStateCall {
  3660  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3661  	return c
  3662  }
  3663  
  3664  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3665  // object's ETag matches the given value. This is useful for getting updates
  3666  // only after the object has changed since the last request.
  3667  func (c *DevicesGetStateCall) IfNoneMatch(entityTag string) *DevicesGetStateCall {
  3668  	c.ifNoneMatch_ = entityTag
  3669  	return c
  3670  }
  3671  
  3672  // Context sets the context to be used in this call's Do method.
  3673  func (c *DevicesGetStateCall) Context(ctx context.Context) *DevicesGetStateCall {
  3674  	c.ctx_ = ctx
  3675  	return c
  3676  }
  3677  
  3678  // Header returns a http.Header that can be modified by the caller to add
  3679  // headers to the request.
  3680  func (c *DevicesGetStateCall) Header() http.Header {
  3681  	if c.header_ == nil {
  3682  		c.header_ = make(http.Header)
  3683  	}
  3684  	return c.header_
  3685  }
  3686  
  3687  func (c *DevicesGetStateCall) doRequest(alt string) (*http.Response, error) {
  3688  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3689  	if c.ifNoneMatch_ != "" {
  3690  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3691  	}
  3692  	var body io.Reader = nil
  3693  	c.urlParams_.Set("alt", alt)
  3694  	c.urlParams_.Set("prettyPrint", "false")
  3695  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state")
  3696  	urls += "?" + c.urlParams_.Encode()
  3697  	req, err := http.NewRequest("GET", urls, body)
  3698  	if err != nil {
  3699  		return nil, err
  3700  	}
  3701  	req.Header = reqHeaders
  3702  	googleapi.Expand(req.URL, map[string]string{
  3703  		"enterpriseId": c.enterpriseId,
  3704  		"userId":       c.userId,
  3705  		"deviceId":     c.deviceId,
  3706  	})
  3707  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3708  }
  3709  
  3710  // Do executes the "androidenterprise.devices.getState" call.
  3711  // Any non-2xx status code is an error. Response headers are in either
  3712  // *DeviceState.ServerResponse.Header or (if a response was returned at all) in
  3713  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3714  // whether the returned error was because http.StatusNotModified was returned.
  3715  func (c *DevicesGetStateCall) Do(opts ...googleapi.CallOption) (*DeviceState, error) {
  3716  	gensupport.SetOptions(c.urlParams_, opts...)
  3717  	res, err := c.doRequest("json")
  3718  	if res != nil && res.StatusCode == http.StatusNotModified {
  3719  		if res.Body != nil {
  3720  			res.Body.Close()
  3721  		}
  3722  		return nil, gensupport.WrapError(&googleapi.Error{
  3723  			Code:   res.StatusCode,
  3724  			Header: res.Header,
  3725  		})
  3726  	}
  3727  	if err != nil {
  3728  		return nil, err
  3729  	}
  3730  	defer googleapi.CloseBody(res)
  3731  	if err := googleapi.CheckResponse(res); err != nil {
  3732  		return nil, gensupport.WrapError(err)
  3733  	}
  3734  	ret := &DeviceState{
  3735  		ServerResponse: googleapi.ServerResponse{
  3736  			Header:         res.Header,
  3737  			HTTPStatusCode: res.StatusCode,
  3738  		},
  3739  	}
  3740  	target := &ret
  3741  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3742  		return nil, err
  3743  	}
  3744  	return ret, nil
  3745  }
  3746  
  3747  type DevicesListCall struct {
  3748  	s            *Service
  3749  	enterpriseId string
  3750  	userId       string
  3751  	urlParams_   gensupport.URLParams
  3752  	ifNoneMatch_ string
  3753  	ctx_         context.Context
  3754  	header_      http.Header
  3755  }
  3756  
  3757  // List: Retrieves the IDs of all of a user's devices.
  3758  //
  3759  // - enterpriseId: The ID of the enterprise.
  3760  // - userId: The ID of the user.
  3761  func (r *DevicesService) List(enterpriseId string, userId string) *DevicesListCall {
  3762  	c := &DevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3763  	c.enterpriseId = enterpriseId
  3764  	c.userId = userId
  3765  	return c
  3766  }
  3767  
  3768  // Fields allows partial responses to be retrieved. See
  3769  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3770  // details.
  3771  func (c *DevicesListCall) Fields(s ...googleapi.Field) *DevicesListCall {
  3772  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3773  	return c
  3774  }
  3775  
  3776  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3777  // object's ETag matches the given value. This is useful for getting updates
  3778  // only after the object has changed since the last request.
  3779  func (c *DevicesListCall) IfNoneMatch(entityTag string) *DevicesListCall {
  3780  	c.ifNoneMatch_ = entityTag
  3781  	return c
  3782  }
  3783  
  3784  // Context sets the context to be used in this call's Do method.
  3785  func (c *DevicesListCall) Context(ctx context.Context) *DevicesListCall {
  3786  	c.ctx_ = ctx
  3787  	return c
  3788  }
  3789  
  3790  // Header returns a http.Header that can be modified by the caller to add
  3791  // headers to the request.
  3792  func (c *DevicesListCall) Header() http.Header {
  3793  	if c.header_ == nil {
  3794  		c.header_ = make(http.Header)
  3795  	}
  3796  	return c.header_
  3797  }
  3798  
  3799  func (c *DevicesListCall) doRequest(alt string) (*http.Response, error) {
  3800  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3801  	if c.ifNoneMatch_ != "" {
  3802  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3803  	}
  3804  	var body io.Reader = nil
  3805  	c.urlParams_.Set("alt", alt)
  3806  	c.urlParams_.Set("prettyPrint", "false")
  3807  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices")
  3808  	urls += "?" + c.urlParams_.Encode()
  3809  	req, err := http.NewRequest("GET", urls, body)
  3810  	if err != nil {
  3811  		return nil, err
  3812  	}
  3813  	req.Header = reqHeaders
  3814  	googleapi.Expand(req.URL, map[string]string{
  3815  		"enterpriseId": c.enterpriseId,
  3816  		"userId":       c.userId,
  3817  	})
  3818  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3819  }
  3820  
  3821  // Do executes the "androidenterprise.devices.list" call.
  3822  // Any non-2xx status code is an error. Response headers are in either
  3823  // *DevicesListResponse.ServerResponse.Header or (if a response was returned at
  3824  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3825  // check whether the returned error was because http.StatusNotModified was
  3826  // returned.
  3827  func (c *DevicesListCall) Do(opts ...googleapi.CallOption) (*DevicesListResponse, error) {
  3828  	gensupport.SetOptions(c.urlParams_, opts...)
  3829  	res, err := c.doRequest("json")
  3830  	if res != nil && res.StatusCode == http.StatusNotModified {
  3831  		if res.Body != nil {
  3832  			res.Body.Close()
  3833  		}
  3834  		return nil, gensupport.WrapError(&googleapi.Error{
  3835  			Code:   res.StatusCode,
  3836  			Header: res.Header,
  3837  		})
  3838  	}
  3839  	if err != nil {
  3840  		return nil, err
  3841  	}
  3842  	defer googleapi.CloseBody(res)
  3843  	if err := googleapi.CheckResponse(res); err != nil {
  3844  		return nil, gensupport.WrapError(err)
  3845  	}
  3846  	ret := &DevicesListResponse{
  3847  		ServerResponse: googleapi.ServerResponse{
  3848  			Header:         res.Header,
  3849  			HTTPStatusCode: res.StatusCode,
  3850  		},
  3851  	}
  3852  	target := &ret
  3853  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3854  		return nil, err
  3855  	}
  3856  	return ret, nil
  3857  }
  3858  
  3859  type DevicesSetStateCall struct {
  3860  	s            *Service
  3861  	enterpriseId string
  3862  	userId       string
  3863  	deviceId     string
  3864  	devicestate  *DeviceState
  3865  	urlParams_   gensupport.URLParams
  3866  	ctx_         context.Context
  3867  	header_      http.Header
  3868  }
  3869  
  3870  // SetState: Sets whether a device's access to Google services is enabled or
  3871  // disabled. The device state takes effect only if enforcing EMM policies on
  3872  // Android devices is enabled in the Google Admin Console. Otherwise, the
  3873  // device state is ignored and all devices are allowed access to Google
  3874  // services. This is only supported for Google-managed users.
  3875  //
  3876  // - deviceId: The ID of the device.
  3877  // - enterpriseId: The ID of the enterprise.
  3878  // - userId: The ID of the user.
  3879  func (r *DevicesService) SetState(enterpriseId string, userId string, deviceId string, devicestate *DeviceState) *DevicesSetStateCall {
  3880  	c := &DevicesSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3881  	c.enterpriseId = enterpriseId
  3882  	c.userId = userId
  3883  	c.deviceId = deviceId
  3884  	c.devicestate = devicestate
  3885  	return c
  3886  }
  3887  
  3888  // Fields allows partial responses to be retrieved. See
  3889  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3890  // details.
  3891  func (c *DevicesSetStateCall) Fields(s ...googleapi.Field) *DevicesSetStateCall {
  3892  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3893  	return c
  3894  }
  3895  
  3896  // Context sets the context to be used in this call's Do method.
  3897  func (c *DevicesSetStateCall) Context(ctx context.Context) *DevicesSetStateCall {
  3898  	c.ctx_ = ctx
  3899  	return c
  3900  }
  3901  
  3902  // Header returns a http.Header that can be modified by the caller to add
  3903  // headers to the request.
  3904  func (c *DevicesSetStateCall) Header() http.Header {
  3905  	if c.header_ == nil {
  3906  		c.header_ = make(http.Header)
  3907  	}
  3908  	return c.header_
  3909  }
  3910  
  3911  func (c *DevicesSetStateCall) doRequest(alt string) (*http.Response, error) {
  3912  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3913  	var body io.Reader = nil
  3914  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.devicestate)
  3915  	if err != nil {
  3916  		return nil, err
  3917  	}
  3918  	c.urlParams_.Set("alt", alt)
  3919  	c.urlParams_.Set("prettyPrint", "false")
  3920  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state")
  3921  	urls += "?" + c.urlParams_.Encode()
  3922  	req, err := http.NewRequest("PUT", urls, body)
  3923  	if err != nil {
  3924  		return nil, err
  3925  	}
  3926  	req.Header = reqHeaders
  3927  	googleapi.Expand(req.URL, map[string]string{
  3928  		"enterpriseId": c.enterpriseId,
  3929  		"userId":       c.userId,
  3930  		"deviceId":     c.deviceId,
  3931  	})
  3932  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3933  }
  3934  
  3935  // Do executes the "androidenterprise.devices.setState" call.
  3936  // Any non-2xx status code is an error. Response headers are in either
  3937  // *DeviceState.ServerResponse.Header or (if a response was returned at all) in
  3938  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3939  // whether the returned error was because http.StatusNotModified was returned.
  3940  func (c *DevicesSetStateCall) Do(opts ...googleapi.CallOption) (*DeviceState, error) {
  3941  	gensupport.SetOptions(c.urlParams_, opts...)
  3942  	res, err := c.doRequest("json")
  3943  	if res != nil && res.StatusCode == http.StatusNotModified {
  3944  		if res.Body != nil {
  3945  			res.Body.Close()
  3946  		}
  3947  		return nil, gensupport.WrapError(&googleapi.Error{
  3948  			Code:   res.StatusCode,
  3949  			Header: res.Header,
  3950  		})
  3951  	}
  3952  	if err != nil {
  3953  		return nil, err
  3954  	}
  3955  	defer googleapi.CloseBody(res)
  3956  	if err := googleapi.CheckResponse(res); err != nil {
  3957  		return nil, gensupport.WrapError(err)
  3958  	}
  3959  	ret := &DeviceState{
  3960  		ServerResponse: googleapi.ServerResponse{
  3961  			Header:         res.Header,
  3962  			HTTPStatusCode: res.StatusCode,
  3963  		},
  3964  	}
  3965  	target := &ret
  3966  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3967  		return nil, err
  3968  	}
  3969  	return ret, nil
  3970  }
  3971  
  3972  type DevicesUpdateCall struct {
  3973  	s            *Service
  3974  	enterpriseId string
  3975  	userId       string
  3976  	deviceId     string
  3977  	device       *Device
  3978  	urlParams_   gensupport.URLParams
  3979  	ctx_         context.Context
  3980  	header_      http.Header
  3981  }
  3982  
  3983  // Update: Updates the device policy. To ensure the policy is properly
  3984  // enforced, you need to prevent unmanaged accounts from accessing Google Play
  3985  // by setting the allowed_accounts in the managed configuration for the Google
  3986  // Play package. See restrict accounts in Google Play. When provisioning a new
  3987  // device, you should set the device policy using this method before adding the
  3988  // managed Google Play Account to the device, otherwise the policy will not be
  3989  // applied for a short period of time after adding the account to the device.
  3990  //
  3991  // - deviceId: The ID of the device.
  3992  // - enterpriseId: The ID of the enterprise.
  3993  // - userId: The ID of the user.
  3994  func (r *DevicesService) Update(enterpriseId string, userId string, deviceId string, device *Device) *DevicesUpdateCall {
  3995  	c := &DevicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3996  	c.enterpriseId = enterpriseId
  3997  	c.userId = userId
  3998  	c.deviceId = deviceId
  3999  	c.device = device
  4000  	return c
  4001  }
  4002  
  4003  // UpdateMask sets the optional parameter "updateMask": Mask that identifies
  4004  // which fields to update. If not set, all modifiable fields will be modified.
  4005  // When set in a query parameter, this field should be specified as
  4006  // updateMask=<field1>,<field2>,...
  4007  func (c *DevicesUpdateCall) UpdateMask(updateMask string) *DevicesUpdateCall {
  4008  	c.urlParams_.Set("updateMask", updateMask)
  4009  	return c
  4010  }
  4011  
  4012  // Fields allows partial responses to be retrieved. See
  4013  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4014  // details.
  4015  func (c *DevicesUpdateCall) Fields(s ...googleapi.Field) *DevicesUpdateCall {
  4016  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4017  	return c
  4018  }
  4019  
  4020  // Context sets the context to be used in this call's Do method.
  4021  func (c *DevicesUpdateCall) Context(ctx context.Context) *DevicesUpdateCall {
  4022  	c.ctx_ = ctx
  4023  	return c
  4024  }
  4025  
  4026  // Header returns a http.Header that can be modified by the caller to add
  4027  // headers to the request.
  4028  func (c *DevicesUpdateCall) Header() http.Header {
  4029  	if c.header_ == nil {
  4030  		c.header_ = make(http.Header)
  4031  	}
  4032  	return c.header_
  4033  }
  4034  
  4035  func (c *DevicesUpdateCall) doRequest(alt string) (*http.Response, error) {
  4036  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4037  	var body io.Reader = nil
  4038  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.device)
  4039  	if err != nil {
  4040  		return nil, err
  4041  	}
  4042  	c.urlParams_.Set("alt", alt)
  4043  	c.urlParams_.Set("prettyPrint", "false")
  4044  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}")
  4045  	urls += "?" + c.urlParams_.Encode()
  4046  	req, err := http.NewRequest("PUT", urls, body)
  4047  	if err != nil {
  4048  		return nil, err
  4049  	}
  4050  	req.Header = reqHeaders
  4051  	googleapi.Expand(req.URL, map[string]string{
  4052  		"enterpriseId": c.enterpriseId,
  4053  		"userId":       c.userId,
  4054  		"deviceId":     c.deviceId,
  4055  	})
  4056  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4057  }
  4058  
  4059  // Do executes the "androidenterprise.devices.update" call.
  4060  // Any non-2xx status code is an error. Response headers are in either
  4061  // *Device.ServerResponse.Header or (if a response was returned at all) in
  4062  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4063  // whether the returned error was because http.StatusNotModified was returned.
  4064  func (c *DevicesUpdateCall) Do(opts ...googleapi.CallOption) (*Device, error) {
  4065  	gensupport.SetOptions(c.urlParams_, opts...)
  4066  	res, err := c.doRequest("json")
  4067  	if res != nil && res.StatusCode == http.StatusNotModified {
  4068  		if res.Body != nil {
  4069  			res.Body.Close()
  4070  		}
  4071  		return nil, gensupport.WrapError(&googleapi.Error{
  4072  			Code:   res.StatusCode,
  4073  			Header: res.Header,
  4074  		})
  4075  	}
  4076  	if err != nil {
  4077  		return nil, err
  4078  	}
  4079  	defer googleapi.CloseBody(res)
  4080  	if err := googleapi.CheckResponse(res); err != nil {
  4081  		return nil, gensupport.WrapError(err)
  4082  	}
  4083  	ret := &Device{
  4084  		ServerResponse: googleapi.ServerResponse{
  4085  			Header:         res.Header,
  4086  			HTTPStatusCode: res.StatusCode,
  4087  		},
  4088  	}
  4089  	target := &ret
  4090  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4091  		return nil, err
  4092  	}
  4093  	return ret, nil
  4094  }
  4095  
  4096  type EnterprisesAcknowledgeNotificationSetCall struct {
  4097  	s          *Service
  4098  	urlParams_ gensupport.URLParams
  4099  	ctx_       context.Context
  4100  	header_    http.Header
  4101  }
  4102  
  4103  // AcknowledgeNotificationSet: Acknowledges notifications that were received
  4104  // from Enterprises.PullNotificationSet to prevent subsequent calls from
  4105  // returning the same notifications.
  4106  func (r *EnterprisesService) AcknowledgeNotificationSet() *EnterprisesAcknowledgeNotificationSetCall {
  4107  	c := &EnterprisesAcknowledgeNotificationSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4108  	return c
  4109  }
  4110  
  4111  // NotificationSetId sets the optional parameter "notificationSetId": The
  4112  // notification set ID as returned by Enterprises.PullNotificationSet. This
  4113  // must be provided.
  4114  func (c *EnterprisesAcknowledgeNotificationSetCall) NotificationSetId(notificationSetId string) *EnterprisesAcknowledgeNotificationSetCall {
  4115  	c.urlParams_.Set("notificationSetId", notificationSetId)
  4116  	return c
  4117  }
  4118  
  4119  // Fields allows partial responses to be retrieved. See
  4120  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4121  // details.
  4122  func (c *EnterprisesAcknowledgeNotificationSetCall) Fields(s ...googleapi.Field) *EnterprisesAcknowledgeNotificationSetCall {
  4123  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4124  	return c
  4125  }
  4126  
  4127  // Context sets the context to be used in this call's Do method.
  4128  func (c *EnterprisesAcknowledgeNotificationSetCall) Context(ctx context.Context) *EnterprisesAcknowledgeNotificationSetCall {
  4129  	c.ctx_ = ctx
  4130  	return c
  4131  }
  4132  
  4133  // Header returns a http.Header that can be modified by the caller to add
  4134  // headers to the request.
  4135  func (c *EnterprisesAcknowledgeNotificationSetCall) Header() http.Header {
  4136  	if c.header_ == nil {
  4137  		c.header_ = make(http.Header)
  4138  	}
  4139  	return c.header_
  4140  }
  4141  
  4142  func (c *EnterprisesAcknowledgeNotificationSetCall) doRequest(alt string) (*http.Response, error) {
  4143  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4144  	var body io.Reader = nil
  4145  	c.urlParams_.Set("alt", alt)
  4146  	c.urlParams_.Set("prettyPrint", "false")
  4147  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/acknowledgeNotificationSet")
  4148  	urls += "?" + c.urlParams_.Encode()
  4149  	req, err := http.NewRequest("POST", urls, body)
  4150  	if err != nil {
  4151  		return nil, err
  4152  	}
  4153  	req.Header = reqHeaders
  4154  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4155  }
  4156  
  4157  // Do executes the "androidenterprise.enterprises.acknowledgeNotificationSet" call.
  4158  func (c *EnterprisesAcknowledgeNotificationSetCall) Do(opts ...googleapi.CallOption) error {
  4159  	gensupport.SetOptions(c.urlParams_, opts...)
  4160  	res, err := c.doRequest("json")
  4161  	if err != nil {
  4162  		return err
  4163  	}
  4164  	defer googleapi.CloseBody(res)
  4165  	if err := googleapi.CheckResponse(res); err != nil {
  4166  		return gensupport.WrapError(err)
  4167  	}
  4168  	return nil
  4169  }
  4170  
  4171  type EnterprisesCompleteSignupCall struct {
  4172  	s          *Service
  4173  	urlParams_ gensupport.URLParams
  4174  	ctx_       context.Context
  4175  	header_    http.Header
  4176  }
  4177  
  4178  // CompleteSignup: Completes the signup flow, by specifying the Completion
  4179  // token and Enterprise token. This request must not be called multiple times
  4180  // for a given Enterprise Token.
  4181  func (r *EnterprisesService) CompleteSignup() *EnterprisesCompleteSignupCall {
  4182  	c := &EnterprisesCompleteSignupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4183  	return c
  4184  }
  4185  
  4186  // CompletionToken sets the optional parameter "completionToken": The
  4187  // Completion token initially returned by GenerateSignupUrl.
  4188  func (c *EnterprisesCompleteSignupCall) CompletionToken(completionToken string) *EnterprisesCompleteSignupCall {
  4189  	c.urlParams_.Set("completionToken", completionToken)
  4190  	return c
  4191  }
  4192  
  4193  // EnterpriseToken sets the optional parameter "enterpriseToken": The
  4194  // Enterprise token appended to the Callback URL.
  4195  func (c *EnterprisesCompleteSignupCall) EnterpriseToken(enterpriseToken string) *EnterprisesCompleteSignupCall {
  4196  	c.urlParams_.Set("enterpriseToken", enterpriseToken)
  4197  	return c
  4198  }
  4199  
  4200  // Fields allows partial responses to be retrieved. See
  4201  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4202  // details.
  4203  func (c *EnterprisesCompleteSignupCall) Fields(s ...googleapi.Field) *EnterprisesCompleteSignupCall {
  4204  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4205  	return c
  4206  }
  4207  
  4208  // Context sets the context to be used in this call's Do method.
  4209  func (c *EnterprisesCompleteSignupCall) Context(ctx context.Context) *EnterprisesCompleteSignupCall {
  4210  	c.ctx_ = ctx
  4211  	return c
  4212  }
  4213  
  4214  // Header returns a http.Header that can be modified by the caller to add
  4215  // headers to the request.
  4216  func (c *EnterprisesCompleteSignupCall) Header() http.Header {
  4217  	if c.header_ == nil {
  4218  		c.header_ = make(http.Header)
  4219  	}
  4220  	return c.header_
  4221  }
  4222  
  4223  func (c *EnterprisesCompleteSignupCall) doRequest(alt string) (*http.Response, error) {
  4224  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4225  	var body io.Reader = nil
  4226  	c.urlParams_.Set("alt", alt)
  4227  	c.urlParams_.Set("prettyPrint", "false")
  4228  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/completeSignup")
  4229  	urls += "?" + c.urlParams_.Encode()
  4230  	req, err := http.NewRequest("POST", urls, body)
  4231  	if err != nil {
  4232  		return nil, err
  4233  	}
  4234  	req.Header = reqHeaders
  4235  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4236  }
  4237  
  4238  // Do executes the "androidenterprise.enterprises.completeSignup" call.
  4239  // Any non-2xx status code is an error. Response headers are in either
  4240  // *Enterprise.ServerResponse.Header or (if a response was returned at all) in
  4241  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4242  // whether the returned error was because http.StatusNotModified was returned.
  4243  func (c *EnterprisesCompleteSignupCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
  4244  	gensupport.SetOptions(c.urlParams_, opts...)
  4245  	res, err := c.doRequest("json")
  4246  	if res != nil && res.StatusCode == http.StatusNotModified {
  4247  		if res.Body != nil {
  4248  			res.Body.Close()
  4249  		}
  4250  		return nil, gensupport.WrapError(&googleapi.Error{
  4251  			Code:   res.StatusCode,
  4252  			Header: res.Header,
  4253  		})
  4254  	}
  4255  	if err != nil {
  4256  		return nil, err
  4257  	}
  4258  	defer googleapi.CloseBody(res)
  4259  	if err := googleapi.CheckResponse(res); err != nil {
  4260  		return nil, gensupport.WrapError(err)
  4261  	}
  4262  	ret := &Enterprise{
  4263  		ServerResponse: googleapi.ServerResponse{
  4264  			Header:         res.Header,
  4265  			HTTPStatusCode: res.StatusCode,
  4266  		},
  4267  	}
  4268  	target := &ret
  4269  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4270  		return nil, err
  4271  	}
  4272  	return ret, nil
  4273  }
  4274  
  4275  type EnterprisesCreateEnrollmentTokenCall struct {
  4276  	s            *Service
  4277  	enterpriseId string
  4278  	urlParams_   gensupport.URLParams
  4279  	ctx_         context.Context
  4280  	header_      http.Header
  4281  }
  4282  
  4283  // CreateEnrollmentToken: Returns a token for device enrollment. The DPC can
  4284  // encode this token within the QR/NFC/zero-touch enrollment payload or fetch
  4285  // it before calling the on-device API to authenticate the user. The token can
  4286  // be generated for each device or reused across multiple devices.
  4287  //
  4288  // - enterpriseId: The ID of the enterprise.
  4289  func (r *EnterprisesService) CreateEnrollmentToken(enterpriseId string) *EnterprisesCreateEnrollmentTokenCall {
  4290  	c := &EnterprisesCreateEnrollmentTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4291  	c.enterpriseId = enterpriseId
  4292  	return c
  4293  }
  4294  
  4295  // DeviceType sets the optional parameter "deviceType": Whether it’s a
  4296  // dedicated device or a knowledge worker device.
  4297  //
  4298  // Possible values:
  4299  //
  4300  //	"unknown" - This value is unused
  4301  //	"dedicatedDevice" - This device is a dedicated device.
  4302  //	"knowledgeWorker" - This device is required to have an authenticated user.
  4303  func (c *EnterprisesCreateEnrollmentTokenCall) DeviceType(deviceType string) *EnterprisesCreateEnrollmentTokenCall {
  4304  	c.urlParams_.Set("deviceType", deviceType)
  4305  	return c
  4306  }
  4307  
  4308  // Fields allows partial responses to be retrieved. See
  4309  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4310  // details.
  4311  func (c *EnterprisesCreateEnrollmentTokenCall) Fields(s ...googleapi.Field) *EnterprisesCreateEnrollmentTokenCall {
  4312  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4313  	return c
  4314  }
  4315  
  4316  // Context sets the context to be used in this call's Do method.
  4317  func (c *EnterprisesCreateEnrollmentTokenCall) Context(ctx context.Context) *EnterprisesCreateEnrollmentTokenCall {
  4318  	c.ctx_ = ctx
  4319  	return c
  4320  }
  4321  
  4322  // Header returns a http.Header that can be modified by the caller to add
  4323  // headers to the request.
  4324  func (c *EnterprisesCreateEnrollmentTokenCall) Header() http.Header {
  4325  	if c.header_ == nil {
  4326  		c.header_ = make(http.Header)
  4327  	}
  4328  	return c.header_
  4329  }
  4330  
  4331  func (c *EnterprisesCreateEnrollmentTokenCall) doRequest(alt string) (*http.Response, error) {
  4332  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4333  	var body io.Reader = nil
  4334  	c.urlParams_.Set("alt", alt)
  4335  	c.urlParams_.Set("prettyPrint", "false")
  4336  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/createEnrollmentToken")
  4337  	urls += "?" + c.urlParams_.Encode()
  4338  	req, err := http.NewRequest("POST", urls, body)
  4339  	if err != nil {
  4340  		return nil, err
  4341  	}
  4342  	req.Header = reqHeaders
  4343  	googleapi.Expand(req.URL, map[string]string{
  4344  		"enterpriseId": c.enterpriseId,
  4345  	})
  4346  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4347  }
  4348  
  4349  // Do executes the "androidenterprise.enterprises.createEnrollmentToken" call.
  4350  // Any non-2xx status code is an error. Response headers are in either
  4351  // *CreateEnrollmentTokenResponse.ServerResponse.Header or (if a response was
  4352  // returned at all) in error.(*googleapi.Error).Header. Use
  4353  // googleapi.IsNotModified to check whether the returned error was because
  4354  // http.StatusNotModified was returned.
  4355  func (c *EnterprisesCreateEnrollmentTokenCall) Do(opts ...googleapi.CallOption) (*CreateEnrollmentTokenResponse, error) {
  4356  	gensupport.SetOptions(c.urlParams_, opts...)
  4357  	res, err := c.doRequest("json")
  4358  	if res != nil && res.StatusCode == http.StatusNotModified {
  4359  		if res.Body != nil {
  4360  			res.Body.Close()
  4361  		}
  4362  		return nil, gensupport.WrapError(&googleapi.Error{
  4363  			Code:   res.StatusCode,
  4364  			Header: res.Header,
  4365  		})
  4366  	}
  4367  	if err != nil {
  4368  		return nil, err
  4369  	}
  4370  	defer googleapi.CloseBody(res)
  4371  	if err := googleapi.CheckResponse(res); err != nil {
  4372  		return nil, gensupport.WrapError(err)
  4373  	}
  4374  	ret := &CreateEnrollmentTokenResponse{
  4375  		ServerResponse: googleapi.ServerResponse{
  4376  			Header:         res.Header,
  4377  			HTTPStatusCode: res.StatusCode,
  4378  		},
  4379  	}
  4380  	target := &ret
  4381  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4382  		return nil, err
  4383  	}
  4384  	return ret, nil
  4385  }
  4386  
  4387  type EnterprisesCreateWebTokenCall struct {
  4388  	s                         *Service
  4389  	enterpriseId              string
  4390  	administratorwebtokenspec *AdministratorWebTokenSpec
  4391  	urlParams_                gensupport.URLParams
  4392  	ctx_                      context.Context
  4393  	header_                   http.Header
  4394  }
  4395  
  4396  // CreateWebToken: Returns a unique token to access an embeddable UI. To
  4397  // generate a web UI, pass the generated token into the managed Google Play
  4398  // javascript API. Each token may only be used to start one UI session. See the
  4399  // JavaScript API documentation for further information.
  4400  //
  4401  // - enterpriseId: The ID of the enterprise.
  4402  func (r *EnterprisesService) CreateWebToken(enterpriseId string, administratorwebtokenspec *AdministratorWebTokenSpec) *EnterprisesCreateWebTokenCall {
  4403  	c := &EnterprisesCreateWebTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4404  	c.enterpriseId = enterpriseId
  4405  	c.administratorwebtokenspec = administratorwebtokenspec
  4406  	return c
  4407  }
  4408  
  4409  // Fields allows partial responses to be retrieved. See
  4410  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4411  // details.
  4412  func (c *EnterprisesCreateWebTokenCall) Fields(s ...googleapi.Field) *EnterprisesCreateWebTokenCall {
  4413  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4414  	return c
  4415  }
  4416  
  4417  // Context sets the context to be used in this call's Do method.
  4418  func (c *EnterprisesCreateWebTokenCall) Context(ctx context.Context) *EnterprisesCreateWebTokenCall {
  4419  	c.ctx_ = ctx
  4420  	return c
  4421  }
  4422  
  4423  // Header returns a http.Header that can be modified by the caller to add
  4424  // headers to the request.
  4425  func (c *EnterprisesCreateWebTokenCall) Header() http.Header {
  4426  	if c.header_ == nil {
  4427  		c.header_ = make(http.Header)
  4428  	}
  4429  	return c.header_
  4430  }
  4431  
  4432  func (c *EnterprisesCreateWebTokenCall) doRequest(alt string) (*http.Response, error) {
  4433  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4434  	var body io.Reader = nil
  4435  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.administratorwebtokenspec)
  4436  	if err != nil {
  4437  		return nil, err
  4438  	}
  4439  	c.urlParams_.Set("alt", alt)
  4440  	c.urlParams_.Set("prettyPrint", "false")
  4441  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/createWebToken")
  4442  	urls += "?" + c.urlParams_.Encode()
  4443  	req, err := http.NewRequest("POST", urls, body)
  4444  	if err != nil {
  4445  		return nil, err
  4446  	}
  4447  	req.Header = reqHeaders
  4448  	googleapi.Expand(req.URL, map[string]string{
  4449  		"enterpriseId": c.enterpriseId,
  4450  	})
  4451  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4452  }
  4453  
  4454  // Do executes the "androidenterprise.enterprises.createWebToken" call.
  4455  // Any non-2xx status code is an error. Response headers are in either
  4456  // *AdministratorWebToken.ServerResponse.Header or (if a response was returned
  4457  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4458  // check whether the returned error was because http.StatusNotModified was
  4459  // returned.
  4460  func (c *EnterprisesCreateWebTokenCall) Do(opts ...googleapi.CallOption) (*AdministratorWebToken, error) {
  4461  	gensupport.SetOptions(c.urlParams_, opts...)
  4462  	res, err := c.doRequest("json")
  4463  	if res != nil && res.StatusCode == http.StatusNotModified {
  4464  		if res.Body != nil {
  4465  			res.Body.Close()
  4466  		}
  4467  		return nil, gensupport.WrapError(&googleapi.Error{
  4468  			Code:   res.StatusCode,
  4469  			Header: res.Header,
  4470  		})
  4471  	}
  4472  	if err != nil {
  4473  		return nil, err
  4474  	}
  4475  	defer googleapi.CloseBody(res)
  4476  	if err := googleapi.CheckResponse(res); err != nil {
  4477  		return nil, gensupport.WrapError(err)
  4478  	}
  4479  	ret := &AdministratorWebToken{
  4480  		ServerResponse: googleapi.ServerResponse{
  4481  			Header:         res.Header,
  4482  			HTTPStatusCode: res.StatusCode,
  4483  		},
  4484  	}
  4485  	target := &ret
  4486  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4487  		return nil, err
  4488  	}
  4489  	return ret, nil
  4490  }
  4491  
  4492  type EnterprisesEnrollCall struct {
  4493  	s          *Service
  4494  	enterprise *Enterprise
  4495  	urlParams_ gensupport.URLParams
  4496  	ctx_       context.Context
  4497  	header_    http.Header
  4498  }
  4499  
  4500  // Enroll: Enrolls an enterprise with the calling EMM.
  4501  //
  4502  // - token: The token provided by the enterprise to register the EMM.
  4503  func (r *EnterprisesService) Enroll(token string, enterprise *Enterprise) *EnterprisesEnrollCall {
  4504  	c := &EnterprisesEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4505  	c.urlParams_.Set("token", token)
  4506  	c.enterprise = enterprise
  4507  	return c
  4508  }
  4509  
  4510  // Fields allows partial responses to be retrieved. See
  4511  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4512  // details.
  4513  func (c *EnterprisesEnrollCall) Fields(s ...googleapi.Field) *EnterprisesEnrollCall {
  4514  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4515  	return c
  4516  }
  4517  
  4518  // Context sets the context to be used in this call's Do method.
  4519  func (c *EnterprisesEnrollCall) Context(ctx context.Context) *EnterprisesEnrollCall {
  4520  	c.ctx_ = ctx
  4521  	return c
  4522  }
  4523  
  4524  // Header returns a http.Header that can be modified by the caller to add
  4525  // headers to the request.
  4526  func (c *EnterprisesEnrollCall) Header() http.Header {
  4527  	if c.header_ == nil {
  4528  		c.header_ = make(http.Header)
  4529  	}
  4530  	return c.header_
  4531  }
  4532  
  4533  func (c *EnterprisesEnrollCall) doRequest(alt string) (*http.Response, error) {
  4534  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4535  	var body io.Reader = nil
  4536  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise)
  4537  	if err != nil {
  4538  		return nil, err
  4539  	}
  4540  	c.urlParams_.Set("alt", alt)
  4541  	c.urlParams_.Set("prettyPrint", "false")
  4542  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/enroll")
  4543  	urls += "?" + c.urlParams_.Encode()
  4544  	req, err := http.NewRequest("POST", urls, body)
  4545  	if err != nil {
  4546  		return nil, err
  4547  	}
  4548  	req.Header = reqHeaders
  4549  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4550  }
  4551  
  4552  // Do executes the "androidenterprise.enterprises.enroll" call.
  4553  // Any non-2xx status code is an error. Response headers are in either
  4554  // *Enterprise.ServerResponse.Header or (if a response was returned at all) in
  4555  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4556  // whether the returned error was because http.StatusNotModified was returned.
  4557  func (c *EnterprisesEnrollCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
  4558  	gensupport.SetOptions(c.urlParams_, opts...)
  4559  	res, err := c.doRequest("json")
  4560  	if res != nil && res.StatusCode == http.StatusNotModified {
  4561  		if res.Body != nil {
  4562  			res.Body.Close()
  4563  		}
  4564  		return nil, gensupport.WrapError(&googleapi.Error{
  4565  			Code:   res.StatusCode,
  4566  			Header: res.Header,
  4567  		})
  4568  	}
  4569  	if err != nil {
  4570  		return nil, err
  4571  	}
  4572  	defer googleapi.CloseBody(res)
  4573  	if err := googleapi.CheckResponse(res); err != nil {
  4574  		return nil, gensupport.WrapError(err)
  4575  	}
  4576  	ret := &Enterprise{
  4577  		ServerResponse: googleapi.ServerResponse{
  4578  			Header:         res.Header,
  4579  			HTTPStatusCode: res.StatusCode,
  4580  		},
  4581  	}
  4582  	target := &ret
  4583  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4584  		return nil, err
  4585  	}
  4586  	return ret, nil
  4587  }
  4588  
  4589  type EnterprisesGenerateSignupUrlCall struct {
  4590  	s          *Service
  4591  	urlParams_ gensupport.URLParams
  4592  	ctx_       context.Context
  4593  	header_    http.Header
  4594  }
  4595  
  4596  // GenerateSignupUrl: Generates a sign-up URL.
  4597  func (r *EnterprisesService) GenerateSignupUrl() *EnterprisesGenerateSignupUrlCall {
  4598  	c := &EnterprisesGenerateSignupUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4599  	return c
  4600  }
  4601  
  4602  // CallbackUrl sets the optional parameter "callbackUrl": The callback URL to
  4603  // which the Admin will be redirected after successfully creating an
  4604  // enterprise. Before redirecting there the system will add a single query
  4605  // parameter to this URL named "enterpriseToken" which will contain an opaque
  4606  // token to be used for the CompleteSignup request. Beware that this means that
  4607  // the URL will be parsed, the parameter added and then a new URL formatted,
  4608  // i.e. there may be some minor formatting changes and, more importantly, the
  4609  // URL must be well-formed so that it can be parsed.
  4610  func (c *EnterprisesGenerateSignupUrlCall) CallbackUrl(callbackUrl string) *EnterprisesGenerateSignupUrlCall {
  4611  	c.urlParams_.Set("callbackUrl", callbackUrl)
  4612  	return c
  4613  }
  4614  
  4615  // Fields allows partial responses to be retrieved. See
  4616  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4617  // details.
  4618  func (c *EnterprisesGenerateSignupUrlCall) Fields(s ...googleapi.Field) *EnterprisesGenerateSignupUrlCall {
  4619  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4620  	return c
  4621  }
  4622  
  4623  // Context sets the context to be used in this call's Do method.
  4624  func (c *EnterprisesGenerateSignupUrlCall) Context(ctx context.Context) *EnterprisesGenerateSignupUrlCall {
  4625  	c.ctx_ = ctx
  4626  	return c
  4627  }
  4628  
  4629  // Header returns a http.Header that can be modified by the caller to add
  4630  // headers to the request.
  4631  func (c *EnterprisesGenerateSignupUrlCall) Header() http.Header {
  4632  	if c.header_ == nil {
  4633  		c.header_ = make(http.Header)
  4634  	}
  4635  	return c.header_
  4636  }
  4637  
  4638  func (c *EnterprisesGenerateSignupUrlCall) doRequest(alt string) (*http.Response, error) {
  4639  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4640  	var body io.Reader = nil
  4641  	c.urlParams_.Set("alt", alt)
  4642  	c.urlParams_.Set("prettyPrint", "false")
  4643  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/signupUrl")
  4644  	urls += "?" + c.urlParams_.Encode()
  4645  	req, err := http.NewRequest("POST", urls, body)
  4646  	if err != nil {
  4647  		return nil, err
  4648  	}
  4649  	req.Header = reqHeaders
  4650  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4651  }
  4652  
  4653  // Do executes the "androidenterprise.enterprises.generateSignupUrl" call.
  4654  // Any non-2xx status code is an error. Response headers are in either
  4655  // *SignupInfo.ServerResponse.Header or (if a response was returned at all) in
  4656  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4657  // whether the returned error was because http.StatusNotModified was returned.
  4658  func (c *EnterprisesGenerateSignupUrlCall) Do(opts ...googleapi.CallOption) (*SignupInfo, error) {
  4659  	gensupport.SetOptions(c.urlParams_, opts...)
  4660  	res, err := c.doRequest("json")
  4661  	if res != nil && res.StatusCode == http.StatusNotModified {
  4662  		if res.Body != nil {
  4663  			res.Body.Close()
  4664  		}
  4665  		return nil, gensupport.WrapError(&googleapi.Error{
  4666  			Code:   res.StatusCode,
  4667  			Header: res.Header,
  4668  		})
  4669  	}
  4670  	if err != nil {
  4671  		return nil, err
  4672  	}
  4673  	defer googleapi.CloseBody(res)
  4674  	if err := googleapi.CheckResponse(res); err != nil {
  4675  		return nil, gensupport.WrapError(err)
  4676  	}
  4677  	ret := &SignupInfo{
  4678  		ServerResponse: googleapi.ServerResponse{
  4679  			Header:         res.Header,
  4680  			HTTPStatusCode: res.StatusCode,
  4681  		},
  4682  	}
  4683  	target := &ret
  4684  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4685  		return nil, err
  4686  	}
  4687  	return ret, nil
  4688  }
  4689  
  4690  type EnterprisesGetCall struct {
  4691  	s            *Service
  4692  	enterpriseId string
  4693  	urlParams_   gensupport.URLParams
  4694  	ifNoneMatch_ string
  4695  	ctx_         context.Context
  4696  	header_      http.Header
  4697  }
  4698  
  4699  // Get: Retrieves the name and domain of an enterprise.
  4700  //
  4701  // - enterpriseId: The ID of the enterprise.
  4702  func (r *EnterprisesService) Get(enterpriseId string) *EnterprisesGetCall {
  4703  	c := &EnterprisesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4704  	c.enterpriseId = enterpriseId
  4705  	return c
  4706  }
  4707  
  4708  // Fields allows partial responses to be retrieved. See
  4709  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4710  // details.
  4711  func (c *EnterprisesGetCall) Fields(s ...googleapi.Field) *EnterprisesGetCall {
  4712  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4713  	return c
  4714  }
  4715  
  4716  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4717  // object's ETag matches the given value. This is useful for getting updates
  4718  // only after the object has changed since the last request.
  4719  func (c *EnterprisesGetCall) IfNoneMatch(entityTag string) *EnterprisesGetCall {
  4720  	c.ifNoneMatch_ = entityTag
  4721  	return c
  4722  }
  4723  
  4724  // Context sets the context to be used in this call's Do method.
  4725  func (c *EnterprisesGetCall) Context(ctx context.Context) *EnterprisesGetCall {
  4726  	c.ctx_ = ctx
  4727  	return c
  4728  }
  4729  
  4730  // Header returns a http.Header that can be modified by the caller to add
  4731  // headers to the request.
  4732  func (c *EnterprisesGetCall) Header() http.Header {
  4733  	if c.header_ == nil {
  4734  		c.header_ = make(http.Header)
  4735  	}
  4736  	return c.header_
  4737  }
  4738  
  4739  func (c *EnterprisesGetCall) doRequest(alt string) (*http.Response, error) {
  4740  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4741  	if c.ifNoneMatch_ != "" {
  4742  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4743  	}
  4744  	var body io.Reader = nil
  4745  	c.urlParams_.Set("alt", alt)
  4746  	c.urlParams_.Set("prettyPrint", "false")
  4747  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}")
  4748  	urls += "?" + c.urlParams_.Encode()
  4749  	req, err := http.NewRequest("GET", urls, body)
  4750  	if err != nil {
  4751  		return nil, err
  4752  	}
  4753  	req.Header = reqHeaders
  4754  	googleapi.Expand(req.URL, map[string]string{
  4755  		"enterpriseId": c.enterpriseId,
  4756  	})
  4757  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4758  }
  4759  
  4760  // Do executes the "androidenterprise.enterprises.get" call.
  4761  // Any non-2xx status code is an error. Response headers are in either
  4762  // *Enterprise.ServerResponse.Header or (if a response was returned at all) in
  4763  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4764  // whether the returned error was because http.StatusNotModified was returned.
  4765  func (c *EnterprisesGetCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
  4766  	gensupport.SetOptions(c.urlParams_, opts...)
  4767  	res, err := c.doRequest("json")
  4768  	if res != nil && res.StatusCode == http.StatusNotModified {
  4769  		if res.Body != nil {
  4770  			res.Body.Close()
  4771  		}
  4772  		return nil, gensupport.WrapError(&googleapi.Error{
  4773  			Code:   res.StatusCode,
  4774  			Header: res.Header,
  4775  		})
  4776  	}
  4777  	if err != nil {
  4778  		return nil, err
  4779  	}
  4780  	defer googleapi.CloseBody(res)
  4781  	if err := googleapi.CheckResponse(res); err != nil {
  4782  		return nil, gensupport.WrapError(err)
  4783  	}
  4784  	ret := &Enterprise{
  4785  		ServerResponse: googleapi.ServerResponse{
  4786  			Header:         res.Header,
  4787  			HTTPStatusCode: res.StatusCode,
  4788  		},
  4789  	}
  4790  	target := &ret
  4791  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4792  		return nil, err
  4793  	}
  4794  	return ret, nil
  4795  }
  4796  
  4797  type EnterprisesGetServiceAccountCall struct {
  4798  	s            *Service
  4799  	enterpriseId string
  4800  	urlParams_   gensupport.URLParams
  4801  	ifNoneMatch_ string
  4802  	ctx_         context.Context
  4803  	header_      http.Header
  4804  }
  4805  
  4806  // GetServiceAccount: Returns a service account and credentials. The service
  4807  // account can be bound to the enterprise by calling setAccount. The service
  4808  // account is unique to this enterprise and EMM, and will be deleted if the
  4809  // enterprise is unbound. The credentials contain private key data and are not
  4810  // stored server-side. This method can only be called after calling
  4811  // Enterprises.Enroll or Enterprises.CompleteSignup, and before
  4812  // Enterprises.SetAccount; at other times it will return an error. Subsequent
  4813  // calls after the first will generate a new, unique set of credentials, and
  4814  // invalidate the previously generated credentials. Once the service account is
  4815  // bound to the enterprise, it can be managed using the serviceAccountKeys
  4816  // resource.
  4817  //
  4818  // - enterpriseId: The ID of the enterprise.
  4819  func (r *EnterprisesService) GetServiceAccount(enterpriseId string) *EnterprisesGetServiceAccountCall {
  4820  	c := &EnterprisesGetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4821  	c.enterpriseId = enterpriseId
  4822  	return c
  4823  }
  4824  
  4825  // KeyType sets the optional parameter "keyType": The type of credential to
  4826  // return with the service account. Required.
  4827  //
  4828  // Possible values:
  4829  //
  4830  //	"googleCredentials" - Google Credentials File format.
  4831  //	"pkcs12" - PKCS12 format. The password for the PKCS12 file is
  4832  //
  4833  // 'notasecret'. For more information, see https://tools.ietf.org/html/rfc7292.
  4834  // The data for keys of this type are base64 encoded according to RFC 4648
  4835  // Section 4. See http://tools.ietf.org/html/rfc4648#section-4.
  4836  func (c *EnterprisesGetServiceAccountCall) KeyType(keyType string) *EnterprisesGetServiceAccountCall {
  4837  	c.urlParams_.Set("keyType", keyType)
  4838  	return c
  4839  }
  4840  
  4841  // Fields allows partial responses to be retrieved. See
  4842  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4843  // details.
  4844  func (c *EnterprisesGetServiceAccountCall) Fields(s ...googleapi.Field) *EnterprisesGetServiceAccountCall {
  4845  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4846  	return c
  4847  }
  4848  
  4849  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4850  // object's ETag matches the given value. This is useful for getting updates
  4851  // only after the object has changed since the last request.
  4852  func (c *EnterprisesGetServiceAccountCall) IfNoneMatch(entityTag string) *EnterprisesGetServiceAccountCall {
  4853  	c.ifNoneMatch_ = entityTag
  4854  	return c
  4855  }
  4856  
  4857  // Context sets the context to be used in this call's Do method.
  4858  func (c *EnterprisesGetServiceAccountCall) Context(ctx context.Context) *EnterprisesGetServiceAccountCall {
  4859  	c.ctx_ = ctx
  4860  	return c
  4861  }
  4862  
  4863  // Header returns a http.Header that can be modified by the caller to add
  4864  // headers to the request.
  4865  func (c *EnterprisesGetServiceAccountCall) Header() http.Header {
  4866  	if c.header_ == nil {
  4867  		c.header_ = make(http.Header)
  4868  	}
  4869  	return c.header_
  4870  }
  4871  
  4872  func (c *EnterprisesGetServiceAccountCall) doRequest(alt string) (*http.Response, error) {
  4873  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4874  	if c.ifNoneMatch_ != "" {
  4875  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4876  	}
  4877  	var body io.Reader = nil
  4878  	c.urlParams_.Set("alt", alt)
  4879  	c.urlParams_.Set("prettyPrint", "false")
  4880  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccount")
  4881  	urls += "?" + c.urlParams_.Encode()
  4882  	req, err := http.NewRequest("GET", urls, body)
  4883  	if err != nil {
  4884  		return nil, err
  4885  	}
  4886  	req.Header = reqHeaders
  4887  	googleapi.Expand(req.URL, map[string]string{
  4888  		"enterpriseId": c.enterpriseId,
  4889  	})
  4890  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4891  }
  4892  
  4893  // Do executes the "androidenterprise.enterprises.getServiceAccount" call.
  4894  // Any non-2xx status code is an error. Response headers are in either
  4895  // *ServiceAccount.ServerResponse.Header or (if a response was returned at all)
  4896  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4897  // whether the returned error was because http.StatusNotModified was returned.
  4898  func (c *EnterprisesGetServiceAccountCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) {
  4899  	gensupport.SetOptions(c.urlParams_, opts...)
  4900  	res, err := c.doRequest("json")
  4901  	if res != nil && res.StatusCode == http.StatusNotModified {
  4902  		if res.Body != nil {
  4903  			res.Body.Close()
  4904  		}
  4905  		return nil, gensupport.WrapError(&googleapi.Error{
  4906  			Code:   res.StatusCode,
  4907  			Header: res.Header,
  4908  		})
  4909  	}
  4910  	if err != nil {
  4911  		return nil, err
  4912  	}
  4913  	defer googleapi.CloseBody(res)
  4914  	if err := googleapi.CheckResponse(res); err != nil {
  4915  		return nil, gensupport.WrapError(err)
  4916  	}
  4917  	ret := &ServiceAccount{
  4918  		ServerResponse: googleapi.ServerResponse{
  4919  			Header:         res.Header,
  4920  			HTTPStatusCode: res.StatusCode,
  4921  		},
  4922  	}
  4923  	target := &ret
  4924  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4925  		return nil, err
  4926  	}
  4927  	return ret, nil
  4928  }
  4929  
  4930  type EnterprisesGetStoreLayoutCall struct {
  4931  	s            *Service
  4932  	enterpriseId string
  4933  	urlParams_   gensupport.URLParams
  4934  	ifNoneMatch_ string
  4935  	ctx_         context.Context
  4936  	header_      http.Header
  4937  }
  4938  
  4939  // GetStoreLayout: Returns the store layout for the enterprise. If the store
  4940  // layout has not been set, returns "basic" as the store layout type and no
  4941  // homepage.
  4942  //
  4943  // - enterpriseId: The ID of the enterprise.
  4944  func (r *EnterprisesService) GetStoreLayout(enterpriseId string) *EnterprisesGetStoreLayoutCall {
  4945  	c := &EnterprisesGetStoreLayoutCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4946  	c.enterpriseId = enterpriseId
  4947  	return c
  4948  }
  4949  
  4950  // Fields allows partial responses to be retrieved. See
  4951  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4952  // details.
  4953  func (c *EnterprisesGetStoreLayoutCall) Fields(s ...googleapi.Field) *EnterprisesGetStoreLayoutCall {
  4954  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4955  	return c
  4956  }
  4957  
  4958  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4959  // object's ETag matches the given value. This is useful for getting updates
  4960  // only after the object has changed since the last request.
  4961  func (c *EnterprisesGetStoreLayoutCall) IfNoneMatch(entityTag string) *EnterprisesGetStoreLayoutCall {
  4962  	c.ifNoneMatch_ = entityTag
  4963  	return c
  4964  }
  4965  
  4966  // Context sets the context to be used in this call's Do method.
  4967  func (c *EnterprisesGetStoreLayoutCall) Context(ctx context.Context) *EnterprisesGetStoreLayoutCall {
  4968  	c.ctx_ = ctx
  4969  	return c
  4970  }
  4971  
  4972  // Header returns a http.Header that can be modified by the caller to add
  4973  // headers to the request.
  4974  func (c *EnterprisesGetStoreLayoutCall) Header() http.Header {
  4975  	if c.header_ == nil {
  4976  		c.header_ = make(http.Header)
  4977  	}
  4978  	return c.header_
  4979  }
  4980  
  4981  func (c *EnterprisesGetStoreLayoutCall) doRequest(alt string) (*http.Response, error) {
  4982  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4983  	if c.ifNoneMatch_ != "" {
  4984  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4985  	}
  4986  	var body io.Reader = nil
  4987  	c.urlParams_.Set("alt", alt)
  4988  	c.urlParams_.Set("prettyPrint", "false")
  4989  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout")
  4990  	urls += "?" + c.urlParams_.Encode()
  4991  	req, err := http.NewRequest("GET", urls, body)
  4992  	if err != nil {
  4993  		return nil, err
  4994  	}
  4995  	req.Header = reqHeaders
  4996  	googleapi.Expand(req.URL, map[string]string{
  4997  		"enterpriseId": c.enterpriseId,
  4998  	})
  4999  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5000  }
  5001  
  5002  // Do executes the "androidenterprise.enterprises.getStoreLayout" call.
  5003  // Any non-2xx status code is an error. Response headers are in either
  5004  // *StoreLayout.ServerResponse.Header or (if a response was returned at all) in
  5005  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5006  // whether the returned error was because http.StatusNotModified was returned.
  5007  func (c *EnterprisesGetStoreLayoutCall) Do(opts ...googleapi.CallOption) (*StoreLayout, error) {
  5008  	gensupport.SetOptions(c.urlParams_, opts...)
  5009  	res, err := c.doRequest("json")
  5010  	if res != nil && res.StatusCode == http.StatusNotModified {
  5011  		if res.Body != nil {
  5012  			res.Body.Close()
  5013  		}
  5014  		return nil, gensupport.WrapError(&googleapi.Error{
  5015  			Code:   res.StatusCode,
  5016  			Header: res.Header,
  5017  		})
  5018  	}
  5019  	if err != nil {
  5020  		return nil, err
  5021  	}
  5022  	defer googleapi.CloseBody(res)
  5023  	if err := googleapi.CheckResponse(res); err != nil {
  5024  		return nil, gensupport.WrapError(err)
  5025  	}
  5026  	ret := &StoreLayout{
  5027  		ServerResponse: googleapi.ServerResponse{
  5028  			Header:         res.Header,
  5029  			HTTPStatusCode: res.StatusCode,
  5030  		},
  5031  	}
  5032  	target := &ret
  5033  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5034  		return nil, err
  5035  	}
  5036  	return ret, nil
  5037  }
  5038  
  5039  type EnterprisesListCall struct {
  5040  	s            *Service
  5041  	urlParams_   gensupport.URLParams
  5042  	ifNoneMatch_ string
  5043  	ctx_         context.Context
  5044  	header_      http.Header
  5045  }
  5046  
  5047  // List: Looks up an enterprise by domain name. This is only supported for
  5048  // enterprises created via the Google-initiated creation flow. Lookup of the id
  5049  // is not needed for enterprises created via the EMM-initiated flow since the
  5050  // EMM learns the enterprise ID in the callback specified in the
  5051  // Enterprises.generateSignupUrl call.
  5052  //
  5053  // - domain: The exact primary domain name of the enterprise to look up.
  5054  func (r *EnterprisesService) List(domain string) *EnterprisesListCall {
  5055  	c := &EnterprisesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5056  	c.urlParams_.Set("domain", domain)
  5057  	return c
  5058  }
  5059  
  5060  // Fields allows partial responses to be retrieved. See
  5061  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5062  // details.
  5063  func (c *EnterprisesListCall) Fields(s ...googleapi.Field) *EnterprisesListCall {
  5064  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5065  	return c
  5066  }
  5067  
  5068  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5069  // object's ETag matches the given value. This is useful for getting updates
  5070  // only after the object has changed since the last request.
  5071  func (c *EnterprisesListCall) IfNoneMatch(entityTag string) *EnterprisesListCall {
  5072  	c.ifNoneMatch_ = entityTag
  5073  	return c
  5074  }
  5075  
  5076  // Context sets the context to be used in this call's Do method.
  5077  func (c *EnterprisesListCall) Context(ctx context.Context) *EnterprisesListCall {
  5078  	c.ctx_ = ctx
  5079  	return c
  5080  }
  5081  
  5082  // Header returns a http.Header that can be modified by the caller to add
  5083  // headers to the request.
  5084  func (c *EnterprisesListCall) Header() http.Header {
  5085  	if c.header_ == nil {
  5086  		c.header_ = make(http.Header)
  5087  	}
  5088  	return c.header_
  5089  }
  5090  
  5091  func (c *EnterprisesListCall) doRequest(alt string) (*http.Response, error) {
  5092  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5093  	if c.ifNoneMatch_ != "" {
  5094  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5095  	}
  5096  	var body io.Reader = nil
  5097  	c.urlParams_.Set("alt", alt)
  5098  	c.urlParams_.Set("prettyPrint", "false")
  5099  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises")
  5100  	urls += "?" + c.urlParams_.Encode()
  5101  	req, err := http.NewRequest("GET", urls, body)
  5102  	if err != nil {
  5103  		return nil, err
  5104  	}
  5105  	req.Header = reqHeaders
  5106  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5107  }
  5108  
  5109  // Do executes the "androidenterprise.enterprises.list" call.
  5110  // Any non-2xx status code is an error. Response headers are in either
  5111  // *EnterprisesListResponse.ServerResponse.Header or (if a response was
  5112  // returned at all) in error.(*googleapi.Error).Header. Use
  5113  // googleapi.IsNotModified to check whether the returned error was because
  5114  // http.StatusNotModified was returned.
  5115  func (c *EnterprisesListCall) Do(opts ...googleapi.CallOption) (*EnterprisesListResponse, error) {
  5116  	gensupport.SetOptions(c.urlParams_, opts...)
  5117  	res, err := c.doRequest("json")
  5118  	if res != nil && res.StatusCode == http.StatusNotModified {
  5119  		if res.Body != nil {
  5120  			res.Body.Close()
  5121  		}
  5122  		return nil, gensupport.WrapError(&googleapi.Error{
  5123  			Code:   res.StatusCode,
  5124  			Header: res.Header,
  5125  		})
  5126  	}
  5127  	if err != nil {
  5128  		return nil, err
  5129  	}
  5130  	defer googleapi.CloseBody(res)
  5131  	if err := googleapi.CheckResponse(res); err != nil {
  5132  		return nil, gensupport.WrapError(err)
  5133  	}
  5134  	ret := &EnterprisesListResponse{
  5135  		ServerResponse: googleapi.ServerResponse{
  5136  			Header:         res.Header,
  5137  			HTTPStatusCode: res.StatusCode,
  5138  		},
  5139  	}
  5140  	target := &ret
  5141  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5142  		return nil, err
  5143  	}
  5144  	return ret, nil
  5145  }
  5146  
  5147  type EnterprisesPullNotificationSetCall struct {
  5148  	s          *Service
  5149  	urlParams_ gensupport.URLParams
  5150  	ctx_       context.Context
  5151  	header_    http.Header
  5152  }
  5153  
  5154  // PullNotificationSet: Pulls and returns a notification set for the
  5155  // enterprises associated with the service account authenticated for the
  5156  // request. The notification set may be empty if no notification are pending. A
  5157  // notification set returned needs to be acknowledged within 20 seconds by
  5158  // calling Enterprises.AcknowledgeNotificationSet, unless the notification set
  5159  // is empty. Notifications that are not acknowledged within the 20 seconds will
  5160  // eventually be included again in the response to another PullNotificationSet
  5161  // request, and those that are never acknowledged will ultimately be deleted
  5162  // according to the Google Cloud Platform Pub/Sub system policy. Multiple
  5163  // requests might be performed concurrently to retrieve notifications, in which
  5164  // case the pending notifications (if any) will be split among each caller, if
  5165  // any are pending. If no notifications are present, an empty notification list
  5166  // is returned. Subsequent requests may return more notifications once they
  5167  // become available.
  5168  func (r *EnterprisesService) PullNotificationSet() *EnterprisesPullNotificationSetCall {
  5169  	c := &EnterprisesPullNotificationSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5170  	return c
  5171  }
  5172  
  5173  // RequestMode sets the optional parameter "requestMode": The request mode for
  5174  // pulling notifications. Specifying waitForNotifications will cause the
  5175  // request to block and wait until one or more notifications are present, or
  5176  // return an empty notification list if no notifications are present after some
  5177  // time. Specifying returnImmediately will cause the request to immediately
  5178  // return the pending notifications, or an empty list if no notifications are
  5179  // present. If omitted, defaults to waitForNotifications.
  5180  //
  5181  // Possible values:
  5182  //
  5183  //	"waitForNotifications" - Wait until one or more notifications are present.
  5184  //	"returnImmediately" - Returns immediately whether notifications are
  5185  //
  5186  // present or not.
  5187  func (c *EnterprisesPullNotificationSetCall) RequestMode(requestMode string) *EnterprisesPullNotificationSetCall {
  5188  	c.urlParams_.Set("requestMode", requestMode)
  5189  	return c
  5190  }
  5191  
  5192  // Fields allows partial responses to be retrieved. See
  5193  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5194  // details.
  5195  func (c *EnterprisesPullNotificationSetCall) Fields(s ...googleapi.Field) *EnterprisesPullNotificationSetCall {
  5196  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5197  	return c
  5198  }
  5199  
  5200  // Context sets the context to be used in this call's Do method.
  5201  func (c *EnterprisesPullNotificationSetCall) Context(ctx context.Context) *EnterprisesPullNotificationSetCall {
  5202  	c.ctx_ = ctx
  5203  	return c
  5204  }
  5205  
  5206  // Header returns a http.Header that can be modified by the caller to add
  5207  // headers to the request.
  5208  func (c *EnterprisesPullNotificationSetCall) Header() http.Header {
  5209  	if c.header_ == nil {
  5210  		c.header_ = make(http.Header)
  5211  	}
  5212  	return c.header_
  5213  }
  5214  
  5215  func (c *EnterprisesPullNotificationSetCall) doRequest(alt string) (*http.Response, error) {
  5216  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5217  	var body io.Reader = nil
  5218  	c.urlParams_.Set("alt", alt)
  5219  	c.urlParams_.Set("prettyPrint", "false")
  5220  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/pullNotificationSet")
  5221  	urls += "?" + c.urlParams_.Encode()
  5222  	req, err := http.NewRequest("POST", urls, body)
  5223  	if err != nil {
  5224  		return nil, err
  5225  	}
  5226  	req.Header = reqHeaders
  5227  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5228  }
  5229  
  5230  // Do executes the "androidenterprise.enterprises.pullNotificationSet" call.
  5231  // Any non-2xx status code is an error. Response headers are in either
  5232  // *NotificationSet.ServerResponse.Header or (if a response was returned at
  5233  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5234  // check whether the returned error was because http.StatusNotModified was
  5235  // returned.
  5236  func (c *EnterprisesPullNotificationSetCall) Do(opts ...googleapi.CallOption) (*NotificationSet, error) {
  5237  	gensupport.SetOptions(c.urlParams_, opts...)
  5238  	res, err := c.doRequest("json")
  5239  	if res != nil && res.StatusCode == http.StatusNotModified {
  5240  		if res.Body != nil {
  5241  			res.Body.Close()
  5242  		}
  5243  		return nil, gensupport.WrapError(&googleapi.Error{
  5244  			Code:   res.StatusCode,
  5245  			Header: res.Header,
  5246  		})
  5247  	}
  5248  	if err != nil {
  5249  		return nil, err
  5250  	}
  5251  	defer googleapi.CloseBody(res)
  5252  	if err := googleapi.CheckResponse(res); err != nil {
  5253  		return nil, gensupport.WrapError(err)
  5254  	}
  5255  	ret := &NotificationSet{
  5256  		ServerResponse: googleapi.ServerResponse{
  5257  			Header:         res.Header,
  5258  			HTTPStatusCode: res.StatusCode,
  5259  		},
  5260  	}
  5261  	target := &ret
  5262  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5263  		return nil, err
  5264  	}
  5265  	return ret, nil
  5266  }
  5267  
  5268  type EnterprisesSendTestPushNotificationCall struct {
  5269  	s            *Service
  5270  	enterpriseId string
  5271  	urlParams_   gensupport.URLParams
  5272  	ctx_         context.Context
  5273  	header_      http.Header
  5274  }
  5275  
  5276  // SendTestPushNotification: Sends a test notification to validate the EMM
  5277  // integration with the Google Cloud Pub/Sub service for this enterprise.
  5278  //
  5279  // - enterpriseId: The ID of the enterprise.
  5280  func (r *EnterprisesService) SendTestPushNotification(enterpriseId string) *EnterprisesSendTestPushNotificationCall {
  5281  	c := &EnterprisesSendTestPushNotificationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5282  	c.enterpriseId = enterpriseId
  5283  	return c
  5284  }
  5285  
  5286  // Fields allows partial responses to be retrieved. See
  5287  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5288  // details.
  5289  func (c *EnterprisesSendTestPushNotificationCall) Fields(s ...googleapi.Field) *EnterprisesSendTestPushNotificationCall {
  5290  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5291  	return c
  5292  }
  5293  
  5294  // Context sets the context to be used in this call's Do method.
  5295  func (c *EnterprisesSendTestPushNotificationCall) Context(ctx context.Context) *EnterprisesSendTestPushNotificationCall {
  5296  	c.ctx_ = ctx
  5297  	return c
  5298  }
  5299  
  5300  // Header returns a http.Header that can be modified by the caller to add
  5301  // headers to the request.
  5302  func (c *EnterprisesSendTestPushNotificationCall) Header() http.Header {
  5303  	if c.header_ == nil {
  5304  		c.header_ = make(http.Header)
  5305  	}
  5306  	return c.header_
  5307  }
  5308  
  5309  func (c *EnterprisesSendTestPushNotificationCall) doRequest(alt string) (*http.Response, error) {
  5310  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5311  	var body io.Reader = nil
  5312  	c.urlParams_.Set("alt", alt)
  5313  	c.urlParams_.Set("prettyPrint", "false")
  5314  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/sendTestPushNotification")
  5315  	urls += "?" + c.urlParams_.Encode()
  5316  	req, err := http.NewRequest("POST", urls, body)
  5317  	if err != nil {
  5318  		return nil, err
  5319  	}
  5320  	req.Header = reqHeaders
  5321  	googleapi.Expand(req.URL, map[string]string{
  5322  		"enterpriseId": c.enterpriseId,
  5323  	})
  5324  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5325  }
  5326  
  5327  // Do executes the "androidenterprise.enterprises.sendTestPushNotification" call.
  5328  // Any non-2xx status code is an error. Response headers are in either
  5329  // *EnterprisesSendTestPushNotificationResponse.ServerResponse.Header or (if a
  5330  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5331  // googleapi.IsNotModified to check whether the returned error was because
  5332  // http.StatusNotModified was returned.
  5333  func (c *EnterprisesSendTestPushNotificationCall) Do(opts ...googleapi.CallOption) (*EnterprisesSendTestPushNotificationResponse, error) {
  5334  	gensupport.SetOptions(c.urlParams_, opts...)
  5335  	res, err := c.doRequest("json")
  5336  	if res != nil && res.StatusCode == http.StatusNotModified {
  5337  		if res.Body != nil {
  5338  			res.Body.Close()
  5339  		}
  5340  		return nil, gensupport.WrapError(&googleapi.Error{
  5341  			Code:   res.StatusCode,
  5342  			Header: res.Header,
  5343  		})
  5344  	}
  5345  	if err != nil {
  5346  		return nil, err
  5347  	}
  5348  	defer googleapi.CloseBody(res)
  5349  	if err := googleapi.CheckResponse(res); err != nil {
  5350  		return nil, gensupport.WrapError(err)
  5351  	}
  5352  	ret := &EnterprisesSendTestPushNotificationResponse{
  5353  		ServerResponse: googleapi.ServerResponse{
  5354  			Header:         res.Header,
  5355  			HTTPStatusCode: res.StatusCode,
  5356  		},
  5357  	}
  5358  	target := &ret
  5359  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5360  		return nil, err
  5361  	}
  5362  	return ret, nil
  5363  }
  5364  
  5365  type EnterprisesSetAccountCall struct {
  5366  	s                 *Service
  5367  	enterpriseId      string
  5368  	enterpriseaccount *EnterpriseAccount
  5369  	urlParams_        gensupport.URLParams
  5370  	ctx_              context.Context
  5371  	header_           http.Header
  5372  }
  5373  
  5374  // SetAccount: Sets the account that will be used to authenticate to the API as
  5375  // the enterprise.
  5376  //
  5377  // - enterpriseId: The ID of the enterprise.
  5378  func (r *EnterprisesService) SetAccount(enterpriseId string, enterpriseaccount *EnterpriseAccount) *EnterprisesSetAccountCall {
  5379  	c := &EnterprisesSetAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5380  	c.enterpriseId = enterpriseId
  5381  	c.enterpriseaccount = enterpriseaccount
  5382  	return c
  5383  }
  5384  
  5385  // Fields allows partial responses to be retrieved. See
  5386  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5387  // details.
  5388  func (c *EnterprisesSetAccountCall) Fields(s ...googleapi.Field) *EnterprisesSetAccountCall {
  5389  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5390  	return c
  5391  }
  5392  
  5393  // Context sets the context to be used in this call's Do method.
  5394  func (c *EnterprisesSetAccountCall) Context(ctx context.Context) *EnterprisesSetAccountCall {
  5395  	c.ctx_ = ctx
  5396  	return c
  5397  }
  5398  
  5399  // Header returns a http.Header that can be modified by the caller to add
  5400  // headers to the request.
  5401  func (c *EnterprisesSetAccountCall) Header() http.Header {
  5402  	if c.header_ == nil {
  5403  		c.header_ = make(http.Header)
  5404  	}
  5405  	return c.header_
  5406  }
  5407  
  5408  func (c *EnterprisesSetAccountCall) doRequest(alt string) (*http.Response, error) {
  5409  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5410  	var body io.Reader = nil
  5411  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterpriseaccount)
  5412  	if err != nil {
  5413  		return nil, err
  5414  	}
  5415  	c.urlParams_.Set("alt", alt)
  5416  	c.urlParams_.Set("prettyPrint", "false")
  5417  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/account")
  5418  	urls += "?" + c.urlParams_.Encode()
  5419  	req, err := http.NewRequest("PUT", urls, body)
  5420  	if err != nil {
  5421  		return nil, err
  5422  	}
  5423  	req.Header = reqHeaders
  5424  	googleapi.Expand(req.URL, map[string]string{
  5425  		"enterpriseId": c.enterpriseId,
  5426  	})
  5427  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5428  }
  5429  
  5430  // Do executes the "androidenterprise.enterprises.setAccount" call.
  5431  // Any non-2xx status code is an error. Response headers are in either
  5432  // *EnterpriseAccount.ServerResponse.Header or (if a response was returned at
  5433  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5434  // check whether the returned error was because http.StatusNotModified was
  5435  // returned.
  5436  func (c *EnterprisesSetAccountCall) Do(opts ...googleapi.CallOption) (*EnterpriseAccount, error) {
  5437  	gensupport.SetOptions(c.urlParams_, opts...)
  5438  	res, err := c.doRequest("json")
  5439  	if res != nil && res.StatusCode == http.StatusNotModified {
  5440  		if res.Body != nil {
  5441  			res.Body.Close()
  5442  		}
  5443  		return nil, gensupport.WrapError(&googleapi.Error{
  5444  			Code:   res.StatusCode,
  5445  			Header: res.Header,
  5446  		})
  5447  	}
  5448  	if err != nil {
  5449  		return nil, err
  5450  	}
  5451  	defer googleapi.CloseBody(res)
  5452  	if err := googleapi.CheckResponse(res); err != nil {
  5453  		return nil, gensupport.WrapError(err)
  5454  	}
  5455  	ret := &EnterpriseAccount{
  5456  		ServerResponse: googleapi.ServerResponse{
  5457  			Header:         res.Header,
  5458  			HTTPStatusCode: res.StatusCode,
  5459  		},
  5460  	}
  5461  	target := &ret
  5462  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5463  		return nil, err
  5464  	}
  5465  	return ret, nil
  5466  }
  5467  
  5468  type EnterprisesSetStoreLayoutCall struct {
  5469  	s            *Service
  5470  	enterpriseId string
  5471  	storelayout  *StoreLayout
  5472  	urlParams_   gensupport.URLParams
  5473  	ctx_         context.Context
  5474  	header_      http.Header
  5475  }
  5476  
  5477  // SetStoreLayout: Sets the store layout for the enterprise. By default,
  5478  // storeLayoutType is set to "basic" and the basic store layout is enabled. The
  5479  // basic layout only contains apps approved by the admin, and that have been
  5480  // added to the available product set for a user (using the
  5481  // setAvailableProductSet call). Apps on the page are sorted in order of their
  5482  // product ID value. If you create a custom store layout (by setting
  5483  // storeLayoutType = "custom" and setting a homepage), the basic store layout
  5484  // is disabled.
  5485  //
  5486  // - enterpriseId: The ID of the enterprise.
  5487  func (r *EnterprisesService) SetStoreLayout(enterpriseId string, storelayout *StoreLayout) *EnterprisesSetStoreLayoutCall {
  5488  	c := &EnterprisesSetStoreLayoutCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5489  	c.enterpriseId = enterpriseId
  5490  	c.storelayout = storelayout
  5491  	return c
  5492  }
  5493  
  5494  // Fields allows partial responses to be retrieved. See
  5495  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5496  // details.
  5497  func (c *EnterprisesSetStoreLayoutCall) Fields(s ...googleapi.Field) *EnterprisesSetStoreLayoutCall {
  5498  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5499  	return c
  5500  }
  5501  
  5502  // Context sets the context to be used in this call's Do method.
  5503  func (c *EnterprisesSetStoreLayoutCall) Context(ctx context.Context) *EnterprisesSetStoreLayoutCall {
  5504  	c.ctx_ = ctx
  5505  	return c
  5506  }
  5507  
  5508  // Header returns a http.Header that can be modified by the caller to add
  5509  // headers to the request.
  5510  func (c *EnterprisesSetStoreLayoutCall) Header() http.Header {
  5511  	if c.header_ == nil {
  5512  		c.header_ = make(http.Header)
  5513  	}
  5514  	return c.header_
  5515  }
  5516  
  5517  func (c *EnterprisesSetStoreLayoutCall) doRequest(alt string) (*http.Response, error) {
  5518  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5519  	var body io.Reader = nil
  5520  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.storelayout)
  5521  	if err != nil {
  5522  		return nil, err
  5523  	}
  5524  	c.urlParams_.Set("alt", alt)
  5525  	c.urlParams_.Set("prettyPrint", "false")
  5526  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout")
  5527  	urls += "?" + c.urlParams_.Encode()
  5528  	req, err := http.NewRequest("PUT", urls, body)
  5529  	if err != nil {
  5530  		return nil, err
  5531  	}
  5532  	req.Header = reqHeaders
  5533  	googleapi.Expand(req.URL, map[string]string{
  5534  		"enterpriseId": c.enterpriseId,
  5535  	})
  5536  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5537  }
  5538  
  5539  // Do executes the "androidenterprise.enterprises.setStoreLayout" call.
  5540  // Any non-2xx status code is an error. Response headers are in either
  5541  // *StoreLayout.ServerResponse.Header or (if a response was returned at all) in
  5542  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5543  // whether the returned error was because http.StatusNotModified was returned.
  5544  func (c *EnterprisesSetStoreLayoutCall) Do(opts ...googleapi.CallOption) (*StoreLayout, error) {
  5545  	gensupport.SetOptions(c.urlParams_, opts...)
  5546  	res, err := c.doRequest("json")
  5547  	if res != nil && res.StatusCode == http.StatusNotModified {
  5548  		if res.Body != nil {
  5549  			res.Body.Close()
  5550  		}
  5551  		return nil, gensupport.WrapError(&googleapi.Error{
  5552  			Code:   res.StatusCode,
  5553  			Header: res.Header,
  5554  		})
  5555  	}
  5556  	if err != nil {
  5557  		return nil, err
  5558  	}
  5559  	defer googleapi.CloseBody(res)
  5560  	if err := googleapi.CheckResponse(res); err != nil {
  5561  		return nil, gensupport.WrapError(err)
  5562  	}
  5563  	ret := &StoreLayout{
  5564  		ServerResponse: googleapi.ServerResponse{
  5565  			Header:         res.Header,
  5566  			HTTPStatusCode: res.StatusCode,
  5567  		},
  5568  	}
  5569  	target := &ret
  5570  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5571  		return nil, err
  5572  	}
  5573  	return ret, nil
  5574  }
  5575  
  5576  type EnterprisesUnenrollCall struct {
  5577  	s            *Service
  5578  	enterpriseId string
  5579  	urlParams_   gensupport.URLParams
  5580  	ctx_         context.Context
  5581  	header_      http.Header
  5582  }
  5583  
  5584  // Unenroll: Unenrolls an enterprise from the calling EMM.
  5585  //
  5586  // - enterpriseId: The ID of the enterprise.
  5587  func (r *EnterprisesService) Unenroll(enterpriseId string) *EnterprisesUnenrollCall {
  5588  	c := &EnterprisesUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5589  	c.enterpriseId = enterpriseId
  5590  	return c
  5591  }
  5592  
  5593  // Fields allows partial responses to be retrieved. See
  5594  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5595  // details.
  5596  func (c *EnterprisesUnenrollCall) Fields(s ...googleapi.Field) *EnterprisesUnenrollCall {
  5597  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5598  	return c
  5599  }
  5600  
  5601  // Context sets the context to be used in this call's Do method.
  5602  func (c *EnterprisesUnenrollCall) Context(ctx context.Context) *EnterprisesUnenrollCall {
  5603  	c.ctx_ = ctx
  5604  	return c
  5605  }
  5606  
  5607  // Header returns a http.Header that can be modified by the caller to add
  5608  // headers to the request.
  5609  func (c *EnterprisesUnenrollCall) Header() http.Header {
  5610  	if c.header_ == nil {
  5611  		c.header_ = make(http.Header)
  5612  	}
  5613  	return c.header_
  5614  }
  5615  
  5616  func (c *EnterprisesUnenrollCall) doRequest(alt string) (*http.Response, error) {
  5617  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5618  	var body io.Reader = nil
  5619  	c.urlParams_.Set("alt", alt)
  5620  	c.urlParams_.Set("prettyPrint", "false")
  5621  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/unenroll")
  5622  	urls += "?" + c.urlParams_.Encode()
  5623  	req, err := http.NewRequest("POST", urls, body)
  5624  	if err != nil {
  5625  		return nil, err
  5626  	}
  5627  	req.Header = reqHeaders
  5628  	googleapi.Expand(req.URL, map[string]string{
  5629  		"enterpriseId": c.enterpriseId,
  5630  	})
  5631  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5632  }
  5633  
  5634  // Do executes the "androidenterprise.enterprises.unenroll" call.
  5635  func (c *EnterprisesUnenrollCall) Do(opts ...googleapi.CallOption) error {
  5636  	gensupport.SetOptions(c.urlParams_, opts...)
  5637  	res, err := c.doRequest("json")
  5638  	if err != nil {
  5639  		return err
  5640  	}
  5641  	defer googleapi.CloseBody(res)
  5642  	if err := googleapi.CheckResponse(res); err != nil {
  5643  		return gensupport.WrapError(err)
  5644  	}
  5645  	return nil
  5646  }
  5647  
  5648  type EntitlementsDeleteCall struct {
  5649  	s             *Service
  5650  	enterpriseId  string
  5651  	userId        string
  5652  	entitlementId string
  5653  	urlParams_    gensupport.URLParams
  5654  	ctx_          context.Context
  5655  	header_       http.Header
  5656  }
  5657  
  5658  // Delete: Removes an entitlement to an app for a user. **Note:** This item has
  5659  // been deprecated. New integrations cannot use this method and can refer to
  5660  // our new recommendations.
  5661  //
  5662  //   - enterpriseId: The ID of the enterprise.
  5663  //   - entitlementId: The ID of the entitlement (a product ID), e.g.
  5664  //     "app:com.google.android.gm".
  5665  //   - userId: The ID of the user.
  5666  func (r *EntitlementsService) Delete(enterpriseId string, userId string, entitlementId string) *EntitlementsDeleteCall {
  5667  	c := &EntitlementsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5668  	c.enterpriseId = enterpriseId
  5669  	c.userId = userId
  5670  	c.entitlementId = entitlementId
  5671  	return c
  5672  }
  5673  
  5674  // Fields allows partial responses to be retrieved. See
  5675  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5676  // details.
  5677  func (c *EntitlementsDeleteCall) Fields(s ...googleapi.Field) *EntitlementsDeleteCall {
  5678  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5679  	return c
  5680  }
  5681  
  5682  // Context sets the context to be used in this call's Do method.
  5683  func (c *EntitlementsDeleteCall) Context(ctx context.Context) *EntitlementsDeleteCall {
  5684  	c.ctx_ = ctx
  5685  	return c
  5686  }
  5687  
  5688  // Header returns a http.Header that can be modified by the caller to add
  5689  // headers to the request.
  5690  func (c *EntitlementsDeleteCall) Header() http.Header {
  5691  	if c.header_ == nil {
  5692  		c.header_ = make(http.Header)
  5693  	}
  5694  	return c.header_
  5695  }
  5696  
  5697  func (c *EntitlementsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5698  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5699  	var body io.Reader = nil
  5700  	c.urlParams_.Set("alt", alt)
  5701  	c.urlParams_.Set("prettyPrint", "false")
  5702  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}")
  5703  	urls += "?" + c.urlParams_.Encode()
  5704  	req, err := http.NewRequest("DELETE", urls, body)
  5705  	if err != nil {
  5706  		return nil, err
  5707  	}
  5708  	req.Header = reqHeaders
  5709  	googleapi.Expand(req.URL, map[string]string{
  5710  		"enterpriseId":  c.enterpriseId,
  5711  		"userId":        c.userId,
  5712  		"entitlementId": c.entitlementId,
  5713  	})
  5714  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5715  }
  5716  
  5717  // Do executes the "androidenterprise.entitlements.delete" call.
  5718  func (c *EntitlementsDeleteCall) Do(opts ...googleapi.CallOption) error {
  5719  	gensupport.SetOptions(c.urlParams_, opts...)
  5720  	res, err := c.doRequest("json")
  5721  	if err != nil {
  5722  		return err
  5723  	}
  5724  	defer googleapi.CloseBody(res)
  5725  	if err := googleapi.CheckResponse(res); err != nil {
  5726  		return gensupport.WrapError(err)
  5727  	}
  5728  	return nil
  5729  }
  5730  
  5731  type EntitlementsGetCall struct {
  5732  	s             *Service
  5733  	enterpriseId  string
  5734  	userId        string
  5735  	entitlementId string
  5736  	urlParams_    gensupport.URLParams
  5737  	ifNoneMatch_  string
  5738  	ctx_          context.Context
  5739  	header_       http.Header
  5740  }
  5741  
  5742  // Get: Retrieves details of an entitlement. **Note:** This item has been
  5743  // deprecated. New integrations cannot use this method and can refer to our new
  5744  // recommendations.
  5745  //
  5746  //   - enterpriseId: The ID of the enterprise.
  5747  //   - entitlementId: The ID of the entitlement (a product ID), e.g.
  5748  //     "app:com.google.android.gm".
  5749  //   - userId: The ID of the user.
  5750  func (r *EntitlementsService) Get(enterpriseId string, userId string, entitlementId string) *EntitlementsGetCall {
  5751  	c := &EntitlementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5752  	c.enterpriseId = enterpriseId
  5753  	c.userId = userId
  5754  	c.entitlementId = entitlementId
  5755  	return c
  5756  }
  5757  
  5758  // Fields allows partial responses to be retrieved. See
  5759  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5760  // details.
  5761  func (c *EntitlementsGetCall) Fields(s ...googleapi.Field) *EntitlementsGetCall {
  5762  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5763  	return c
  5764  }
  5765  
  5766  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5767  // object's ETag matches the given value. This is useful for getting updates
  5768  // only after the object has changed since the last request.
  5769  func (c *EntitlementsGetCall) IfNoneMatch(entityTag string) *EntitlementsGetCall {
  5770  	c.ifNoneMatch_ = entityTag
  5771  	return c
  5772  }
  5773  
  5774  // Context sets the context to be used in this call's Do method.
  5775  func (c *EntitlementsGetCall) Context(ctx context.Context) *EntitlementsGetCall {
  5776  	c.ctx_ = ctx
  5777  	return c
  5778  }
  5779  
  5780  // Header returns a http.Header that can be modified by the caller to add
  5781  // headers to the request.
  5782  func (c *EntitlementsGetCall) Header() http.Header {
  5783  	if c.header_ == nil {
  5784  		c.header_ = make(http.Header)
  5785  	}
  5786  	return c.header_
  5787  }
  5788  
  5789  func (c *EntitlementsGetCall) doRequest(alt string) (*http.Response, error) {
  5790  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5791  	if c.ifNoneMatch_ != "" {
  5792  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5793  	}
  5794  	var body io.Reader = nil
  5795  	c.urlParams_.Set("alt", alt)
  5796  	c.urlParams_.Set("prettyPrint", "false")
  5797  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}")
  5798  	urls += "?" + c.urlParams_.Encode()
  5799  	req, err := http.NewRequest("GET", urls, body)
  5800  	if err != nil {
  5801  		return nil, err
  5802  	}
  5803  	req.Header = reqHeaders
  5804  	googleapi.Expand(req.URL, map[string]string{
  5805  		"enterpriseId":  c.enterpriseId,
  5806  		"userId":        c.userId,
  5807  		"entitlementId": c.entitlementId,
  5808  	})
  5809  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5810  }
  5811  
  5812  // Do executes the "androidenterprise.entitlements.get" call.
  5813  // Any non-2xx status code is an error. Response headers are in either
  5814  // *Entitlement.ServerResponse.Header or (if a response was returned at all) in
  5815  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5816  // whether the returned error was because http.StatusNotModified was returned.
  5817  func (c *EntitlementsGetCall) Do(opts ...googleapi.CallOption) (*Entitlement, error) {
  5818  	gensupport.SetOptions(c.urlParams_, opts...)
  5819  	res, err := c.doRequest("json")
  5820  	if res != nil && res.StatusCode == http.StatusNotModified {
  5821  		if res.Body != nil {
  5822  			res.Body.Close()
  5823  		}
  5824  		return nil, gensupport.WrapError(&googleapi.Error{
  5825  			Code:   res.StatusCode,
  5826  			Header: res.Header,
  5827  		})
  5828  	}
  5829  	if err != nil {
  5830  		return nil, err
  5831  	}
  5832  	defer googleapi.CloseBody(res)
  5833  	if err := googleapi.CheckResponse(res); err != nil {
  5834  		return nil, gensupport.WrapError(err)
  5835  	}
  5836  	ret := &Entitlement{
  5837  		ServerResponse: googleapi.ServerResponse{
  5838  			Header:         res.Header,
  5839  			HTTPStatusCode: res.StatusCode,
  5840  		},
  5841  	}
  5842  	target := &ret
  5843  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5844  		return nil, err
  5845  	}
  5846  	return ret, nil
  5847  }
  5848  
  5849  type EntitlementsListCall struct {
  5850  	s            *Service
  5851  	enterpriseId string
  5852  	userId       string
  5853  	urlParams_   gensupport.URLParams
  5854  	ifNoneMatch_ string
  5855  	ctx_         context.Context
  5856  	header_      http.Header
  5857  }
  5858  
  5859  // List: Lists all entitlements for the specified user. Only the ID is set.
  5860  // **Note:** This item has been deprecated. New integrations cannot use this
  5861  // method and can refer to our new recommendations.
  5862  //
  5863  // - enterpriseId: The ID of the enterprise.
  5864  // - userId: The ID of the user.
  5865  func (r *EntitlementsService) List(enterpriseId string, userId string) *EntitlementsListCall {
  5866  	c := &EntitlementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5867  	c.enterpriseId = enterpriseId
  5868  	c.userId = userId
  5869  	return c
  5870  }
  5871  
  5872  // Fields allows partial responses to be retrieved. See
  5873  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5874  // details.
  5875  func (c *EntitlementsListCall) Fields(s ...googleapi.Field) *EntitlementsListCall {
  5876  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5877  	return c
  5878  }
  5879  
  5880  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5881  // object's ETag matches the given value. This is useful for getting updates
  5882  // only after the object has changed since the last request.
  5883  func (c *EntitlementsListCall) IfNoneMatch(entityTag string) *EntitlementsListCall {
  5884  	c.ifNoneMatch_ = entityTag
  5885  	return c
  5886  }
  5887  
  5888  // Context sets the context to be used in this call's Do method.
  5889  func (c *EntitlementsListCall) Context(ctx context.Context) *EntitlementsListCall {
  5890  	c.ctx_ = ctx
  5891  	return c
  5892  }
  5893  
  5894  // Header returns a http.Header that can be modified by the caller to add
  5895  // headers to the request.
  5896  func (c *EntitlementsListCall) Header() http.Header {
  5897  	if c.header_ == nil {
  5898  		c.header_ = make(http.Header)
  5899  	}
  5900  	return c.header_
  5901  }
  5902  
  5903  func (c *EntitlementsListCall) doRequest(alt string) (*http.Response, error) {
  5904  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5905  	if c.ifNoneMatch_ != "" {
  5906  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5907  	}
  5908  	var body io.Reader = nil
  5909  	c.urlParams_.Set("alt", alt)
  5910  	c.urlParams_.Set("prettyPrint", "false")
  5911  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements")
  5912  	urls += "?" + c.urlParams_.Encode()
  5913  	req, err := http.NewRequest("GET", urls, body)
  5914  	if err != nil {
  5915  		return nil, err
  5916  	}
  5917  	req.Header = reqHeaders
  5918  	googleapi.Expand(req.URL, map[string]string{
  5919  		"enterpriseId": c.enterpriseId,
  5920  		"userId":       c.userId,
  5921  	})
  5922  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5923  }
  5924  
  5925  // Do executes the "androidenterprise.entitlements.list" call.
  5926  // Any non-2xx status code is an error. Response headers are in either
  5927  // *EntitlementsListResponse.ServerResponse.Header or (if a response was
  5928  // returned at all) in error.(*googleapi.Error).Header. Use
  5929  // googleapi.IsNotModified to check whether the returned error was because
  5930  // http.StatusNotModified was returned.
  5931  func (c *EntitlementsListCall) Do(opts ...googleapi.CallOption) (*EntitlementsListResponse, error) {
  5932  	gensupport.SetOptions(c.urlParams_, opts...)
  5933  	res, err := c.doRequest("json")
  5934  	if res != nil && res.StatusCode == http.StatusNotModified {
  5935  		if res.Body != nil {
  5936  			res.Body.Close()
  5937  		}
  5938  		return nil, gensupport.WrapError(&googleapi.Error{
  5939  			Code:   res.StatusCode,
  5940  			Header: res.Header,
  5941  		})
  5942  	}
  5943  	if err != nil {
  5944  		return nil, err
  5945  	}
  5946  	defer googleapi.CloseBody(res)
  5947  	if err := googleapi.CheckResponse(res); err != nil {
  5948  		return nil, gensupport.WrapError(err)
  5949  	}
  5950  	ret := &EntitlementsListResponse{
  5951  		ServerResponse: googleapi.ServerResponse{
  5952  			Header:         res.Header,
  5953  			HTTPStatusCode: res.StatusCode,
  5954  		},
  5955  	}
  5956  	target := &ret
  5957  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5958  		return nil, err
  5959  	}
  5960  	return ret, nil
  5961  }
  5962  
  5963  type EntitlementsUpdateCall struct {
  5964  	s             *Service
  5965  	enterpriseId  string
  5966  	userId        string
  5967  	entitlementId string
  5968  	entitlement   *Entitlement
  5969  	urlParams_    gensupport.URLParams
  5970  	ctx_          context.Context
  5971  	header_       http.Header
  5972  }
  5973  
  5974  // Update: Adds or updates an entitlement to an app for a user. **Note:** This
  5975  // item has been deprecated. New integrations cannot use this method and can
  5976  // refer to our new recommendations.
  5977  //
  5978  //   - enterpriseId: The ID of the enterprise.
  5979  //   - entitlementId: The ID of the entitlement (a product ID), e.g.
  5980  //     "app:com.google.android.gm".
  5981  //   - userId: The ID of the user.
  5982  func (r *EntitlementsService) Update(enterpriseId string, userId string, entitlementId string, entitlement *Entitlement) *EntitlementsUpdateCall {
  5983  	c := &EntitlementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5984  	c.enterpriseId = enterpriseId
  5985  	c.userId = userId
  5986  	c.entitlementId = entitlementId
  5987  	c.entitlement = entitlement
  5988  	return c
  5989  }
  5990  
  5991  // Install sets the optional parameter "install": Set to true to also install
  5992  // the product on all the user's devices where possible. Failure to install on
  5993  // one or more devices will not prevent this operation from returning
  5994  // successfully, as long as the entitlement was successfully assigned to the
  5995  // user.
  5996  func (c *EntitlementsUpdateCall) Install(install bool) *EntitlementsUpdateCall {
  5997  	c.urlParams_.Set("install", fmt.Sprint(install))
  5998  	return c
  5999  }
  6000  
  6001  // Fields allows partial responses to be retrieved. See
  6002  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6003  // details.
  6004  func (c *EntitlementsUpdateCall) Fields(s ...googleapi.Field) *EntitlementsUpdateCall {
  6005  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6006  	return c
  6007  }
  6008  
  6009  // Context sets the context to be used in this call's Do method.
  6010  func (c *EntitlementsUpdateCall) Context(ctx context.Context) *EntitlementsUpdateCall {
  6011  	c.ctx_ = ctx
  6012  	return c
  6013  }
  6014  
  6015  // Header returns a http.Header that can be modified by the caller to add
  6016  // headers to the request.
  6017  func (c *EntitlementsUpdateCall) Header() http.Header {
  6018  	if c.header_ == nil {
  6019  		c.header_ = make(http.Header)
  6020  	}
  6021  	return c.header_
  6022  }
  6023  
  6024  func (c *EntitlementsUpdateCall) doRequest(alt string) (*http.Response, error) {
  6025  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6026  	var body io.Reader = nil
  6027  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.entitlement)
  6028  	if err != nil {
  6029  		return nil, err
  6030  	}
  6031  	c.urlParams_.Set("alt", alt)
  6032  	c.urlParams_.Set("prettyPrint", "false")
  6033  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}")
  6034  	urls += "?" + c.urlParams_.Encode()
  6035  	req, err := http.NewRequest("PUT", urls, body)
  6036  	if err != nil {
  6037  		return nil, err
  6038  	}
  6039  	req.Header = reqHeaders
  6040  	googleapi.Expand(req.URL, map[string]string{
  6041  		"enterpriseId":  c.enterpriseId,
  6042  		"userId":        c.userId,
  6043  		"entitlementId": c.entitlementId,
  6044  	})
  6045  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6046  }
  6047  
  6048  // Do executes the "androidenterprise.entitlements.update" call.
  6049  // Any non-2xx status code is an error. Response headers are in either
  6050  // *Entitlement.ServerResponse.Header or (if a response was returned at all) in
  6051  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6052  // whether the returned error was because http.StatusNotModified was returned.
  6053  func (c *EntitlementsUpdateCall) Do(opts ...googleapi.CallOption) (*Entitlement, error) {
  6054  	gensupport.SetOptions(c.urlParams_, opts...)
  6055  	res, err := c.doRequest("json")
  6056  	if res != nil && res.StatusCode == http.StatusNotModified {
  6057  		if res.Body != nil {
  6058  			res.Body.Close()
  6059  		}
  6060  		return nil, gensupport.WrapError(&googleapi.Error{
  6061  			Code:   res.StatusCode,
  6062  			Header: res.Header,
  6063  		})
  6064  	}
  6065  	if err != nil {
  6066  		return nil, err
  6067  	}
  6068  	defer googleapi.CloseBody(res)
  6069  	if err := googleapi.CheckResponse(res); err != nil {
  6070  		return nil, gensupport.WrapError(err)
  6071  	}
  6072  	ret := &Entitlement{
  6073  		ServerResponse: googleapi.ServerResponse{
  6074  			Header:         res.Header,
  6075  			HTTPStatusCode: res.StatusCode,
  6076  		},
  6077  	}
  6078  	target := &ret
  6079  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6080  		return nil, err
  6081  	}
  6082  	return ret, nil
  6083  }
  6084  
  6085  type GrouplicensesGetCall struct {
  6086  	s              *Service
  6087  	enterpriseId   string
  6088  	groupLicenseId string
  6089  	urlParams_     gensupport.URLParams
  6090  	ifNoneMatch_   string
  6091  	ctx_           context.Context
  6092  	header_        http.Header
  6093  }
  6094  
  6095  // Get: Retrieves details of an enterprise's group license for a product.
  6096  // **Note:** This item has been deprecated. New integrations cannot use this
  6097  // method and can refer to our new recommendations.
  6098  //
  6099  //   - enterpriseId: The ID of the enterprise.
  6100  //   - groupLicenseId: The ID of the product the group license is for, e.g.
  6101  //     "app:com.google.android.gm".
  6102  func (r *GrouplicensesService) Get(enterpriseId string, groupLicenseId string) *GrouplicensesGetCall {
  6103  	c := &GrouplicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6104  	c.enterpriseId = enterpriseId
  6105  	c.groupLicenseId = groupLicenseId
  6106  	return c
  6107  }
  6108  
  6109  // Fields allows partial responses to be retrieved. See
  6110  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6111  // details.
  6112  func (c *GrouplicensesGetCall) Fields(s ...googleapi.Field) *GrouplicensesGetCall {
  6113  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6114  	return c
  6115  }
  6116  
  6117  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6118  // object's ETag matches the given value. This is useful for getting updates
  6119  // only after the object has changed since the last request.
  6120  func (c *GrouplicensesGetCall) IfNoneMatch(entityTag string) *GrouplicensesGetCall {
  6121  	c.ifNoneMatch_ = entityTag
  6122  	return c
  6123  }
  6124  
  6125  // Context sets the context to be used in this call's Do method.
  6126  func (c *GrouplicensesGetCall) Context(ctx context.Context) *GrouplicensesGetCall {
  6127  	c.ctx_ = ctx
  6128  	return c
  6129  }
  6130  
  6131  // Header returns a http.Header that can be modified by the caller to add
  6132  // headers to the request.
  6133  func (c *GrouplicensesGetCall) Header() http.Header {
  6134  	if c.header_ == nil {
  6135  		c.header_ = make(http.Header)
  6136  	}
  6137  	return c.header_
  6138  }
  6139  
  6140  func (c *GrouplicensesGetCall) doRequest(alt string) (*http.Response, error) {
  6141  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6142  	if c.ifNoneMatch_ != "" {
  6143  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6144  	}
  6145  	var body io.Reader = nil
  6146  	c.urlParams_.Set("alt", alt)
  6147  	c.urlParams_.Set("prettyPrint", "false")
  6148  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}")
  6149  	urls += "?" + c.urlParams_.Encode()
  6150  	req, err := http.NewRequest("GET", urls, body)
  6151  	if err != nil {
  6152  		return nil, err
  6153  	}
  6154  	req.Header = reqHeaders
  6155  	googleapi.Expand(req.URL, map[string]string{
  6156  		"enterpriseId":   c.enterpriseId,
  6157  		"groupLicenseId": c.groupLicenseId,
  6158  	})
  6159  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6160  }
  6161  
  6162  // Do executes the "androidenterprise.grouplicenses.get" call.
  6163  // Any non-2xx status code is an error. Response headers are in either
  6164  // *GroupLicense.ServerResponse.Header or (if a response was returned at all)
  6165  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6166  // whether the returned error was because http.StatusNotModified was returned.
  6167  func (c *GrouplicensesGetCall) Do(opts ...googleapi.CallOption) (*GroupLicense, error) {
  6168  	gensupport.SetOptions(c.urlParams_, opts...)
  6169  	res, err := c.doRequest("json")
  6170  	if res != nil && res.StatusCode == http.StatusNotModified {
  6171  		if res.Body != nil {
  6172  			res.Body.Close()
  6173  		}
  6174  		return nil, gensupport.WrapError(&googleapi.Error{
  6175  			Code:   res.StatusCode,
  6176  			Header: res.Header,
  6177  		})
  6178  	}
  6179  	if err != nil {
  6180  		return nil, err
  6181  	}
  6182  	defer googleapi.CloseBody(res)
  6183  	if err := googleapi.CheckResponse(res); err != nil {
  6184  		return nil, gensupport.WrapError(err)
  6185  	}
  6186  	ret := &GroupLicense{
  6187  		ServerResponse: googleapi.ServerResponse{
  6188  			Header:         res.Header,
  6189  			HTTPStatusCode: res.StatusCode,
  6190  		},
  6191  	}
  6192  	target := &ret
  6193  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6194  		return nil, err
  6195  	}
  6196  	return ret, nil
  6197  }
  6198  
  6199  type GrouplicensesListCall struct {
  6200  	s            *Service
  6201  	enterpriseId string
  6202  	urlParams_   gensupport.URLParams
  6203  	ifNoneMatch_ string
  6204  	ctx_         context.Context
  6205  	header_      http.Header
  6206  }
  6207  
  6208  // List: Retrieves IDs of all products for which the enterprise has a group
  6209  // license. **Note:** This item has been deprecated. New integrations cannot
  6210  // use this method and can refer to our new recommendations.
  6211  //
  6212  // - enterpriseId: The ID of the enterprise.
  6213  func (r *GrouplicensesService) List(enterpriseId string) *GrouplicensesListCall {
  6214  	c := &GrouplicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6215  	c.enterpriseId = enterpriseId
  6216  	return c
  6217  }
  6218  
  6219  // Fields allows partial responses to be retrieved. See
  6220  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6221  // details.
  6222  func (c *GrouplicensesListCall) Fields(s ...googleapi.Field) *GrouplicensesListCall {
  6223  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6224  	return c
  6225  }
  6226  
  6227  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6228  // object's ETag matches the given value. This is useful for getting updates
  6229  // only after the object has changed since the last request.
  6230  func (c *GrouplicensesListCall) IfNoneMatch(entityTag string) *GrouplicensesListCall {
  6231  	c.ifNoneMatch_ = entityTag
  6232  	return c
  6233  }
  6234  
  6235  // Context sets the context to be used in this call's Do method.
  6236  func (c *GrouplicensesListCall) Context(ctx context.Context) *GrouplicensesListCall {
  6237  	c.ctx_ = ctx
  6238  	return c
  6239  }
  6240  
  6241  // Header returns a http.Header that can be modified by the caller to add
  6242  // headers to the request.
  6243  func (c *GrouplicensesListCall) Header() http.Header {
  6244  	if c.header_ == nil {
  6245  		c.header_ = make(http.Header)
  6246  	}
  6247  	return c.header_
  6248  }
  6249  
  6250  func (c *GrouplicensesListCall) doRequest(alt string) (*http.Response, error) {
  6251  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6252  	if c.ifNoneMatch_ != "" {
  6253  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6254  	}
  6255  	var body io.Reader = nil
  6256  	c.urlParams_.Set("alt", alt)
  6257  	c.urlParams_.Set("prettyPrint", "false")
  6258  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses")
  6259  	urls += "?" + c.urlParams_.Encode()
  6260  	req, err := http.NewRequest("GET", urls, body)
  6261  	if err != nil {
  6262  		return nil, err
  6263  	}
  6264  	req.Header = reqHeaders
  6265  	googleapi.Expand(req.URL, map[string]string{
  6266  		"enterpriseId": c.enterpriseId,
  6267  	})
  6268  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6269  }
  6270  
  6271  // Do executes the "androidenterprise.grouplicenses.list" call.
  6272  // Any non-2xx status code is an error. Response headers are in either
  6273  // *GroupLicensesListResponse.ServerResponse.Header or (if a response was
  6274  // returned at all) in error.(*googleapi.Error).Header. Use
  6275  // googleapi.IsNotModified to check whether the returned error was because
  6276  // http.StatusNotModified was returned.
  6277  func (c *GrouplicensesListCall) Do(opts ...googleapi.CallOption) (*GroupLicensesListResponse, error) {
  6278  	gensupport.SetOptions(c.urlParams_, opts...)
  6279  	res, err := c.doRequest("json")
  6280  	if res != nil && res.StatusCode == http.StatusNotModified {
  6281  		if res.Body != nil {
  6282  			res.Body.Close()
  6283  		}
  6284  		return nil, gensupport.WrapError(&googleapi.Error{
  6285  			Code:   res.StatusCode,
  6286  			Header: res.Header,
  6287  		})
  6288  	}
  6289  	if err != nil {
  6290  		return nil, err
  6291  	}
  6292  	defer googleapi.CloseBody(res)
  6293  	if err := googleapi.CheckResponse(res); err != nil {
  6294  		return nil, gensupport.WrapError(err)
  6295  	}
  6296  	ret := &GroupLicensesListResponse{
  6297  		ServerResponse: googleapi.ServerResponse{
  6298  			Header:         res.Header,
  6299  			HTTPStatusCode: res.StatusCode,
  6300  		},
  6301  	}
  6302  	target := &ret
  6303  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6304  		return nil, err
  6305  	}
  6306  	return ret, nil
  6307  }
  6308  
  6309  type GrouplicenseusersListCall struct {
  6310  	s              *Service
  6311  	enterpriseId   string
  6312  	groupLicenseId string
  6313  	urlParams_     gensupport.URLParams
  6314  	ifNoneMatch_   string
  6315  	ctx_           context.Context
  6316  	header_        http.Header
  6317  }
  6318  
  6319  // List: Retrieves the IDs of the users who have been granted entitlements
  6320  // under the license. **Note:** This item has been deprecated. New integrations
  6321  // cannot use this method and can refer to our new recommendations.
  6322  //
  6323  //   - enterpriseId: The ID of the enterprise.
  6324  //   - groupLicenseId: The ID of the product the group license is for, e.g.
  6325  //     "app:com.google.android.gm".
  6326  func (r *GrouplicenseusersService) List(enterpriseId string, groupLicenseId string) *GrouplicenseusersListCall {
  6327  	c := &GrouplicenseusersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6328  	c.enterpriseId = enterpriseId
  6329  	c.groupLicenseId = groupLicenseId
  6330  	return c
  6331  }
  6332  
  6333  // Fields allows partial responses to be retrieved. See
  6334  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6335  // details.
  6336  func (c *GrouplicenseusersListCall) Fields(s ...googleapi.Field) *GrouplicenseusersListCall {
  6337  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6338  	return c
  6339  }
  6340  
  6341  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6342  // object's ETag matches the given value. This is useful for getting updates
  6343  // only after the object has changed since the last request.
  6344  func (c *GrouplicenseusersListCall) IfNoneMatch(entityTag string) *GrouplicenseusersListCall {
  6345  	c.ifNoneMatch_ = entityTag
  6346  	return c
  6347  }
  6348  
  6349  // Context sets the context to be used in this call's Do method.
  6350  func (c *GrouplicenseusersListCall) Context(ctx context.Context) *GrouplicenseusersListCall {
  6351  	c.ctx_ = ctx
  6352  	return c
  6353  }
  6354  
  6355  // Header returns a http.Header that can be modified by the caller to add
  6356  // headers to the request.
  6357  func (c *GrouplicenseusersListCall) Header() http.Header {
  6358  	if c.header_ == nil {
  6359  		c.header_ = make(http.Header)
  6360  	}
  6361  	return c.header_
  6362  }
  6363  
  6364  func (c *GrouplicenseusersListCall) doRequest(alt string) (*http.Response, error) {
  6365  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6366  	if c.ifNoneMatch_ != "" {
  6367  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6368  	}
  6369  	var body io.Reader = nil
  6370  	c.urlParams_.Set("alt", alt)
  6371  	c.urlParams_.Set("prettyPrint", "false")
  6372  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}/users")
  6373  	urls += "?" + c.urlParams_.Encode()
  6374  	req, err := http.NewRequest("GET", urls, body)
  6375  	if err != nil {
  6376  		return nil, err
  6377  	}
  6378  	req.Header = reqHeaders
  6379  	googleapi.Expand(req.URL, map[string]string{
  6380  		"enterpriseId":   c.enterpriseId,
  6381  		"groupLicenseId": c.groupLicenseId,
  6382  	})
  6383  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6384  }
  6385  
  6386  // Do executes the "androidenterprise.grouplicenseusers.list" call.
  6387  // Any non-2xx status code is an error. Response headers are in either
  6388  // *GroupLicenseUsersListResponse.ServerResponse.Header or (if a response was
  6389  // returned at all) in error.(*googleapi.Error).Header. Use
  6390  // googleapi.IsNotModified to check whether the returned error was because
  6391  // http.StatusNotModified was returned.
  6392  func (c *GrouplicenseusersListCall) Do(opts ...googleapi.CallOption) (*GroupLicenseUsersListResponse, error) {
  6393  	gensupport.SetOptions(c.urlParams_, opts...)
  6394  	res, err := c.doRequest("json")
  6395  	if res != nil && res.StatusCode == http.StatusNotModified {
  6396  		if res.Body != nil {
  6397  			res.Body.Close()
  6398  		}
  6399  		return nil, gensupport.WrapError(&googleapi.Error{
  6400  			Code:   res.StatusCode,
  6401  			Header: res.Header,
  6402  		})
  6403  	}
  6404  	if err != nil {
  6405  		return nil, err
  6406  	}
  6407  	defer googleapi.CloseBody(res)
  6408  	if err := googleapi.CheckResponse(res); err != nil {
  6409  		return nil, gensupport.WrapError(err)
  6410  	}
  6411  	ret := &GroupLicenseUsersListResponse{
  6412  		ServerResponse: googleapi.ServerResponse{
  6413  			Header:         res.Header,
  6414  			HTTPStatusCode: res.StatusCode,
  6415  		},
  6416  	}
  6417  	target := &ret
  6418  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6419  		return nil, err
  6420  	}
  6421  	return ret, nil
  6422  }
  6423  
  6424  type InstallsDeleteCall struct {
  6425  	s            *Service
  6426  	enterpriseId string
  6427  	userId       string
  6428  	deviceId     string
  6429  	installId    string
  6430  	urlParams_   gensupport.URLParams
  6431  	ctx_         context.Context
  6432  	header_      http.Header
  6433  }
  6434  
  6435  // Delete: Requests to remove an app from a device. A call to get or list will
  6436  // still show the app as installed on the device until it is actually removed.
  6437  // A successful response indicates that a removal request has been sent to the
  6438  // device. The call will be considered successful even if the app is not
  6439  // present on the device (e.g. it was never installed, or was removed by the
  6440  // user).
  6441  //
  6442  //   - deviceId: The Android ID of the device.
  6443  //   - enterpriseId: The ID of the enterprise.
  6444  //   - installId: The ID of the product represented by the install, e.g.
  6445  //     "app:com.google.android.gm".
  6446  //   - userId: The ID of the user.
  6447  func (r *InstallsService) Delete(enterpriseId string, userId string, deviceId string, installId string) *InstallsDeleteCall {
  6448  	c := &InstallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6449  	c.enterpriseId = enterpriseId
  6450  	c.userId = userId
  6451  	c.deviceId = deviceId
  6452  	c.installId = installId
  6453  	return c
  6454  }
  6455  
  6456  // Fields allows partial responses to be retrieved. See
  6457  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6458  // details.
  6459  func (c *InstallsDeleteCall) Fields(s ...googleapi.Field) *InstallsDeleteCall {
  6460  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6461  	return c
  6462  }
  6463  
  6464  // Context sets the context to be used in this call's Do method.
  6465  func (c *InstallsDeleteCall) Context(ctx context.Context) *InstallsDeleteCall {
  6466  	c.ctx_ = ctx
  6467  	return c
  6468  }
  6469  
  6470  // Header returns a http.Header that can be modified by the caller to add
  6471  // headers to the request.
  6472  func (c *InstallsDeleteCall) Header() http.Header {
  6473  	if c.header_ == nil {
  6474  		c.header_ = make(http.Header)
  6475  	}
  6476  	return c.header_
  6477  }
  6478  
  6479  func (c *InstallsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6480  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6481  	var body io.Reader = nil
  6482  	c.urlParams_.Set("alt", alt)
  6483  	c.urlParams_.Set("prettyPrint", "false")
  6484  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}")
  6485  	urls += "?" + c.urlParams_.Encode()
  6486  	req, err := http.NewRequest("DELETE", urls, body)
  6487  	if err != nil {
  6488  		return nil, err
  6489  	}
  6490  	req.Header = reqHeaders
  6491  	googleapi.Expand(req.URL, map[string]string{
  6492  		"enterpriseId": c.enterpriseId,
  6493  		"userId":       c.userId,
  6494  		"deviceId":     c.deviceId,
  6495  		"installId":    c.installId,
  6496  	})
  6497  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6498  }
  6499  
  6500  // Do executes the "androidenterprise.installs.delete" call.
  6501  func (c *InstallsDeleteCall) Do(opts ...googleapi.CallOption) error {
  6502  	gensupport.SetOptions(c.urlParams_, opts...)
  6503  	res, err := c.doRequest("json")
  6504  	if err != nil {
  6505  		return err
  6506  	}
  6507  	defer googleapi.CloseBody(res)
  6508  	if err := googleapi.CheckResponse(res); err != nil {
  6509  		return gensupport.WrapError(err)
  6510  	}
  6511  	return nil
  6512  }
  6513  
  6514  type InstallsGetCall struct {
  6515  	s            *Service
  6516  	enterpriseId string
  6517  	userId       string
  6518  	deviceId     string
  6519  	installId    string
  6520  	urlParams_   gensupport.URLParams
  6521  	ifNoneMatch_ string
  6522  	ctx_         context.Context
  6523  	header_      http.Header
  6524  }
  6525  
  6526  // Get: Retrieves details of an installation of an app on a device.
  6527  //
  6528  //   - deviceId: The Android ID of the device.
  6529  //   - enterpriseId: The ID of the enterprise.
  6530  //   - installId: The ID of the product represented by the install, e.g.
  6531  //     "app:com.google.android.gm".
  6532  //   - userId: The ID of the user.
  6533  func (r *InstallsService) Get(enterpriseId string, userId string, deviceId string, installId string) *InstallsGetCall {
  6534  	c := &InstallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6535  	c.enterpriseId = enterpriseId
  6536  	c.userId = userId
  6537  	c.deviceId = deviceId
  6538  	c.installId = installId
  6539  	return c
  6540  }
  6541  
  6542  // Fields allows partial responses to be retrieved. See
  6543  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6544  // details.
  6545  func (c *InstallsGetCall) Fields(s ...googleapi.Field) *InstallsGetCall {
  6546  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6547  	return c
  6548  }
  6549  
  6550  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6551  // object's ETag matches the given value. This is useful for getting updates
  6552  // only after the object has changed since the last request.
  6553  func (c *InstallsGetCall) IfNoneMatch(entityTag string) *InstallsGetCall {
  6554  	c.ifNoneMatch_ = entityTag
  6555  	return c
  6556  }
  6557  
  6558  // Context sets the context to be used in this call's Do method.
  6559  func (c *InstallsGetCall) Context(ctx context.Context) *InstallsGetCall {
  6560  	c.ctx_ = ctx
  6561  	return c
  6562  }
  6563  
  6564  // Header returns a http.Header that can be modified by the caller to add
  6565  // headers to the request.
  6566  func (c *InstallsGetCall) Header() http.Header {
  6567  	if c.header_ == nil {
  6568  		c.header_ = make(http.Header)
  6569  	}
  6570  	return c.header_
  6571  }
  6572  
  6573  func (c *InstallsGetCall) doRequest(alt string) (*http.Response, error) {
  6574  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6575  	if c.ifNoneMatch_ != "" {
  6576  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6577  	}
  6578  	var body io.Reader = nil
  6579  	c.urlParams_.Set("alt", alt)
  6580  	c.urlParams_.Set("prettyPrint", "false")
  6581  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}")
  6582  	urls += "?" + c.urlParams_.Encode()
  6583  	req, err := http.NewRequest("GET", urls, body)
  6584  	if err != nil {
  6585  		return nil, err
  6586  	}
  6587  	req.Header = reqHeaders
  6588  	googleapi.Expand(req.URL, map[string]string{
  6589  		"enterpriseId": c.enterpriseId,
  6590  		"userId":       c.userId,
  6591  		"deviceId":     c.deviceId,
  6592  		"installId":    c.installId,
  6593  	})
  6594  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6595  }
  6596  
  6597  // Do executes the "androidenterprise.installs.get" call.
  6598  // Any non-2xx status code is an error. Response headers are in either
  6599  // *Install.ServerResponse.Header or (if a response was returned at all) in
  6600  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6601  // whether the returned error was because http.StatusNotModified was returned.
  6602  func (c *InstallsGetCall) Do(opts ...googleapi.CallOption) (*Install, error) {
  6603  	gensupport.SetOptions(c.urlParams_, opts...)
  6604  	res, err := c.doRequest("json")
  6605  	if res != nil && res.StatusCode == http.StatusNotModified {
  6606  		if res.Body != nil {
  6607  			res.Body.Close()
  6608  		}
  6609  		return nil, gensupport.WrapError(&googleapi.Error{
  6610  			Code:   res.StatusCode,
  6611  			Header: res.Header,
  6612  		})
  6613  	}
  6614  	if err != nil {
  6615  		return nil, err
  6616  	}
  6617  	defer googleapi.CloseBody(res)
  6618  	if err := googleapi.CheckResponse(res); err != nil {
  6619  		return nil, gensupport.WrapError(err)
  6620  	}
  6621  	ret := &Install{
  6622  		ServerResponse: googleapi.ServerResponse{
  6623  			Header:         res.Header,
  6624  			HTTPStatusCode: res.StatusCode,
  6625  		},
  6626  	}
  6627  	target := &ret
  6628  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6629  		return nil, err
  6630  	}
  6631  	return ret, nil
  6632  }
  6633  
  6634  type InstallsListCall struct {
  6635  	s            *Service
  6636  	enterpriseId string
  6637  	userId       string
  6638  	deviceId     string
  6639  	urlParams_   gensupport.URLParams
  6640  	ifNoneMatch_ string
  6641  	ctx_         context.Context
  6642  	header_      http.Header
  6643  }
  6644  
  6645  // List: Retrieves the details of all apps installed on the specified device.
  6646  //
  6647  // - deviceId: The Android ID of the device.
  6648  // - enterpriseId: The ID of the enterprise.
  6649  // - userId: The ID of the user.
  6650  func (r *InstallsService) List(enterpriseId string, userId string, deviceId string) *InstallsListCall {
  6651  	c := &InstallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6652  	c.enterpriseId = enterpriseId
  6653  	c.userId = userId
  6654  	c.deviceId = deviceId
  6655  	return c
  6656  }
  6657  
  6658  // Fields allows partial responses to be retrieved. See
  6659  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6660  // details.
  6661  func (c *InstallsListCall) Fields(s ...googleapi.Field) *InstallsListCall {
  6662  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6663  	return c
  6664  }
  6665  
  6666  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6667  // object's ETag matches the given value. This is useful for getting updates
  6668  // only after the object has changed since the last request.
  6669  func (c *InstallsListCall) IfNoneMatch(entityTag string) *InstallsListCall {
  6670  	c.ifNoneMatch_ = entityTag
  6671  	return c
  6672  }
  6673  
  6674  // Context sets the context to be used in this call's Do method.
  6675  func (c *InstallsListCall) Context(ctx context.Context) *InstallsListCall {
  6676  	c.ctx_ = ctx
  6677  	return c
  6678  }
  6679  
  6680  // Header returns a http.Header that can be modified by the caller to add
  6681  // headers to the request.
  6682  func (c *InstallsListCall) Header() http.Header {
  6683  	if c.header_ == nil {
  6684  		c.header_ = make(http.Header)
  6685  	}
  6686  	return c.header_
  6687  }
  6688  
  6689  func (c *InstallsListCall) doRequest(alt string) (*http.Response, error) {
  6690  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6691  	if c.ifNoneMatch_ != "" {
  6692  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6693  	}
  6694  	var body io.Reader = nil
  6695  	c.urlParams_.Set("alt", alt)
  6696  	c.urlParams_.Set("prettyPrint", "false")
  6697  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs")
  6698  	urls += "?" + c.urlParams_.Encode()
  6699  	req, err := http.NewRequest("GET", urls, body)
  6700  	if err != nil {
  6701  		return nil, err
  6702  	}
  6703  	req.Header = reqHeaders
  6704  	googleapi.Expand(req.URL, map[string]string{
  6705  		"enterpriseId": c.enterpriseId,
  6706  		"userId":       c.userId,
  6707  		"deviceId":     c.deviceId,
  6708  	})
  6709  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6710  }
  6711  
  6712  // Do executes the "androidenterprise.installs.list" call.
  6713  // Any non-2xx status code is an error. Response headers are in either
  6714  // *InstallsListResponse.ServerResponse.Header or (if a response was returned
  6715  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6716  // check whether the returned error was because http.StatusNotModified was
  6717  // returned.
  6718  func (c *InstallsListCall) Do(opts ...googleapi.CallOption) (*InstallsListResponse, error) {
  6719  	gensupport.SetOptions(c.urlParams_, opts...)
  6720  	res, err := c.doRequest("json")
  6721  	if res != nil && res.StatusCode == http.StatusNotModified {
  6722  		if res.Body != nil {
  6723  			res.Body.Close()
  6724  		}
  6725  		return nil, gensupport.WrapError(&googleapi.Error{
  6726  			Code:   res.StatusCode,
  6727  			Header: res.Header,
  6728  		})
  6729  	}
  6730  	if err != nil {
  6731  		return nil, err
  6732  	}
  6733  	defer googleapi.CloseBody(res)
  6734  	if err := googleapi.CheckResponse(res); err != nil {
  6735  		return nil, gensupport.WrapError(err)
  6736  	}
  6737  	ret := &InstallsListResponse{
  6738  		ServerResponse: googleapi.ServerResponse{
  6739  			Header:         res.Header,
  6740  			HTTPStatusCode: res.StatusCode,
  6741  		},
  6742  	}
  6743  	target := &ret
  6744  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6745  		return nil, err
  6746  	}
  6747  	return ret, nil
  6748  }
  6749  
  6750  type InstallsUpdateCall struct {
  6751  	s            *Service
  6752  	enterpriseId string
  6753  	userId       string
  6754  	deviceId     string
  6755  	installId    string
  6756  	install      *Install
  6757  	urlParams_   gensupport.URLParams
  6758  	ctx_         context.Context
  6759  	header_      http.Header
  6760  }
  6761  
  6762  // Update: Requests to install the latest version of an app to a device. If the
  6763  // app is already installed, then it is updated to the latest version if
  6764  // necessary.
  6765  //
  6766  //   - deviceId: The Android ID of the device.
  6767  //   - enterpriseId: The ID of the enterprise.
  6768  //   - installId: The ID of the product represented by the install, e.g.
  6769  //     "app:com.google.android.gm".
  6770  //   - userId: The ID of the user.
  6771  func (r *InstallsService) Update(enterpriseId string, userId string, deviceId string, installId string, install *Install) *InstallsUpdateCall {
  6772  	c := &InstallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6773  	c.enterpriseId = enterpriseId
  6774  	c.userId = userId
  6775  	c.deviceId = deviceId
  6776  	c.installId = installId
  6777  	c.install = install
  6778  	return c
  6779  }
  6780  
  6781  // Fields allows partial responses to be retrieved. See
  6782  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6783  // details.
  6784  func (c *InstallsUpdateCall) Fields(s ...googleapi.Field) *InstallsUpdateCall {
  6785  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6786  	return c
  6787  }
  6788  
  6789  // Context sets the context to be used in this call's Do method.
  6790  func (c *InstallsUpdateCall) Context(ctx context.Context) *InstallsUpdateCall {
  6791  	c.ctx_ = ctx
  6792  	return c
  6793  }
  6794  
  6795  // Header returns a http.Header that can be modified by the caller to add
  6796  // headers to the request.
  6797  func (c *InstallsUpdateCall) Header() http.Header {
  6798  	if c.header_ == nil {
  6799  		c.header_ = make(http.Header)
  6800  	}
  6801  	return c.header_
  6802  }
  6803  
  6804  func (c *InstallsUpdateCall) doRequest(alt string) (*http.Response, error) {
  6805  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6806  	var body io.Reader = nil
  6807  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.install)
  6808  	if err != nil {
  6809  		return nil, err
  6810  	}
  6811  	c.urlParams_.Set("alt", alt)
  6812  	c.urlParams_.Set("prettyPrint", "false")
  6813  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}")
  6814  	urls += "?" + c.urlParams_.Encode()
  6815  	req, err := http.NewRequest("PUT", urls, body)
  6816  	if err != nil {
  6817  		return nil, err
  6818  	}
  6819  	req.Header = reqHeaders
  6820  	googleapi.Expand(req.URL, map[string]string{
  6821  		"enterpriseId": c.enterpriseId,
  6822  		"userId":       c.userId,
  6823  		"deviceId":     c.deviceId,
  6824  		"installId":    c.installId,
  6825  	})
  6826  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6827  }
  6828  
  6829  // Do executes the "androidenterprise.installs.update" call.
  6830  // Any non-2xx status code is an error. Response headers are in either
  6831  // *Install.ServerResponse.Header or (if a response was returned at all) in
  6832  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6833  // whether the returned error was because http.StatusNotModified was returned.
  6834  func (c *InstallsUpdateCall) Do(opts ...googleapi.CallOption) (*Install, error) {
  6835  	gensupport.SetOptions(c.urlParams_, opts...)
  6836  	res, err := c.doRequest("json")
  6837  	if res != nil && res.StatusCode == http.StatusNotModified {
  6838  		if res.Body != nil {
  6839  			res.Body.Close()
  6840  		}
  6841  		return nil, gensupport.WrapError(&googleapi.Error{
  6842  			Code:   res.StatusCode,
  6843  			Header: res.Header,
  6844  		})
  6845  	}
  6846  	if err != nil {
  6847  		return nil, err
  6848  	}
  6849  	defer googleapi.CloseBody(res)
  6850  	if err := googleapi.CheckResponse(res); err != nil {
  6851  		return nil, gensupport.WrapError(err)
  6852  	}
  6853  	ret := &Install{
  6854  		ServerResponse: googleapi.ServerResponse{
  6855  			Header:         res.Header,
  6856  			HTTPStatusCode: res.StatusCode,
  6857  		},
  6858  	}
  6859  	target := &ret
  6860  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6861  		return nil, err
  6862  	}
  6863  	return ret, nil
  6864  }
  6865  
  6866  type ManagedconfigurationsfordeviceDeleteCall struct {
  6867  	s                               *Service
  6868  	enterpriseId                    string
  6869  	userId                          string
  6870  	deviceId                        string
  6871  	managedConfigurationForDeviceId string
  6872  	urlParams_                      gensupport.URLParams
  6873  	ctx_                            context.Context
  6874  	header_                         http.Header
  6875  }
  6876  
  6877  // Delete: Removes a per-device managed configuration for an app for the
  6878  // specified device.
  6879  //
  6880  //   - deviceId: The Android ID of the device.
  6881  //   - enterpriseId: The ID of the enterprise.
  6882  //   - managedConfigurationForDeviceId: The ID of the managed configuration (a
  6883  //     product ID), e.g. "app:com.google.android.gm".
  6884  //   - userId: The ID of the user.
  6885  func (r *ManagedconfigurationsfordeviceService) Delete(enterpriseId string, userId string, deviceId string, managedConfigurationForDeviceId string) *ManagedconfigurationsfordeviceDeleteCall {
  6886  	c := &ManagedconfigurationsfordeviceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6887  	c.enterpriseId = enterpriseId
  6888  	c.userId = userId
  6889  	c.deviceId = deviceId
  6890  	c.managedConfigurationForDeviceId = managedConfigurationForDeviceId
  6891  	return c
  6892  }
  6893  
  6894  // Fields allows partial responses to be retrieved. See
  6895  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6896  // details.
  6897  func (c *ManagedconfigurationsfordeviceDeleteCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceDeleteCall {
  6898  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6899  	return c
  6900  }
  6901  
  6902  // Context sets the context to be used in this call's Do method.
  6903  func (c *ManagedconfigurationsfordeviceDeleteCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceDeleteCall {
  6904  	c.ctx_ = ctx
  6905  	return c
  6906  }
  6907  
  6908  // Header returns a http.Header that can be modified by the caller to add
  6909  // headers to the request.
  6910  func (c *ManagedconfigurationsfordeviceDeleteCall) Header() http.Header {
  6911  	if c.header_ == nil {
  6912  		c.header_ = make(http.Header)
  6913  	}
  6914  	return c.header_
  6915  }
  6916  
  6917  func (c *ManagedconfigurationsfordeviceDeleteCall) doRequest(alt string) (*http.Response, error) {
  6918  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6919  	var body io.Reader = nil
  6920  	c.urlParams_.Set("alt", alt)
  6921  	c.urlParams_.Set("prettyPrint", "false")
  6922  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}")
  6923  	urls += "?" + c.urlParams_.Encode()
  6924  	req, err := http.NewRequest("DELETE", urls, body)
  6925  	if err != nil {
  6926  		return nil, err
  6927  	}
  6928  	req.Header = reqHeaders
  6929  	googleapi.Expand(req.URL, map[string]string{
  6930  		"enterpriseId":                    c.enterpriseId,
  6931  		"userId":                          c.userId,
  6932  		"deviceId":                        c.deviceId,
  6933  		"managedConfigurationForDeviceId": c.managedConfigurationForDeviceId,
  6934  	})
  6935  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6936  }
  6937  
  6938  // Do executes the "androidenterprise.managedconfigurationsfordevice.delete" call.
  6939  func (c *ManagedconfigurationsfordeviceDeleteCall) Do(opts ...googleapi.CallOption) error {
  6940  	gensupport.SetOptions(c.urlParams_, opts...)
  6941  	res, err := c.doRequest("json")
  6942  	if err != nil {
  6943  		return err
  6944  	}
  6945  	defer googleapi.CloseBody(res)
  6946  	if err := googleapi.CheckResponse(res); err != nil {
  6947  		return gensupport.WrapError(err)
  6948  	}
  6949  	return nil
  6950  }
  6951  
  6952  type ManagedconfigurationsfordeviceGetCall struct {
  6953  	s                               *Service
  6954  	enterpriseId                    string
  6955  	userId                          string
  6956  	deviceId                        string
  6957  	managedConfigurationForDeviceId string
  6958  	urlParams_                      gensupport.URLParams
  6959  	ifNoneMatch_                    string
  6960  	ctx_                            context.Context
  6961  	header_                         http.Header
  6962  }
  6963  
  6964  // Get: Retrieves details of a per-device managed configuration.
  6965  //
  6966  //   - deviceId: The Android ID of the device.
  6967  //   - enterpriseId: The ID of the enterprise.
  6968  //   - managedConfigurationForDeviceId: The ID of the managed configuration (a
  6969  //     product ID), e.g. "app:com.google.android.gm".
  6970  //   - userId: The ID of the user.
  6971  func (r *ManagedconfigurationsfordeviceService) Get(enterpriseId string, userId string, deviceId string, managedConfigurationForDeviceId string) *ManagedconfigurationsfordeviceGetCall {
  6972  	c := &ManagedconfigurationsfordeviceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6973  	c.enterpriseId = enterpriseId
  6974  	c.userId = userId
  6975  	c.deviceId = deviceId
  6976  	c.managedConfigurationForDeviceId = managedConfigurationForDeviceId
  6977  	return c
  6978  }
  6979  
  6980  // Fields allows partial responses to be retrieved. See
  6981  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6982  // details.
  6983  func (c *ManagedconfigurationsfordeviceGetCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceGetCall {
  6984  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6985  	return c
  6986  }
  6987  
  6988  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6989  // object's ETag matches the given value. This is useful for getting updates
  6990  // only after the object has changed since the last request.
  6991  func (c *ManagedconfigurationsfordeviceGetCall) IfNoneMatch(entityTag string) *ManagedconfigurationsfordeviceGetCall {
  6992  	c.ifNoneMatch_ = entityTag
  6993  	return c
  6994  }
  6995  
  6996  // Context sets the context to be used in this call's Do method.
  6997  func (c *ManagedconfigurationsfordeviceGetCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceGetCall {
  6998  	c.ctx_ = ctx
  6999  	return c
  7000  }
  7001  
  7002  // Header returns a http.Header that can be modified by the caller to add
  7003  // headers to the request.
  7004  func (c *ManagedconfigurationsfordeviceGetCall) Header() http.Header {
  7005  	if c.header_ == nil {
  7006  		c.header_ = make(http.Header)
  7007  	}
  7008  	return c.header_
  7009  }
  7010  
  7011  func (c *ManagedconfigurationsfordeviceGetCall) doRequest(alt string) (*http.Response, error) {
  7012  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7013  	if c.ifNoneMatch_ != "" {
  7014  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7015  	}
  7016  	var body io.Reader = nil
  7017  	c.urlParams_.Set("alt", alt)
  7018  	c.urlParams_.Set("prettyPrint", "false")
  7019  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}")
  7020  	urls += "?" + c.urlParams_.Encode()
  7021  	req, err := http.NewRequest("GET", urls, body)
  7022  	if err != nil {
  7023  		return nil, err
  7024  	}
  7025  	req.Header = reqHeaders
  7026  	googleapi.Expand(req.URL, map[string]string{
  7027  		"enterpriseId":                    c.enterpriseId,
  7028  		"userId":                          c.userId,
  7029  		"deviceId":                        c.deviceId,
  7030  		"managedConfigurationForDeviceId": c.managedConfigurationForDeviceId,
  7031  	})
  7032  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7033  }
  7034  
  7035  // Do executes the "androidenterprise.managedconfigurationsfordevice.get" call.
  7036  // Any non-2xx status code is an error. Response headers are in either
  7037  // *ManagedConfiguration.ServerResponse.Header or (if a response was returned
  7038  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7039  // check whether the returned error was because http.StatusNotModified was
  7040  // returned.
  7041  func (c *ManagedconfigurationsfordeviceGetCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
  7042  	gensupport.SetOptions(c.urlParams_, opts...)
  7043  	res, err := c.doRequest("json")
  7044  	if res != nil && res.StatusCode == http.StatusNotModified {
  7045  		if res.Body != nil {
  7046  			res.Body.Close()
  7047  		}
  7048  		return nil, gensupport.WrapError(&googleapi.Error{
  7049  			Code:   res.StatusCode,
  7050  			Header: res.Header,
  7051  		})
  7052  	}
  7053  	if err != nil {
  7054  		return nil, err
  7055  	}
  7056  	defer googleapi.CloseBody(res)
  7057  	if err := googleapi.CheckResponse(res); err != nil {
  7058  		return nil, gensupport.WrapError(err)
  7059  	}
  7060  	ret := &ManagedConfiguration{
  7061  		ServerResponse: googleapi.ServerResponse{
  7062  			Header:         res.Header,
  7063  			HTTPStatusCode: res.StatusCode,
  7064  		},
  7065  	}
  7066  	target := &ret
  7067  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7068  		return nil, err
  7069  	}
  7070  	return ret, nil
  7071  }
  7072  
  7073  type ManagedconfigurationsfordeviceListCall struct {
  7074  	s            *Service
  7075  	enterpriseId string
  7076  	userId       string
  7077  	deviceId     string
  7078  	urlParams_   gensupport.URLParams
  7079  	ifNoneMatch_ string
  7080  	ctx_         context.Context
  7081  	header_      http.Header
  7082  }
  7083  
  7084  // List: Lists all the per-device managed configurations for the specified
  7085  // device. Only the ID is set.
  7086  //
  7087  // - deviceId: The Android ID of the device.
  7088  // - enterpriseId: The ID of the enterprise.
  7089  // - userId: The ID of the user.
  7090  func (r *ManagedconfigurationsfordeviceService) List(enterpriseId string, userId string, deviceId string) *ManagedconfigurationsfordeviceListCall {
  7091  	c := &ManagedconfigurationsfordeviceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7092  	c.enterpriseId = enterpriseId
  7093  	c.userId = userId
  7094  	c.deviceId = deviceId
  7095  	return c
  7096  }
  7097  
  7098  // Fields allows partial responses to be retrieved. See
  7099  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7100  // details.
  7101  func (c *ManagedconfigurationsfordeviceListCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceListCall {
  7102  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7103  	return c
  7104  }
  7105  
  7106  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7107  // object's ETag matches the given value. This is useful for getting updates
  7108  // only after the object has changed since the last request.
  7109  func (c *ManagedconfigurationsfordeviceListCall) IfNoneMatch(entityTag string) *ManagedconfigurationsfordeviceListCall {
  7110  	c.ifNoneMatch_ = entityTag
  7111  	return c
  7112  }
  7113  
  7114  // Context sets the context to be used in this call's Do method.
  7115  func (c *ManagedconfigurationsfordeviceListCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceListCall {
  7116  	c.ctx_ = ctx
  7117  	return c
  7118  }
  7119  
  7120  // Header returns a http.Header that can be modified by the caller to add
  7121  // headers to the request.
  7122  func (c *ManagedconfigurationsfordeviceListCall) Header() http.Header {
  7123  	if c.header_ == nil {
  7124  		c.header_ = make(http.Header)
  7125  	}
  7126  	return c.header_
  7127  }
  7128  
  7129  func (c *ManagedconfigurationsfordeviceListCall) doRequest(alt string) (*http.Response, error) {
  7130  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7131  	if c.ifNoneMatch_ != "" {
  7132  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7133  	}
  7134  	var body io.Reader = nil
  7135  	c.urlParams_.Set("alt", alt)
  7136  	c.urlParams_.Set("prettyPrint", "false")
  7137  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice")
  7138  	urls += "?" + c.urlParams_.Encode()
  7139  	req, err := http.NewRequest("GET", urls, body)
  7140  	if err != nil {
  7141  		return nil, err
  7142  	}
  7143  	req.Header = reqHeaders
  7144  	googleapi.Expand(req.URL, map[string]string{
  7145  		"enterpriseId": c.enterpriseId,
  7146  		"userId":       c.userId,
  7147  		"deviceId":     c.deviceId,
  7148  	})
  7149  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7150  }
  7151  
  7152  // Do executes the "androidenterprise.managedconfigurationsfordevice.list" call.
  7153  // Any non-2xx status code is an error. Response headers are in either
  7154  // *ManagedConfigurationsForDeviceListResponse.ServerResponse.Header or (if a
  7155  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7156  // googleapi.IsNotModified to check whether the returned error was because
  7157  // http.StatusNotModified was returned.
  7158  func (c *ManagedconfigurationsfordeviceListCall) Do(opts ...googleapi.CallOption) (*ManagedConfigurationsForDeviceListResponse, error) {
  7159  	gensupport.SetOptions(c.urlParams_, opts...)
  7160  	res, err := c.doRequest("json")
  7161  	if res != nil && res.StatusCode == http.StatusNotModified {
  7162  		if res.Body != nil {
  7163  			res.Body.Close()
  7164  		}
  7165  		return nil, gensupport.WrapError(&googleapi.Error{
  7166  			Code:   res.StatusCode,
  7167  			Header: res.Header,
  7168  		})
  7169  	}
  7170  	if err != nil {
  7171  		return nil, err
  7172  	}
  7173  	defer googleapi.CloseBody(res)
  7174  	if err := googleapi.CheckResponse(res); err != nil {
  7175  		return nil, gensupport.WrapError(err)
  7176  	}
  7177  	ret := &ManagedConfigurationsForDeviceListResponse{
  7178  		ServerResponse: googleapi.ServerResponse{
  7179  			Header:         res.Header,
  7180  			HTTPStatusCode: res.StatusCode,
  7181  		},
  7182  	}
  7183  	target := &ret
  7184  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7185  		return nil, err
  7186  	}
  7187  	return ret, nil
  7188  }
  7189  
  7190  type ManagedconfigurationsfordeviceUpdateCall struct {
  7191  	s                               *Service
  7192  	enterpriseId                    string
  7193  	userId                          string
  7194  	deviceId                        string
  7195  	managedConfigurationForDeviceId string
  7196  	managedconfiguration            *ManagedConfiguration
  7197  	urlParams_                      gensupport.URLParams
  7198  	ctx_                            context.Context
  7199  	header_                         http.Header
  7200  }
  7201  
  7202  // Update: Adds or updates a per-device managed configuration for an app for
  7203  // the specified device.
  7204  //
  7205  //   - deviceId: The Android ID of the device.
  7206  //   - enterpriseId: The ID of the enterprise.
  7207  //   - managedConfigurationForDeviceId: The ID of the managed configuration (a
  7208  //     product ID), e.g. "app:com.google.android.gm".
  7209  //   - userId: The ID of the user.
  7210  func (r *ManagedconfigurationsfordeviceService) Update(enterpriseId string, userId string, deviceId string, managedConfigurationForDeviceId string, managedconfiguration *ManagedConfiguration) *ManagedconfigurationsfordeviceUpdateCall {
  7211  	c := &ManagedconfigurationsfordeviceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7212  	c.enterpriseId = enterpriseId
  7213  	c.userId = userId
  7214  	c.deviceId = deviceId
  7215  	c.managedConfigurationForDeviceId = managedConfigurationForDeviceId
  7216  	c.managedconfiguration = managedconfiguration
  7217  	return c
  7218  }
  7219  
  7220  // Fields allows partial responses to be retrieved. See
  7221  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7222  // details.
  7223  func (c *ManagedconfigurationsfordeviceUpdateCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceUpdateCall {
  7224  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7225  	return c
  7226  }
  7227  
  7228  // Context sets the context to be used in this call's Do method.
  7229  func (c *ManagedconfigurationsfordeviceUpdateCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceUpdateCall {
  7230  	c.ctx_ = ctx
  7231  	return c
  7232  }
  7233  
  7234  // Header returns a http.Header that can be modified by the caller to add
  7235  // headers to the request.
  7236  func (c *ManagedconfigurationsfordeviceUpdateCall) Header() http.Header {
  7237  	if c.header_ == nil {
  7238  		c.header_ = make(http.Header)
  7239  	}
  7240  	return c.header_
  7241  }
  7242  
  7243  func (c *ManagedconfigurationsfordeviceUpdateCall) doRequest(alt string) (*http.Response, error) {
  7244  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7245  	var body io.Reader = nil
  7246  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedconfiguration)
  7247  	if err != nil {
  7248  		return nil, err
  7249  	}
  7250  	c.urlParams_.Set("alt", alt)
  7251  	c.urlParams_.Set("prettyPrint", "false")
  7252  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}")
  7253  	urls += "?" + c.urlParams_.Encode()
  7254  	req, err := http.NewRequest("PUT", urls, body)
  7255  	if err != nil {
  7256  		return nil, err
  7257  	}
  7258  	req.Header = reqHeaders
  7259  	googleapi.Expand(req.URL, map[string]string{
  7260  		"enterpriseId":                    c.enterpriseId,
  7261  		"userId":                          c.userId,
  7262  		"deviceId":                        c.deviceId,
  7263  		"managedConfigurationForDeviceId": c.managedConfigurationForDeviceId,
  7264  	})
  7265  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7266  }
  7267  
  7268  // Do executes the "androidenterprise.managedconfigurationsfordevice.update" call.
  7269  // Any non-2xx status code is an error. Response headers are in either
  7270  // *ManagedConfiguration.ServerResponse.Header or (if a response was returned
  7271  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7272  // check whether the returned error was because http.StatusNotModified was
  7273  // returned.
  7274  func (c *ManagedconfigurationsfordeviceUpdateCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
  7275  	gensupport.SetOptions(c.urlParams_, opts...)
  7276  	res, err := c.doRequest("json")
  7277  	if res != nil && res.StatusCode == http.StatusNotModified {
  7278  		if res.Body != nil {
  7279  			res.Body.Close()
  7280  		}
  7281  		return nil, gensupport.WrapError(&googleapi.Error{
  7282  			Code:   res.StatusCode,
  7283  			Header: res.Header,
  7284  		})
  7285  	}
  7286  	if err != nil {
  7287  		return nil, err
  7288  	}
  7289  	defer googleapi.CloseBody(res)
  7290  	if err := googleapi.CheckResponse(res); err != nil {
  7291  		return nil, gensupport.WrapError(err)
  7292  	}
  7293  	ret := &ManagedConfiguration{
  7294  		ServerResponse: googleapi.ServerResponse{
  7295  			Header:         res.Header,
  7296  			HTTPStatusCode: res.StatusCode,
  7297  		},
  7298  	}
  7299  	target := &ret
  7300  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7301  		return nil, err
  7302  	}
  7303  	return ret, nil
  7304  }
  7305  
  7306  type ManagedconfigurationsforuserDeleteCall struct {
  7307  	s                             *Service
  7308  	enterpriseId                  string
  7309  	userId                        string
  7310  	managedConfigurationForUserId string
  7311  	urlParams_                    gensupport.URLParams
  7312  	ctx_                          context.Context
  7313  	header_                       http.Header
  7314  }
  7315  
  7316  // Delete: Removes a per-user managed configuration for an app for the
  7317  // specified user.
  7318  //
  7319  //   - enterpriseId: The ID of the enterprise.
  7320  //   - managedConfigurationForUserId: The ID of the managed configuration (a
  7321  //     product ID), e.g. "app:com.google.android.gm".
  7322  //   - userId: The ID of the user.
  7323  func (r *ManagedconfigurationsforuserService) Delete(enterpriseId string, userId string, managedConfigurationForUserId string) *ManagedconfigurationsforuserDeleteCall {
  7324  	c := &ManagedconfigurationsforuserDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7325  	c.enterpriseId = enterpriseId
  7326  	c.userId = userId
  7327  	c.managedConfigurationForUserId = managedConfigurationForUserId
  7328  	return c
  7329  }
  7330  
  7331  // Fields allows partial responses to be retrieved. See
  7332  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7333  // details.
  7334  func (c *ManagedconfigurationsforuserDeleteCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserDeleteCall {
  7335  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7336  	return c
  7337  }
  7338  
  7339  // Context sets the context to be used in this call's Do method.
  7340  func (c *ManagedconfigurationsforuserDeleteCall) Context(ctx context.Context) *ManagedconfigurationsforuserDeleteCall {
  7341  	c.ctx_ = ctx
  7342  	return c
  7343  }
  7344  
  7345  // Header returns a http.Header that can be modified by the caller to add
  7346  // headers to the request.
  7347  func (c *ManagedconfigurationsforuserDeleteCall) Header() http.Header {
  7348  	if c.header_ == nil {
  7349  		c.header_ = make(http.Header)
  7350  	}
  7351  	return c.header_
  7352  }
  7353  
  7354  func (c *ManagedconfigurationsforuserDeleteCall) doRequest(alt string) (*http.Response, error) {
  7355  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7356  	var body io.Reader = nil
  7357  	c.urlParams_.Set("alt", alt)
  7358  	c.urlParams_.Set("prettyPrint", "false")
  7359  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}")
  7360  	urls += "?" + c.urlParams_.Encode()
  7361  	req, err := http.NewRequest("DELETE", urls, body)
  7362  	if err != nil {
  7363  		return nil, err
  7364  	}
  7365  	req.Header = reqHeaders
  7366  	googleapi.Expand(req.URL, map[string]string{
  7367  		"enterpriseId":                  c.enterpriseId,
  7368  		"userId":                        c.userId,
  7369  		"managedConfigurationForUserId": c.managedConfigurationForUserId,
  7370  	})
  7371  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7372  }
  7373  
  7374  // Do executes the "androidenterprise.managedconfigurationsforuser.delete" call.
  7375  func (c *ManagedconfigurationsforuserDeleteCall) Do(opts ...googleapi.CallOption) error {
  7376  	gensupport.SetOptions(c.urlParams_, opts...)
  7377  	res, err := c.doRequest("json")
  7378  	if err != nil {
  7379  		return err
  7380  	}
  7381  	defer googleapi.CloseBody(res)
  7382  	if err := googleapi.CheckResponse(res); err != nil {
  7383  		return gensupport.WrapError(err)
  7384  	}
  7385  	return nil
  7386  }
  7387  
  7388  type ManagedconfigurationsforuserGetCall struct {
  7389  	s                             *Service
  7390  	enterpriseId                  string
  7391  	userId                        string
  7392  	managedConfigurationForUserId string
  7393  	urlParams_                    gensupport.URLParams
  7394  	ifNoneMatch_                  string
  7395  	ctx_                          context.Context
  7396  	header_                       http.Header
  7397  }
  7398  
  7399  // Get: Retrieves details of a per-user managed configuration for an app for
  7400  // the specified user.
  7401  //
  7402  //   - enterpriseId: The ID of the enterprise.
  7403  //   - managedConfigurationForUserId: The ID of the managed configuration (a
  7404  //     product ID), e.g. "app:com.google.android.gm".
  7405  //   - userId: The ID of the user.
  7406  func (r *ManagedconfigurationsforuserService) Get(enterpriseId string, userId string, managedConfigurationForUserId string) *ManagedconfigurationsforuserGetCall {
  7407  	c := &ManagedconfigurationsforuserGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7408  	c.enterpriseId = enterpriseId
  7409  	c.userId = userId
  7410  	c.managedConfigurationForUserId = managedConfigurationForUserId
  7411  	return c
  7412  }
  7413  
  7414  // Fields allows partial responses to be retrieved. See
  7415  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7416  // details.
  7417  func (c *ManagedconfigurationsforuserGetCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserGetCall {
  7418  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7419  	return c
  7420  }
  7421  
  7422  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7423  // object's ETag matches the given value. This is useful for getting updates
  7424  // only after the object has changed since the last request.
  7425  func (c *ManagedconfigurationsforuserGetCall) IfNoneMatch(entityTag string) *ManagedconfigurationsforuserGetCall {
  7426  	c.ifNoneMatch_ = entityTag
  7427  	return c
  7428  }
  7429  
  7430  // Context sets the context to be used in this call's Do method.
  7431  func (c *ManagedconfigurationsforuserGetCall) Context(ctx context.Context) *ManagedconfigurationsforuserGetCall {
  7432  	c.ctx_ = ctx
  7433  	return c
  7434  }
  7435  
  7436  // Header returns a http.Header that can be modified by the caller to add
  7437  // headers to the request.
  7438  func (c *ManagedconfigurationsforuserGetCall) Header() http.Header {
  7439  	if c.header_ == nil {
  7440  		c.header_ = make(http.Header)
  7441  	}
  7442  	return c.header_
  7443  }
  7444  
  7445  func (c *ManagedconfigurationsforuserGetCall) doRequest(alt string) (*http.Response, error) {
  7446  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7447  	if c.ifNoneMatch_ != "" {
  7448  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7449  	}
  7450  	var body io.Reader = nil
  7451  	c.urlParams_.Set("alt", alt)
  7452  	c.urlParams_.Set("prettyPrint", "false")
  7453  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}")
  7454  	urls += "?" + c.urlParams_.Encode()
  7455  	req, err := http.NewRequest("GET", urls, body)
  7456  	if err != nil {
  7457  		return nil, err
  7458  	}
  7459  	req.Header = reqHeaders
  7460  	googleapi.Expand(req.URL, map[string]string{
  7461  		"enterpriseId":                  c.enterpriseId,
  7462  		"userId":                        c.userId,
  7463  		"managedConfigurationForUserId": c.managedConfigurationForUserId,
  7464  	})
  7465  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7466  }
  7467  
  7468  // Do executes the "androidenterprise.managedconfigurationsforuser.get" call.
  7469  // Any non-2xx status code is an error. Response headers are in either
  7470  // *ManagedConfiguration.ServerResponse.Header or (if a response was returned
  7471  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7472  // check whether the returned error was because http.StatusNotModified was
  7473  // returned.
  7474  func (c *ManagedconfigurationsforuserGetCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
  7475  	gensupport.SetOptions(c.urlParams_, opts...)
  7476  	res, err := c.doRequest("json")
  7477  	if res != nil && res.StatusCode == http.StatusNotModified {
  7478  		if res.Body != nil {
  7479  			res.Body.Close()
  7480  		}
  7481  		return nil, gensupport.WrapError(&googleapi.Error{
  7482  			Code:   res.StatusCode,
  7483  			Header: res.Header,
  7484  		})
  7485  	}
  7486  	if err != nil {
  7487  		return nil, err
  7488  	}
  7489  	defer googleapi.CloseBody(res)
  7490  	if err := googleapi.CheckResponse(res); err != nil {
  7491  		return nil, gensupport.WrapError(err)
  7492  	}
  7493  	ret := &ManagedConfiguration{
  7494  		ServerResponse: googleapi.ServerResponse{
  7495  			Header:         res.Header,
  7496  			HTTPStatusCode: res.StatusCode,
  7497  		},
  7498  	}
  7499  	target := &ret
  7500  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7501  		return nil, err
  7502  	}
  7503  	return ret, nil
  7504  }
  7505  
  7506  type ManagedconfigurationsforuserListCall struct {
  7507  	s            *Service
  7508  	enterpriseId string
  7509  	userId       string
  7510  	urlParams_   gensupport.URLParams
  7511  	ifNoneMatch_ string
  7512  	ctx_         context.Context
  7513  	header_      http.Header
  7514  }
  7515  
  7516  // List: Lists all the per-user managed configurations for the specified user.
  7517  // Only the ID is set.
  7518  //
  7519  // - enterpriseId: The ID of the enterprise.
  7520  // - userId: The ID of the user.
  7521  func (r *ManagedconfigurationsforuserService) List(enterpriseId string, userId string) *ManagedconfigurationsforuserListCall {
  7522  	c := &ManagedconfigurationsforuserListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7523  	c.enterpriseId = enterpriseId
  7524  	c.userId = userId
  7525  	return c
  7526  }
  7527  
  7528  // Fields allows partial responses to be retrieved. See
  7529  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7530  // details.
  7531  func (c *ManagedconfigurationsforuserListCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserListCall {
  7532  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7533  	return c
  7534  }
  7535  
  7536  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7537  // object's ETag matches the given value. This is useful for getting updates
  7538  // only after the object has changed since the last request.
  7539  func (c *ManagedconfigurationsforuserListCall) IfNoneMatch(entityTag string) *ManagedconfigurationsforuserListCall {
  7540  	c.ifNoneMatch_ = entityTag
  7541  	return c
  7542  }
  7543  
  7544  // Context sets the context to be used in this call's Do method.
  7545  func (c *ManagedconfigurationsforuserListCall) Context(ctx context.Context) *ManagedconfigurationsforuserListCall {
  7546  	c.ctx_ = ctx
  7547  	return c
  7548  }
  7549  
  7550  // Header returns a http.Header that can be modified by the caller to add
  7551  // headers to the request.
  7552  func (c *ManagedconfigurationsforuserListCall) Header() http.Header {
  7553  	if c.header_ == nil {
  7554  		c.header_ = make(http.Header)
  7555  	}
  7556  	return c.header_
  7557  }
  7558  
  7559  func (c *ManagedconfigurationsforuserListCall) doRequest(alt string) (*http.Response, error) {
  7560  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7561  	if c.ifNoneMatch_ != "" {
  7562  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7563  	}
  7564  	var body io.Reader = nil
  7565  	c.urlParams_.Set("alt", alt)
  7566  	c.urlParams_.Set("prettyPrint", "false")
  7567  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser")
  7568  	urls += "?" + c.urlParams_.Encode()
  7569  	req, err := http.NewRequest("GET", urls, body)
  7570  	if err != nil {
  7571  		return nil, err
  7572  	}
  7573  	req.Header = reqHeaders
  7574  	googleapi.Expand(req.URL, map[string]string{
  7575  		"enterpriseId": c.enterpriseId,
  7576  		"userId":       c.userId,
  7577  	})
  7578  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7579  }
  7580  
  7581  // Do executes the "androidenterprise.managedconfigurationsforuser.list" call.
  7582  // Any non-2xx status code is an error. Response headers are in either
  7583  // *ManagedConfigurationsForUserListResponse.ServerResponse.Header or (if a
  7584  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7585  // googleapi.IsNotModified to check whether the returned error was because
  7586  // http.StatusNotModified was returned.
  7587  func (c *ManagedconfigurationsforuserListCall) Do(opts ...googleapi.CallOption) (*ManagedConfigurationsForUserListResponse, error) {
  7588  	gensupport.SetOptions(c.urlParams_, opts...)
  7589  	res, err := c.doRequest("json")
  7590  	if res != nil && res.StatusCode == http.StatusNotModified {
  7591  		if res.Body != nil {
  7592  			res.Body.Close()
  7593  		}
  7594  		return nil, gensupport.WrapError(&googleapi.Error{
  7595  			Code:   res.StatusCode,
  7596  			Header: res.Header,
  7597  		})
  7598  	}
  7599  	if err != nil {
  7600  		return nil, err
  7601  	}
  7602  	defer googleapi.CloseBody(res)
  7603  	if err := googleapi.CheckResponse(res); err != nil {
  7604  		return nil, gensupport.WrapError(err)
  7605  	}
  7606  	ret := &ManagedConfigurationsForUserListResponse{
  7607  		ServerResponse: googleapi.ServerResponse{
  7608  			Header:         res.Header,
  7609  			HTTPStatusCode: res.StatusCode,
  7610  		},
  7611  	}
  7612  	target := &ret
  7613  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7614  		return nil, err
  7615  	}
  7616  	return ret, nil
  7617  }
  7618  
  7619  type ManagedconfigurationsforuserUpdateCall struct {
  7620  	s                             *Service
  7621  	enterpriseId                  string
  7622  	userId                        string
  7623  	managedConfigurationForUserId string
  7624  	managedconfiguration          *ManagedConfiguration
  7625  	urlParams_                    gensupport.URLParams
  7626  	ctx_                          context.Context
  7627  	header_                       http.Header
  7628  }
  7629  
  7630  // Update: Adds or updates the managed configuration settings for an app for
  7631  // the specified user. If you support the Managed configurations iframe, you
  7632  // can apply managed configurations to a user by specifying an mcmId and its
  7633  // associated configuration variables (if any) in the request. Alternatively,
  7634  // all EMMs can apply managed configurations by passing a list of managed
  7635  // properties.
  7636  //
  7637  //   - enterpriseId: The ID of the enterprise.
  7638  //   - managedConfigurationForUserId: The ID of the managed configuration (a
  7639  //     product ID), e.g. "app:com.google.android.gm".
  7640  //   - userId: The ID of the user.
  7641  func (r *ManagedconfigurationsforuserService) Update(enterpriseId string, userId string, managedConfigurationForUserId string, managedconfiguration *ManagedConfiguration) *ManagedconfigurationsforuserUpdateCall {
  7642  	c := &ManagedconfigurationsforuserUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7643  	c.enterpriseId = enterpriseId
  7644  	c.userId = userId
  7645  	c.managedConfigurationForUserId = managedConfigurationForUserId
  7646  	c.managedconfiguration = managedconfiguration
  7647  	return c
  7648  }
  7649  
  7650  // Fields allows partial responses to be retrieved. See
  7651  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7652  // details.
  7653  func (c *ManagedconfigurationsforuserUpdateCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserUpdateCall {
  7654  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7655  	return c
  7656  }
  7657  
  7658  // Context sets the context to be used in this call's Do method.
  7659  func (c *ManagedconfigurationsforuserUpdateCall) Context(ctx context.Context) *ManagedconfigurationsforuserUpdateCall {
  7660  	c.ctx_ = ctx
  7661  	return c
  7662  }
  7663  
  7664  // Header returns a http.Header that can be modified by the caller to add
  7665  // headers to the request.
  7666  func (c *ManagedconfigurationsforuserUpdateCall) Header() http.Header {
  7667  	if c.header_ == nil {
  7668  		c.header_ = make(http.Header)
  7669  	}
  7670  	return c.header_
  7671  }
  7672  
  7673  func (c *ManagedconfigurationsforuserUpdateCall) doRequest(alt string) (*http.Response, error) {
  7674  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7675  	var body io.Reader = nil
  7676  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedconfiguration)
  7677  	if err != nil {
  7678  		return nil, err
  7679  	}
  7680  	c.urlParams_.Set("alt", alt)
  7681  	c.urlParams_.Set("prettyPrint", "false")
  7682  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}")
  7683  	urls += "?" + c.urlParams_.Encode()
  7684  	req, err := http.NewRequest("PUT", urls, body)
  7685  	if err != nil {
  7686  		return nil, err
  7687  	}
  7688  	req.Header = reqHeaders
  7689  	googleapi.Expand(req.URL, map[string]string{
  7690  		"enterpriseId":                  c.enterpriseId,
  7691  		"userId":                        c.userId,
  7692  		"managedConfigurationForUserId": c.managedConfigurationForUserId,
  7693  	})
  7694  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7695  }
  7696  
  7697  // Do executes the "androidenterprise.managedconfigurationsforuser.update" call.
  7698  // Any non-2xx status code is an error. Response headers are in either
  7699  // *ManagedConfiguration.ServerResponse.Header or (if a response was returned
  7700  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7701  // check whether the returned error was because http.StatusNotModified was
  7702  // returned.
  7703  func (c *ManagedconfigurationsforuserUpdateCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
  7704  	gensupport.SetOptions(c.urlParams_, opts...)
  7705  	res, err := c.doRequest("json")
  7706  	if res != nil && res.StatusCode == http.StatusNotModified {
  7707  		if res.Body != nil {
  7708  			res.Body.Close()
  7709  		}
  7710  		return nil, gensupport.WrapError(&googleapi.Error{
  7711  			Code:   res.StatusCode,
  7712  			Header: res.Header,
  7713  		})
  7714  	}
  7715  	if err != nil {
  7716  		return nil, err
  7717  	}
  7718  	defer googleapi.CloseBody(res)
  7719  	if err := googleapi.CheckResponse(res); err != nil {
  7720  		return nil, gensupport.WrapError(err)
  7721  	}
  7722  	ret := &ManagedConfiguration{
  7723  		ServerResponse: googleapi.ServerResponse{
  7724  			Header:         res.Header,
  7725  			HTTPStatusCode: res.StatusCode,
  7726  		},
  7727  	}
  7728  	target := &ret
  7729  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7730  		return nil, err
  7731  	}
  7732  	return ret, nil
  7733  }
  7734  
  7735  type ManagedconfigurationssettingsListCall struct {
  7736  	s            *Service
  7737  	enterpriseId string
  7738  	productId    string
  7739  	urlParams_   gensupport.URLParams
  7740  	ifNoneMatch_ string
  7741  	ctx_         context.Context
  7742  	header_      http.Header
  7743  }
  7744  
  7745  // List: Lists all the managed configurations settings for the specified app.
  7746  //
  7747  //   - enterpriseId: The ID of the enterprise.
  7748  //   - productId: The ID of the product for which the managed configurations
  7749  //     settings applies to.
  7750  func (r *ManagedconfigurationssettingsService) List(enterpriseId string, productId string) *ManagedconfigurationssettingsListCall {
  7751  	c := &ManagedconfigurationssettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7752  	c.enterpriseId = enterpriseId
  7753  	c.productId = productId
  7754  	return c
  7755  }
  7756  
  7757  // Fields allows partial responses to be retrieved. See
  7758  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7759  // details.
  7760  func (c *ManagedconfigurationssettingsListCall) Fields(s ...googleapi.Field) *ManagedconfigurationssettingsListCall {
  7761  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7762  	return c
  7763  }
  7764  
  7765  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7766  // object's ETag matches the given value. This is useful for getting updates
  7767  // only after the object has changed since the last request.
  7768  func (c *ManagedconfigurationssettingsListCall) IfNoneMatch(entityTag string) *ManagedconfigurationssettingsListCall {
  7769  	c.ifNoneMatch_ = entityTag
  7770  	return c
  7771  }
  7772  
  7773  // Context sets the context to be used in this call's Do method.
  7774  func (c *ManagedconfigurationssettingsListCall) Context(ctx context.Context) *ManagedconfigurationssettingsListCall {
  7775  	c.ctx_ = ctx
  7776  	return c
  7777  }
  7778  
  7779  // Header returns a http.Header that can be modified by the caller to add
  7780  // headers to the request.
  7781  func (c *ManagedconfigurationssettingsListCall) Header() http.Header {
  7782  	if c.header_ == nil {
  7783  		c.header_ = make(http.Header)
  7784  	}
  7785  	return c.header_
  7786  }
  7787  
  7788  func (c *ManagedconfigurationssettingsListCall) doRequest(alt string) (*http.Response, error) {
  7789  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7790  	if c.ifNoneMatch_ != "" {
  7791  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7792  	}
  7793  	var body io.Reader = nil
  7794  	c.urlParams_.Set("alt", alt)
  7795  	c.urlParams_.Set("prettyPrint", "false")
  7796  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/managedConfigurationsSettings")
  7797  	urls += "?" + c.urlParams_.Encode()
  7798  	req, err := http.NewRequest("GET", urls, body)
  7799  	if err != nil {
  7800  		return nil, err
  7801  	}
  7802  	req.Header = reqHeaders
  7803  	googleapi.Expand(req.URL, map[string]string{
  7804  		"enterpriseId": c.enterpriseId,
  7805  		"productId":    c.productId,
  7806  	})
  7807  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7808  }
  7809  
  7810  // Do executes the "androidenterprise.managedconfigurationssettings.list" call.
  7811  // Any non-2xx status code is an error. Response headers are in either
  7812  // *ManagedConfigurationsSettingsListResponse.ServerResponse.Header or (if a
  7813  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7814  // googleapi.IsNotModified to check whether the returned error was because
  7815  // http.StatusNotModified was returned.
  7816  func (c *ManagedconfigurationssettingsListCall) Do(opts ...googleapi.CallOption) (*ManagedConfigurationsSettingsListResponse, error) {
  7817  	gensupport.SetOptions(c.urlParams_, opts...)
  7818  	res, err := c.doRequest("json")
  7819  	if res != nil && res.StatusCode == http.StatusNotModified {
  7820  		if res.Body != nil {
  7821  			res.Body.Close()
  7822  		}
  7823  		return nil, gensupport.WrapError(&googleapi.Error{
  7824  			Code:   res.StatusCode,
  7825  			Header: res.Header,
  7826  		})
  7827  	}
  7828  	if err != nil {
  7829  		return nil, err
  7830  	}
  7831  	defer googleapi.CloseBody(res)
  7832  	if err := googleapi.CheckResponse(res); err != nil {
  7833  		return nil, gensupport.WrapError(err)
  7834  	}
  7835  	ret := &ManagedConfigurationsSettingsListResponse{
  7836  		ServerResponse: googleapi.ServerResponse{
  7837  			Header:         res.Header,
  7838  			HTTPStatusCode: res.StatusCode,
  7839  		},
  7840  	}
  7841  	target := &ret
  7842  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7843  		return nil, err
  7844  	}
  7845  	return ret, nil
  7846  }
  7847  
  7848  type PermissionsGetCall struct {
  7849  	s            *Service
  7850  	permissionId string
  7851  	urlParams_   gensupport.URLParams
  7852  	ifNoneMatch_ string
  7853  	ctx_         context.Context
  7854  	header_      http.Header
  7855  }
  7856  
  7857  // Get: Retrieves details of an Android app permission for display to an
  7858  // enterprise admin.
  7859  //
  7860  // - permissionId: The ID of the permission.
  7861  func (r *PermissionsService) Get(permissionId string) *PermissionsGetCall {
  7862  	c := &PermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7863  	c.permissionId = permissionId
  7864  	return c
  7865  }
  7866  
  7867  // Language sets the optional parameter "language": The BCP47 tag for the
  7868  // user's preferred language (e.g. "en-US", "de")
  7869  func (c *PermissionsGetCall) Language(language string) *PermissionsGetCall {
  7870  	c.urlParams_.Set("language", language)
  7871  	return c
  7872  }
  7873  
  7874  // Fields allows partial responses to be retrieved. See
  7875  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7876  // details.
  7877  func (c *PermissionsGetCall) Fields(s ...googleapi.Field) *PermissionsGetCall {
  7878  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7879  	return c
  7880  }
  7881  
  7882  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7883  // object's ETag matches the given value. This is useful for getting updates
  7884  // only after the object has changed since the last request.
  7885  func (c *PermissionsGetCall) IfNoneMatch(entityTag string) *PermissionsGetCall {
  7886  	c.ifNoneMatch_ = entityTag
  7887  	return c
  7888  }
  7889  
  7890  // Context sets the context to be used in this call's Do method.
  7891  func (c *PermissionsGetCall) Context(ctx context.Context) *PermissionsGetCall {
  7892  	c.ctx_ = ctx
  7893  	return c
  7894  }
  7895  
  7896  // Header returns a http.Header that can be modified by the caller to add
  7897  // headers to the request.
  7898  func (c *PermissionsGetCall) Header() http.Header {
  7899  	if c.header_ == nil {
  7900  		c.header_ = make(http.Header)
  7901  	}
  7902  	return c.header_
  7903  }
  7904  
  7905  func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) {
  7906  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7907  	if c.ifNoneMatch_ != "" {
  7908  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7909  	}
  7910  	var body io.Reader = nil
  7911  	c.urlParams_.Set("alt", alt)
  7912  	c.urlParams_.Set("prettyPrint", "false")
  7913  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/permissions/{permissionId}")
  7914  	urls += "?" + c.urlParams_.Encode()
  7915  	req, err := http.NewRequest("GET", urls, body)
  7916  	if err != nil {
  7917  		return nil, err
  7918  	}
  7919  	req.Header = reqHeaders
  7920  	googleapi.Expand(req.URL, map[string]string{
  7921  		"permissionId": c.permissionId,
  7922  	})
  7923  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7924  }
  7925  
  7926  // Do executes the "androidenterprise.permissions.get" call.
  7927  // Any non-2xx status code is an error. Response headers are in either
  7928  // *Permission.ServerResponse.Header or (if a response was returned at all) in
  7929  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7930  // whether the returned error was because http.StatusNotModified was returned.
  7931  func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
  7932  	gensupport.SetOptions(c.urlParams_, opts...)
  7933  	res, err := c.doRequest("json")
  7934  	if res != nil && res.StatusCode == http.StatusNotModified {
  7935  		if res.Body != nil {
  7936  			res.Body.Close()
  7937  		}
  7938  		return nil, gensupport.WrapError(&googleapi.Error{
  7939  			Code:   res.StatusCode,
  7940  			Header: res.Header,
  7941  		})
  7942  	}
  7943  	if err != nil {
  7944  		return nil, err
  7945  	}
  7946  	defer googleapi.CloseBody(res)
  7947  	if err := googleapi.CheckResponse(res); err != nil {
  7948  		return nil, gensupport.WrapError(err)
  7949  	}
  7950  	ret := &Permission{
  7951  		ServerResponse: googleapi.ServerResponse{
  7952  			Header:         res.Header,
  7953  			HTTPStatusCode: res.StatusCode,
  7954  		},
  7955  	}
  7956  	target := &ret
  7957  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7958  		return nil, err
  7959  	}
  7960  	return ret, nil
  7961  }
  7962  
  7963  type ProductsApproveCall struct {
  7964  	s                      *Service
  7965  	enterpriseId           string
  7966  	productId              string
  7967  	productsapproverequest *ProductsApproveRequest
  7968  	urlParams_             gensupport.URLParams
  7969  	ctx_                   context.Context
  7970  	header_                http.Header
  7971  }
  7972  
  7973  // Approve:  Approves the specified product and the relevant app permissions,
  7974  // if any. The maximum number of products that you can approve per enterprise
  7975  // customer is 1,000. To learn how to use managed Google Play to design and
  7976  // create a store layout to display approved products to your users, see Store
  7977  // Layout Design. **Note:** This item has been deprecated. New integrations
  7978  // cannot use this method and can refer to our new recommendations.
  7979  //
  7980  // - enterpriseId: The ID of the enterprise.
  7981  // - productId: The ID of the product.
  7982  func (r *ProductsService) Approve(enterpriseId string, productId string, productsapproverequest *ProductsApproveRequest) *ProductsApproveCall {
  7983  	c := &ProductsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7984  	c.enterpriseId = enterpriseId
  7985  	c.productId = productId
  7986  	c.productsapproverequest = productsapproverequest
  7987  	return c
  7988  }
  7989  
  7990  // Fields allows partial responses to be retrieved. See
  7991  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7992  // details.
  7993  func (c *ProductsApproveCall) Fields(s ...googleapi.Field) *ProductsApproveCall {
  7994  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7995  	return c
  7996  }
  7997  
  7998  // Context sets the context to be used in this call's Do method.
  7999  func (c *ProductsApproveCall) Context(ctx context.Context) *ProductsApproveCall {
  8000  	c.ctx_ = ctx
  8001  	return c
  8002  }
  8003  
  8004  // Header returns a http.Header that can be modified by the caller to add
  8005  // headers to the request.
  8006  func (c *ProductsApproveCall) Header() http.Header {
  8007  	if c.header_ == nil {
  8008  		c.header_ = make(http.Header)
  8009  	}
  8010  	return c.header_
  8011  }
  8012  
  8013  func (c *ProductsApproveCall) doRequest(alt string) (*http.Response, error) {
  8014  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8015  	var body io.Reader = nil
  8016  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.productsapproverequest)
  8017  	if err != nil {
  8018  		return nil, err
  8019  	}
  8020  	c.urlParams_.Set("alt", alt)
  8021  	c.urlParams_.Set("prettyPrint", "false")
  8022  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/approve")
  8023  	urls += "?" + c.urlParams_.Encode()
  8024  	req, err := http.NewRequest("POST", urls, body)
  8025  	if err != nil {
  8026  		return nil, err
  8027  	}
  8028  	req.Header = reqHeaders
  8029  	googleapi.Expand(req.URL, map[string]string{
  8030  		"enterpriseId": c.enterpriseId,
  8031  		"productId":    c.productId,
  8032  	})
  8033  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8034  }
  8035  
  8036  // Do executes the "androidenterprise.products.approve" call.
  8037  func (c *ProductsApproveCall) Do(opts ...googleapi.CallOption) error {
  8038  	gensupport.SetOptions(c.urlParams_, opts...)
  8039  	res, err := c.doRequest("json")
  8040  	if err != nil {
  8041  		return err
  8042  	}
  8043  	defer googleapi.CloseBody(res)
  8044  	if err := googleapi.CheckResponse(res); err != nil {
  8045  		return gensupport.WrapError(err)
  8046  	}
  8047  	return nil
  8048  }
  8049  
  8050  type ProductsGenerateApprovalUrlCall struct {
  8051  	s            *Service
  8052  	enterpriseId string
  8053  	productId    string
  8054  	urlParams_   gensupport.URLParams
  8055  	ctx_         context.Context
  8056  	header_      http.Header
  8057  }
  8058  
  8059  // GenerateApprovalUrl: Generates a URL that can be rendered in an iframe to
  8060  // display the permissions (if any) of a product. An enterprise admin must view
  8061  // these permissions and accept them on behalf of their organization in order
  8062  // to approve that product. Admins should accept the displayed permissions by
  8063  // interacting with a separate UI element in the EMM console, which in turn
  8064  // should trigger the use of this URL as the approvalUrlInfo.approvalUrl
  8065  // property in a Products.approve call to approve the product. This URL can
  8066  // only be used to display permissions for up to 1 day. **Note:** This item has
  8067  // been deprecated. New integrations cannot use this method and can refer to
  8068  // our new recommendations.
  8069  //
  8070  // - enterpriseId: The ID of the enterprise.
  8071  // - productId: The ID of the product.
  8072  func (r *ProductsService) GenerateApprovalUrl(enterpriseId string, productId string) *ProductsGenerateApprovalUrlCall {
  8073  	c := &ProductsGenerateApprovalUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8074  	c.enterpriseId = enterpriseId
  8075  	c.productId = productId
  8076  	return c
  8077  }
  8078  
  8079  // LanguageCode sets the optional parameter "languageCode": The BCP 47 language
  8080  // code used for permission names and descriptions in the returned iframe, for
  8081  // instance "en-US".
  8082  func (c *ProductsGenerateApprovalUrlCall) LanguageCode(languageCode string) *ProductsGenerateApprovalUrlCall {
  8083  	c.urlParams_.Set("languageCode", languageCode)
  8084  	return c
  8085  }
  8086  
  8087  // Fields allows partial responses to be retrieved. See
  8088  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8089  // details.
  8090  func (c *ProductsGenerateApprovalUrlCall) Fields(s ...googleapi.Field) *ProductsGenerateApprovalUrlCall {
  8091  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8092  	return c
  8093  }
  8094  
  8095  // Context sets the context to be used in this call's Do method.
  8096  func (c *ProductsGenerateApprovalUrlCall) Context(ctx context.Context) *ProductsGenerateApprovalUrlCall {
  8097  	c.ctx_ = ctx
  8098  	return c
  8099  }
  8100  
  8101  // Header returns a http.Header that can be modified by the caller to add
  8102  // headers to the request.
  8103  func (c *ProductsGenerateApprovalUrlCall) Header() http.Header {
  8104  	if c.header_ == nil {
  8105  		c.header_ = make(http.Header)
  8106  	}
  8107  	return c.header_
  8108  }
  8109  
  8110  func (c *ProductsGenerateApprovalUrlCall) doRequest(alt string) (*http.Response, error) {
  8111  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8112  	var body io.Reader = nil
  8113  	c.urlParams_.Set("alt", alt)
  8114  	c.urlParams_.Set("prettyPrint", "false")
  8115  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl")
  8116  	urls += "?" + c.urlParams_.Encode()
  8117  	req, err := http.NewRequest("POST", urls, body)
  8118  	if err != nil {
  8119  		return nil, err
  8120  	}
  8121  	req.Header = reqHeaders
  8122  	googleapi.Expand(req.URL, map[string]string{
  8123  		"enterpriseId": c.enterpriseId,
  8124  		"productId":    c.productId,
  8125  	})
  8126  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8127  }
  8128  
  8129  // Do executes the "androidenterprise.products.generateApprovalUrl" call.
  8130  // Any non-2xx status code is an error. Response headers are in either
  8131  // *ProductsGenerateApprovalUrlResponse.ServerResponse.Header or (if a response
  8132  // was returned at all) in error.(*googleapi.Error).Header. Use
  8133  // googleapi.IsNotModified to check whether the returned error was because
  8134  // http.StatusNotModified was returned.
  8135  func (c *ProductsGenerateApprovalUrlCall) Do(opts ...googleapi.CallOption) (*ProductsGenerateApprovalUrlResponse, error) {
  8136  	gensupport.SetOptions(c.urlParams_, opts...)
  8137  	res, err := c.doRequest("json")
  8138  	if res != nil && res.StatusCode == http.StatusNotModified {
  8139  		if res.Body != nil {
  8140  			res.Body.Close()
  8141  		}
  8142  		return nil, gensupport.WrapError(&googleapi.Error{
  8143  			Code:   res.StatusCode,
  8144  			Header: res.Header,
  8145  		})
  8146  	}
  8147  	if err != nil {
  8148  		return nil, err
  8149  	}
  8150  	defer googleapi.CloseBody(res)
  8151  	if err := googleapi.CheckResponse(res); err != nil {
  8152  		return nil, gensupport.WrapError(err)
  8153  	}
  8154  	ret := &ProductsGenerateApprovalUrlResponse{
  8155  		ServerResponse: googleapi.ServerResponse{
  8156  			Header:         res.Header,
  8157  			HTTPStatusCode: res.StatusCode,
  8158  		},
  8159  	}
  8160  	target := &ret
  8161  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8162  		return nil, err
  8163  	}
  8164  	return ret, nil
  8165  }
  8166  
  8167  type ProductsGetCall struct {
  8168  	s            *Service
  8169  	enterpriseId string
  8170  	productId    string
  8171  	urlParams_   gensupport.URLParams
  8172  	ifNoneMatch_ string
  8173  	ctx_         context.Context
  8174  	header_      http.Header
  8175  }
  8176  
  8177  // Get: Retrieves details of a product for display to an enterprise admin.
  8178  //
  8179  // - enterpriseId: The ID of the enterprise.
  8180  // - productId: The ID of the product, e.g. "app:com.google.android.gm".
  8181  func (r *ProductsService) Get(enterpriseId string, productId string) *ProductsGetCall {
  8182  	c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8183  	c.enterpriseId = enterpriseId
  8184  	c.productId = productId
  8185  	return c
  8186  }
  8187  
  8188  // Language sets the optional parameter "language": The BCP47 tag for the
  8189  // user's preferred language (e.g. "en-US", "de").
  8190  func (c *ProductsGetCall) Language(language string) *ProductsGetCall {
  8191  	c.urlParams_.Set("language", language)
  8192  	return c
  8193  }
  8194  
  8195  // Fields allows partial responses to be retrieved. See
  8196  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8197  // details.
  8198  func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall {
  8199  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8200  	return c
  8201  }
  8202  
  8203  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8204  // object's ETag matches the given value. This is useful for getting updates
  8205  // only after the object has changed since the last request.
  8206  func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall {
  8207  	c.ifNoneMatch_ = entityTag
  8208  	return c
  8209  }
  8210  
  8211  // Context sets the context to be used in this call's Do method.
  8212  func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall {
  8213  	c.ctx_ = ctx
  8214  	return c
  8215  }
  8216  
  8217  // Header returns a http.Header that can be modified by the caller to add
  8218  // headers to the request.
  8219  func (c *ProductsGetCall) Header() http.Header {
  8220  	if c.header_ == nil {
  8221  		c.header_ = make(http.Header)
  8222  	}
  8223  	return c.header_
  8224  }
  8225  
  8226  func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) {
  8227  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8228  	if c.ifNoneMatch_ != "" {
  8229  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8230  	}
  8231  	var body io.Reader = nil
  8232  	c.urlParams_.Set("alt", alt)
  8233  	c.urlParams_.Set("prettyPrint", "false")
  8234  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}")
  8235  	urls += "?" + c.urlParams_.Encode()
  8236  	req, err := http.NewRequest("GET", urls, body)
  8237  	if err != nil {
  8238  		return nil, err
  8239  	}
  8240  	req.Header = reqHeaders
  8241  	googleapi.Expand(req.URL, map[string]string{
  8242  		"enterpriseId": c.enterpriseId,
  8243  		"productId":    c.productId,
  8244  	})
  8245  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8246  }
  8247  
  8248  // Do executes the "androidenterprise.products.get" call.
  8249  // Any non-2xx status code is an error. Response headers are in either
  8250  // *Product.ServerResponse.Header or (if a response was returned at all) in
  8251  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8252  // whether the returned error was because http.StatusNotModified was returned.
  8253  func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
  8254  	gensupport.SetOptions(c.urlParams_, opts...)
  8255  	res, err := c.doRequest("json")
  8256  	if res != nil && res.StatusCode == http.StatusNotModified {
  8257  		if res.Body != nil {
  8258  			res.Body.Close()
  8259  		}
  8260  		return nil, gensupport.WrapError(&googleapi.Error{
  8261  			Code:   res.StatusCode,
  8262  			Header: res.Header,
  8263  		})
  8264  	}
  8265  	if err != nil {
  8266  		return nil, err
  8267  	}
  8268  	defer googleapi.CloseBody(res)
  8269  	if err := googleapi.CheckResponse(res); err != nil {
  8270  		return nil, gensupport.WrapError(err)
  8271  	}
  8272  	ret := &Product{
  8273  		ServerResponse: googleapi.ServerResponse{
  8274  			Header:         res.Header,
  8275  			HTTPStatusCode: res.StatusCode,
  8276  		},
  8277  	}
  8278  	target := &ret
  8279  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8280  		return nil, err
  8281  	}
  8282  	return ret, nil
  8283  }
  8284  
  8285  type ProductsGetAppRestrictionsSchemaCall struct {
  8286  	s            *Service
  8287  	enterpriseId string
  8288  	productId    string
  8289  	urlParams_   gensupport.URLParams
  8290  	ifNoneMatch_ string
  8291  	ctx_         context.Context
  8292  	header_      http.Header
  8293  }
  8294  
  8295  // GetAppRestrictionsSchema: Retrieves the schema that defines the configurable
  8296  // properties for this product. All products have a schema, but this schema may
  8297  // be empty if no managed configurations have been defined. This schema can be
  8298  // used to populate a UI that allows an admin to configure the product. To
  8299  // apply a managed configuration based on the schema obtained using this API,
  8300  // see Managed Configurations through Play.
  8301  //
  8302  // - enterpriseId: The ID of the enterprise.
  8303  // - productId: The ID of the product.
  8304  func (r *ProductsService) GetAppRestrictionsSchema(enterpriseId string, productId string) *ProductsGetAppRestrictionsSchemaCall {
  8305  	c := &ProductsGetAppRestrictionsSchemaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8306  	c.enterpriseId = enterpriseId
  8307  	c.productId = productId
  8308  	return c
  8309  }
  8310  
  8311  // Language sets the optional parameter "language": The BCP47 tag for the
  8312  // user's preferred language (e.g. "en-US", "de").
  8313  func (c *ProductsGetAppRestrictionsSchemaCall) Language(language string) *ProductsGetAppRestrictionsSchemaCall {
  8314  	c.urlParams_.Set("language", language)
  8315  	return c
  8316  }
  8317  
  8318  // Fields allows partial responses to be retrieved. See
  8319  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8320  // details.
  8321  func (c *ProductsGetAppRestrictionsSchemaCall) Fields(s ...googleapi.Field) *ProductsGetAppRestrictionsSchemaCall {
  8322  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8323  	return c
  8324  }
  8325  
  8326  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8327  // object's ETag matches the given value. This is useful for getting updates
  8328  // only after the object has changed since the last request.
  8329  func (c *ProductsGetAppRestrictionsSchemaCall) IfNoneMatch(entityTag string) *ProductsGetAppRestrictionsSchemaCall {
  8330  	c.ifNoneMatch_ = entityTag
  8331  	return c
  8332  }
  8333  
  8334  // Context sets the context to be used in this call's Do method.
  8335  func (c *ProductsGetAppRestrictionsSchemaCall) Context(ctx context.Context) *ProductsGetAppRestrictionsSchemaCall {
  8336  	c.ctx_ = ctx
  8337  	return c
  8338  }
  8339  
  8340  // Header returns a http.Header that can be modified by the caller to add
  8341  // headers to the request.
  8342  func (c *ProductsGetAppRestrictionsSchemaCall) Header() http.Header {
  8343  	if c.header_ == nil {
  8344  		c.header_ = make(http.Header)
  8345  	}
  8346  	return c.header_
  8347  }
  8348  
  8349  func (c *ProductsGetAppRestrictionsSchemaCall) doRequest(alt string) (*http.Response, error) {
  8350  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8351  	if c.ifNoneMatch_ != "" {
  8352  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8353  	}
  8354  	var body io.Reader = nil
  8355  	c.urlParams_.Set("alt", alt)
  8356  	c.urlParams_.Set("prettyPrint", "false")
  8357  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema")
  8358  	urls += "?" + c.urlParams_.Encode()
  8359  	req, err := http.NewRequest("GET", urls, body)
  8360  	if err != nil {
  8361  		return nil, err
  8362  	}
  8363  	req.Header = reqHeaders
  8364  	googleapi.Expand(req.URL, map[string]string{
  8365  		"enterpriseId": c.enterpriseId,
  8366  		"productId":    c.productId,
  8367  	})
  8368  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8369  }
  8370  
  8371  // Do executes the "androidenterprise.products.getAppRestrictionsSchema" call.
  8372  // Any non-2xx status code is an error. Response headers are in either
  8373  // *AppRestrictionsSchema.ServerResponse.Header or (if a response was returned
  8374  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8375  // check whether the returned error was because http.StatusNotModified was
  8376  // returned.
  8377  func (c *ProductsGetAppRestrictionsSchemaCall) Do(opts ...googleapi.CallOption) (*AppRestrictionsSchema, error) {
  8378  	gensupport.SetOptions(c.urlParams_, opts...)
  8379  	res, err := c.doRequest("json")
  8380  	if res != nil && res.StatusCode == http.StatusNotModified {
  8381  		if res.Body != nil {
  8382  			res.Body.Close()
  8383  		}
  8384  		return nil, gensupport.WrapError(&googleapi.Error{
  8385  			Code:   res.StatusCode,
  8386  			Header: res.Header,
  8387  		})
  8388  	}
  8389  	if err != nil {
  8390  		return nil, err
  8391  	}
  8392  	defer googleapi.CloseBody(res)
  8393  	if err := googleapi.CheckResponse(res); err != nil {
  8394  		return nil, gensupport.WrapError(err)
  8395  	}
  8396  	ret := &AppRestrictionsSchema{
  8397  		ServerResponse: googleapi.ServerResponse{
  8398  			Header:         res.Header,
  8399  			HTTPStatusCode: res.StatusCode,
  8400  		},
  8401  	}
  8402  	target := &ret
  8403  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8404  		return nil, err
  8405  	}
  8406  	return ret, nil
  8407  }
  8408  
  8409  type ProductsGetPermissionsCall struct {
  8410  	s            *Service
  8411  	enterpriseId string
  8412  	productId    string
  8413  	urlParams_   gensupport.URLParams
  8414  	ifNoneMatch_ string
  8415  	ctx_         context.Context
  8416  	header_      http.Header
  8417  }
  8418  
  8419  // GetPermissions: Retrieves the Android app permissions required by this app.
  8420  //
  8421  // - enterpriseId: The ID of the enterprise.
  8422  // - productId: The ID of the product.
  8423  func (r *ProductsService) GetPermissions(enterpriseId string, productId string) *ProductsGetPermissionsCall {
  8424  	c := &ProductsGetPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8425  	c.enterpriseId = enterpriseId
  8426  	c.productId = productId
  8427  	return c
  8428  }
  8429  
  8430  // Fields allows partial responses to be retrieved. See
  8431  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8432  // details.
  8433  func (c *ProductsGetPermissionsCall) Fields(s ...googleapi.Field) *ProductsGetPermissionsCall {
  8434  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8435  	return c
  8436  }
  8437  
  8438  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8439  // object's ETag matches the given value. This is useful for getting updates
  8440  // only after the object has changed since the last request.
  8441  func (c *ProductsGetPermissionsCall) IfNoneMatch(entityTag string) *ProductsGetPermissionsCall {
  8442  	c.ifNoneMatch_ = entityTag
  8443  	return c
  8444  }
  8445  
  8446  // Context sets the context to be used in this call's Do method.
  8447  func (c *ProductsGetPermissionsCall) Context(ctx context.Context) *ProductsGetPermissionsCall {
  8448  	c.ctx_ = ctx
  8449  	return c
  8450  }
  8451  
  8452  // Header returns a http.Header that can be modified by the caller to add
  8453  // headers to the request.
  8454  func (c *ProductsGetPermissionsCall) Header() http.Header {
  8455  	if c.header_ == nil {
  8456  		c.header_ = make(http.Header)
  8457  	}
  8458  	return c.header_
  8459  }
  8460  
  8461  func (c *ProductsGetPermissionsCall) doRequest(alt string) (*http.Response, error) {
  8462  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8463  	if c.ifNoneMatch_ != "" {
  8464  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8465  	}
  8466  	var body io.Reader = nil
  8467  	c.urlParams_.Set("alt", alt)
  8468  	c.urlParams_.Set("prettyPrint", "false")
  8469  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/permissions")
  8470  	urls += "?" + c.urlParams_.Encode()
  8471  	req, err := http.NewRequest("GET", urls, body)
  8472  	if err != nil {
  8473  		return nil, err
  8474  	}
  8475  	req.Header = reqHeaders
  8476  	googleapi.Expand(req.URL, map[string]string{
  8477  		"enterpriseId": c.enterpriseId,
  8478  		"productId":    c.productId,
  8479  	})
  8480  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8481  }
  8482  
  8483  // Do executes the "androidenterprise.products.getPermissions" call.
  8484  // Any non-2xx status code is an error. Response headers are in either
  8485  // *ProductPermissions.ServerResponse.Header or (if a response was returned at
  8486  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8487  // check whether the returned error was because http.StatusNotModified was
  8488  // returned.
  8489  func (c *ProductsGetPermissionsCall) Do(opts ...googleapi.CallOption) (*ProductPermissions, error) {
  8490  	gensupport.SetOptions(c.urlParams_, opts...)
  8491  	res, err := c.doRequest("json")
  8492  	if res != nil && res.StatusCode == http.StatusNotModified {
  8493  		if res.Body != nil {
  8494  			res.Body.Close()
  8495  		}
  8496  		return nil, gensupport.WrapError(&googleapi.Error{
  8497  			Code:   res.StatusCode,
  8498  			Header: res.Header,
  8499  		})
  8500  	}
  8501  	if err != nil {
  8502  		return nil, err
  8503  	}
  8504  	defer googleapi.CloseBody(res)
  8505  	if err := googleapi.CheckResponse(res); err != nil {
  8506  		return nil, gensupport.WrapError(err)
  8507  	}
  8508  	ret := &ProductPermissions{
  8509  		ServerResponse: googleapi.ServerResponse{
  8510  			Header:         res.Header,
  8511  			HTTPStatusCode: res.StatusCode,
  8512  		},
  8513  	}
  8514  	target := &ret
  8515  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8516  		return nil, err
  8517  	}
  8518  	return ret, nil
  8519  }
  8520  
  8521  type ProductsListCall struct {
  8522  	s            *Service
  8523  	enterpriseId string
  8524  	urlParams_   gensupport.URLParams
  8525  	ifNoneMatch_ string
  8526  	ctx_         context.Context
  8527  	header_      http.Header
  8528  }
  8529  
  8530  // List: Finds approved products that match a query, or all approved products
  8531  // if there is no query. **Note:** This item has been deprecated. New
  8532  // integrations cannot use this method and can refer to our new
  8533  // recommendations.
  8534  //
  8535  // - enterpriseId: The ID of the enterprise.
  8536  func (r *ProductsService) List(enterpriseId string) *ProductsListCall {
  8537  	c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8538  	c.enterpriseId = enterpriseId
  8539  	return c
  8540  }
  8541  
  8542  // Approved sets the optional parameter "approved": Specifies whether to search
  8543  // among all products (false) or among only products that have been approved
  8544  // (true). Only "true" is supported, and should be specified.
  8545  func (c *ProductsListCall) Approved(approved bool) *ProductsListCall {
  8546  	c.urlParams_.Set("approved", fmt.Sprint(approved))
  8547  	return c
  8548  }
  8549  
  8550  // Language sets the optional parameter "language": The BCP47 tag for the
  8551  // user's preferred language (e.g. "en-US", "de"). Results are returned in the
  8552  // language best matching the preferred language.
  8553  func (c *ProductsListCall) Language(language string) *ProductsListCall {
  8554  	c.urlParams_.Set("language", language)
  8555  	return c
  8556  }
  8557  
  8558  // MaxResults sets the optional parameter "maxResults": Defines how many
  8559  // results the list operation should return. The default number depends on the
  8560  // resource collection.
  8561  func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall {
  8562  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  8563  	return c
  8564  }
  8565  
  8566  // Query sets the optional parameter "query": The search query as typed in the
  8567  // Google Play store search box. If omitted, all approved apps will be returned
  8568  // (using the pagination parameters), including apps that are not available in
  8569  // the store (e.g. unpublished apps).
  8570  func (c *ProductsListCall) Query(query string) *ProductsListCall {
  8571  	c.urlParams_.Set("query", query)
  8572  	return c
  8573  }
  8574  
  8575  // Token sets the optional parameter "token": Defines the token of the page to
  8576  // return, usually taken from TokenPagination. This can only be used if token
  8577  // paging is enabled.
  8578  func (c *ProductsListCall) Token(token string) *ProductsListCall {
  8579  	c.urlParams_.Set("token", token)
  8580  	return c
  8581  }
  8582  
  8583  // Fields allows partial responses to be retrieved. See
  8584  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8585  // details.
  8586  func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall {
  8587  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8588  	return c
  8589  }
  8590  
  8591  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8592  // object's ETag matches the given value. This is useful for getting updates
  8593  // only after the object has changed since the last request.
  8594  func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall {
  8595  	c.ifNoneMatch_ = entityTag
  8596  	return c
  8597  }
  8598  
  8599  // Context sets the context to be used in this call's Do method.
  8600  func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall {
  8601  	c.ctx_ = ctx
  8602  	return c
  8603  }
  8604  
  8605  // Header returns a http.Header that can be modified by the caller to add
  8606  // headers to the request.
  8607  func (c *ProductsListCall) Header() http.Header {
  8608  	if c.header_ == nil {
  8609  		c.header_ = make(http.Header)
  8610  	}
  8611  	return c.header_
  8612  }
  8613  
  8614  func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) {
  8615  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8616  	if c.ifNoneMatch_ != "" {
  8617  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8618  	}
  8619  	var body io.Reader = nil
  8620  	c.urlParams_.Set("alt", alt)
  8621  	c.urlParams_.Set("prettyPrint", "false")
  8622  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products")
  8623  	urls += "?" + c.urlParams_.Encode()
  8624  	req, err := http.NewRequest("GET", urls, body)
  8625  	if err != nil {
  8626  		return nil, err
  8627  	}
  8628  	req.Header = reqHeaders
  8629  	googleapi.Expand(req.URL, map[string]string{
  8630  		"enterpriseId": c.enterpriseId,
  8631  	})
  8632  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8633  }
  8634  
  8635  // Do executes the "androidenterprise.products.list" call.
  8636  // Any non-2xx status code is an error. Response headers are in either
  8637  // *ProductsListResponse.ServerResponse.Header or (if a response was returned
  8638  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8639  // check whether the returned error was because http.StatusNotModified was
  8640  // returned.
  8641  func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) {
  8642  	gensupport.SetOptions(c.urlParams_, opts...)
  8643  	res, err := c.doRequest("json")
  8644  	if res != nil && res.StatusCode == http.StatusNotModified {
  8645  		if res.Body != nil {
  8646  			res.Body.Close()
  8647  		}
  8648  		return nil, gensupport.WrapError(&googleapi.Error{
  8649  			Code:   res.StatusCode,
  8650  			Header: res.Header,
  8651  		})
  8652  	}
  8653  	if err != nil {
  8654  		return nil, err
  8655  	}
  8656  	defer googleapi.CloseBody(res)
  8657  	if err := googleapi.CheckResponse(res); err != nil {
  8658  		return nil, gensupport.WrapError(err)
  8659  	}
  8660  	ret := &ProductsListResponse{
  8661  		ServerResponse: googleapi.ServerResponse{
  8662  			Header:         res.Header,
  8663  			HTTPStatusCode: res.StatusCode,
  8664  		},
  8665  	}
  8666  	target := &ret
  8667  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8668  		return nil, err
  8669  	}
  8670  	return ret, nil
  8671  }
  8672  
  8673  type ProductsUnapproveCall struct {
  8674  	s            *Service
  8675  	enterpriseId string
  8676  	productId    string
  8677  	urlParams_   gensupport.URLParams
  8678  	ctx_         context.Context
  8679  	header_      http.Header
  8680  }
  8681  
  8682  // Unapprove: Unapproves the specified product (and the relevant app
  8683  // permissions, if any) **Note:** This item has been deprecated. New
  8684  // integrations cannot use this method and can refer to our new
  8685  // recommendations.
  8686  //
  8687  // - enterpriseId: The ID of the enterprise.
  8688  // - productId: The ID of the product.
  8689  func (r *ProductsService) Unapprove(enterpriseId string, productId string) *ProductsUnapproveCall {
  8690  	c := &ProductsUnapproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8691  	c.enterpriseId = enterpriseId
  8692  	c.productId = productId
  8693  	return c
  8694  }
  8695  
  8696  // Fields allows partial responses to be retrieved. See
  8697  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8698  // details.
  8699  func (c *ProductsUnapproveCall) Fields(s ...googleapi.Field) *ProductsUnapproveCall {
  8700  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8701  	return c
  8702  }
  8703  
  8704  // Context sets the context to be used in this call's Do method.
  8705  func (c *ProductsUnapproveCall) Context(ctx context.Context) *ProductsUnapproveCall {
  8706  	c.ctx_ = ctx
  8707  	return c
  8708  }
  8709  
  8710  // Header returns a http.Header that can be modified by the caller to add
  8711  // headers to the request.
  8712  func (c *ProductsUnapproveCall) Header() http.Header {
  8713  	if c.header_ == nil {
  8714  		c.header_ = make(http.Header)
  8715  	}
  8716  	return c.header_
  8717  }
  8718  
  8719  func (c *ProductsUnapproveCall) doRequest(alt string) (*http.Response, error) {
  8720  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8721  	var body io.Reader = nil
  8722  	c.urlParams_.Set("alt", alt)
  8723  	c.urlParams_.Set("prettyPrint", "false")
  8724  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/unapprove")
  8725  	urls += "?" + c.urlParams_.Encode()
  8726  	req, err := http.NewRequest("POST", urls, body)
  8727  	if err != nil {
  8728  		return nil, err
  8729  	}
  8730  	req.Header = reqHeaders
  8731  	googleapi.Expand(req.URL, map[string]string{
  8732  		"enterpriseId": c.enterpriseId,
  8733  		"productId":    c.productId,
  8734  	})
  8735  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8736  }
  8737  
  8738  // Do executes the "androidenterprise.products.unapprove" call.
  8739  func (c *ProductsUnapproveCall) Do(opts ...googleapi.CallOption) error {
  8740  	gensupport.SetOptions(c.urlParams_, opts...)
  8741  	res, err := c.doRequest("json")
  8742  	if err != nil {
  8743  		return err
  8744  	}
  8745  	defer googleapi.CloseBody(res)
  8746  	if err := googleapi.CheckResponse(res); err != nil {
  8747  		return gensupport.WrapError(err)
  8748  	}
  8749  	return nil
  8750  }
  8751  
  8752  type ServiceaccountkeysDeleteCall struct {
  8753  	s            *Service
  8754  	enterpriseId string
  8755  	keyId        string
  8756  	urlParams_   gensupport.URLParams
  8757  	ctx_         context.Context
  8758  	header_      http.Header
  8759  }
  8760  
  8761  // Delete: Removes and invalidates the specified credentials for the service
  8762  // account associated with this enterprise. The calling service account must
  8763  // have been retrieved by calling Enterprises.GetServiceAccount and must have
  8764  // been set as the enterprise service account by calling
  8765  // Enterprises.SetAccount.
  8766  //
  8767  // - enterpriseId: The ID of the enterprise.
  8768  // - keyId: The ID of the key.
  8769  func (r *ServiceaccountkeysService) Delete(enterpriseId string, keyId string) *ServiceaccountkeysDeleteCall {
  8770  	c := &ServiceaccountkeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8771  	c.enterpriseId = enterpriseId
  8772  	c.keyId = keyId
  8773  	return c
  8774  }
  8775  
  8776  // Fields allows partial responses to be retrieved. See
  8777  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8778  // details.
  8779  func (c *ServiceaccountkeysDeleteCall) Fields(s ...googleapi.Field) *ServiceaccountkeysDeleteCall {
  8780  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8781  	return c
  8782  }
  8783  
  8784  // Context sets the context to be used in this call's Do method.
  8785  func (c *ServiceaccountkeysDeleteCall) Context(ctx context.Context) *ServiceaccountkeysDeleteCall {
  8786  	c.ctx_ = ctx
  8787  	return c
  8788  }
  8789  
  8790  // Header returns a http.Header that can be modified by the caller to add
  8791  // headers to the request.
  8792  func (c *ServiceaccountkeysDeleteCall) Header() http.Header {
  8793  	if c.header_ == nil {
  8794  		c.header_ = make(http.Header)
  8795  	}
  8796  	return c.header_
  8797  }
  8798  
  8799  func (c *ServiceaccountkeysDeleteCall) doRequest(alt string) (*http.Response, error) {
  8800  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8801  	var body io.Reader = nil
  8802  	c.urlParams_.Set("alt", alt)
  8803  	c.urlParams_.Set("prettyPrint", "false")
  8804  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys/{keyId}")
  8805  	urls += "?" + c.urlParams_.Encode()
  8806  	req, err := http.NewRequest("DELETE", urls, body)
  8807  	if err != nil {
  8808  		return nil, err
  8809  	}
  8810  	req.Header = reqHeaders
  8811  	googleapi.Expand(req.URL, map[string]string{
  8812  		"enterpriseId": c.enterpriseId,
  8813  		"keyId":        c.keyId,
  8814  	})
  8815  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8816  }
  8817  
  8818  // Do executes the "androidenterprise.serviceaccountkeys.delete" call.
  8819  func (c *ServiceaccountkeysDeleteCall) Do(opts ...googleapi.CallOption) error {
  8820  	gensupport.SetOptions(c.urlParams_, opts...)
  8821  	res, err := c.doRequest("json")
  8822  	if err != nil {
  8823  		return err
  8824  	}
  8825  	defer googleapi.CloseBody(res)
  8826  	if err := googleapi.CheckResponse(res); err != nil {
  8827  		return gensupport.WrapError(err)
  8828  	}
  8829  	return nil
  8830  }
  8831  
  8832  type ServiceaccountkeysInsertCall struct {
  8833  	s                 *Service
  8834  	enterpriseId      string
  8835  	serviceaccountkey *ServiceAccountKey
  8836  	urlParams_        gensupport.URLParams
  8837  	ctx_              context.Context
  8838  	header_           http.Header
  8839  }
  8840  
  8841  // Insert: Generates new credentials for the service account associated with
  8842  // this enterprise. The calling service account must have been retrieved by
  8843  // calling Enterprises.GetServiceAccount and must have been set as the
  8844  // enterprise service account by calling Enterprises.SetAccount. Only the type
  8845  // of the key should be populated in the resource to be inserted.
  8846  //
  8847  // - enterpriseId: The ID of the enterprise.
  8848  func (r *ServiceaccountkeysService) Insert(enterpriseId string, serviceaccountkey *ServiceAccountKey) *ServiceaccountkeysInsertCall {
  8849  	c := &ServiceaccountkeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8850  	c.enterpriseId = enterpriseId
  8851  	c.serviceaccountkey = serviceaccountkey
  8852  	return c
  8853  }
  8854  
  8855  // Fields allows partial responses to be retrieved. See
  8856  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8857  // details.
  8858  func (c *ServiceaccountkeysInsertCall) Fields(s ...googleapi.Field) *ServiceaccountkeysInsertCall {
  8859  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8860  	return c
  8861  }
  8862  
  8863  // Context sets the context to be used in this call's Do method.
  8864  func (c *ServiceaccountkeysInsertCall) Context(ctx context.Context) *ServiceaccountkeysInsertCall {
  8865  	c.ctx_ = ctx
  8866  	return c
  8867  }
  8868  
  8869  // Header returns a http.Header that can be modified by the caller to add
  8870  // headers to the request.
  8871  func (c *ServiceaccountkeysInsertCall) Header() http.Header {
  8872  	if c.header_ == nil {
  8873  		c.header_ = make(http.Header)
  8874  	}
  8875  	return c.header_
  8876  }
  8877  
  8878  func (c *ServiceaccountkeysInsertCall) doRequest(alt string) (*http.Response, error) {
  8879  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8880  	var body io.Reader = nil
  8881  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceaccountkey)
  8882  	if err != nil {
  8883  		return nil, err
  8884  	}
  8885  	c.urlParams_.Set("alt", alt)
  8886  	c.urlParams_.Set("prettyPrint", "false")
  8887  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys")
  8888  	urls += "?" + c.urlParams_.Encode()
  8889  	req, err := http.NewRequest("POST", urls, body)
  8890  	if err != nil {
  8891  		return nil, err
  8892  	}
  8893  	req.Header = reqHeaders
  8894  	googleapi.Expand(req.URL, map[string]string{
  8895  		"enterpriseId": c.enterpriseId,
  8896  	})
  8897  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8898  }
  8899  
  8900  // Do executes the "androidenterprise.serviceaccountkeys.insert" call.
  8901  // Any non-2xx status code is an error. Response headers are in either
  8902  // *ServiceAccountKey.ServerResponse.Header or (if a response was returned at
  8903  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8904  // check whether the returned error was because http.StatusNotModified was
  8905  // returned.
  8906  func (c *ServiceaccountkeysInsertCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKey, error) {
  8907  	gensupport.SetOptions(c.urlParams_, opts...)
  8908  	res, err := c.doRequest("json")
  8909  	if res != nil && res.StatusCode == http.StatusNotModified {
  8910  		if res.Body != nil {
  8911  			res.Body.Close()
  8912  		}
  8913  		return nil, gensupport.WrapError(&googleapi.Error{
  8914  			Code:   res.StatusCode,
  8915  			Header: res.Header,
  8916  		})
  8917  	}
  8918  	if err != nil {
  8919  		return nil, err
  8920  	}
  8921  	defer googleapi.CloseBody(res)
  8922  	if err := googleapi.CheckResponse(res); err != nil {
  8923  		return nil, gensupport.WrapError(err)
  8924  	}
  8925  	ret := &ServiceAccountKey{
  8926  		ServerResponse: googleapi.ServerResponse{
  8927  			Header:         res.Header,
  8928  			HTTPStatusCode: res.StatusCode,
  8929  		},
  8930  	}
  8931  	target := &ret
  8932  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8933  		return nil, err
  8934  	}
  8935  	return ret, nil
  8936  }
  8937  
  8938  type ServiceaccountkeysListCall struct {
  8939  	s            *Service
  8940  	enterpriseId string
  8941  	urlParams_   gensupport.URLParams
  8942  	ifNoneMatch_ string
  8943  	ctx_         context.Context
  8944  	header_      http.Header
  8945  }
  8946  
  8947  // List: Lists all active credentials for the service account associated with
  8948  // this enterprise. Only the ID and key type are returned. The calling service
  8949  // account must have been retrieved by calling Enterprises.GetServiceAccount
  8950  // and must have been set as the enterprise service account by calling
  8951  // Enterprises.SetAccount.
  8952  //
  8953  // - enterpriseId: The ID of the enterprise.
  8954  func (r *ServiceaccountkeysService) List(enterpriseId string) *ServiceaccountkeysListCall {
  8955  	c := &ServiceaccountkeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8956  	c.enterpriseId = enterpriseId
  8957  	return c
  8958  }
  8959  
  8960  // Fields allows partial responses to be retrieved. See
  8961  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8962  // details.
  8963  func (c *ServiceaccountkeysListCall) Fields(s ...googleapi.Field) *ServiceaccountkeysListCall {
  8964  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8965  	return c
  8966  }
  8967  
  8968  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8969  // object's ETag matches the given value. This is useful for getting updates
  8970  // only after the object has changed since the last request.
  8971  func (c *ServiceaccountkeysListCall) IfNoneMatch(entityTag string) *ServiceaccountkeysListCall {
  8972  	c.ifNoneMatch_ = entityTag
  8973  	return c
  8974  }
  8975  
  8976  // Context sets the context to be used in this call's Do method.
  8977  func (c *ServiceaccountkeysListCall) Context(ctx context.Context) *ServiceaccountkeysListCall {
  8978  	c.ctx_ = ctx
  8979  	return c
  8980  }
  8981  
  8982  // Header returns a http.Header that can be modified by the caller to add
  8983  // headers to the request.
  8984  func (c *ServiceaccountkeysListCall) Header() http.Header {
  8985  	if c.header_ == nil {
  8986  		c.header_ = make(http.Header)
  8987  	}
  8988  	return c.header_
  8989  }
  8990  
  8991  func (c *ServiceaccountkeysListCall) doRequest(alt string) (*http.Response, error) {
  8992  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8993  	if c.ifNoneMatch_ != "" {
  8994  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8995  	}
  8996  	var body io.Reader = nil
  8997  	c.urlParams_.Set("alt", alt)
  8998  	c.urlParams_.Set("prettyPrint", "false")
  8999  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys")
  9000  	urls += "?" + c.urlParams_.Encode()
  9001  	req, err := http.NewRequest("GET", urls, body)
  9002  	if err != nil {
  9003  		return nil, err
  9004  	}
  9005  	req.Header = reqHeaders
  9006  	googleapi.Expand(req.URL, map[string]string{
  9007  		"enterpriseId": c.enterpriseId,
  9008  	})
  9009  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9010  }
  9011  
  9012  // Do executes the "androidenterprise.serviceaccountkeys.list" call.
  9013  // Any non-2xx status code is an error. Response headers are in either
  9014  // *ServiceAccountKeysListResponse.ServerResponse.Header or (if a response was
  9015  // returned at all) in error.(*googleapi.Error).Header. Use
  9016  // googleapi.IsNotModified to check whether the returned error was because
  9017  // http.StatusNotModified was returned.
  9018  func (c *ServiceaccountkeysListCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKeysListResponse, error) {
  9019  	gensupport.SetOptions(c.urlParams_, opts...)
  9020  	res, err := c.doRequest("json")
  9021  	if res != nil && res.StatusCode == http.StatusNotModified {
  9022  		if res.Body != nil {
  9023  			res.Body.Close()
  9024  		}
  9025  		return nil, gensupport.WrapError(&googleapi.Error{
  9026  			Code:   res.StatusCode,
  9027  			Header: res.Header,
  9028  		})
  9029  	}
  9030  	if err != nil {
  9031  		return nil, err
  9032  	}
  9033  	defer googleapi.CloseBody(res)
  9034  	if err := googleapi.CheckResponse(res); err != nil {
  9035  		return nil, gensupport.WrapError(err)
  9036  	}
  9037  	ret := &ServiceAccountKeysListResponse{
  9038  		ServerResponse: googleapi.ServerResponse{
  9039  			Header:         res.Header,
  9040  			HTTPStatusCode: res.StatusCode,
  9041  		},
  9042  	}
  9043  	target := &ret
  9044  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9045  		return nil, err
  9046  	}
  9047  	return ret, nil
  9048  }
  9049  
  9050  type StorelayoutclustersDeleteCall struct {
  9051  	s            *Service
  9052  	enterpriseId string
  9053  	pageId       string
  9054  	clusterId    string
  9055  	urlParams_   gensupport.URLParams
  9056  	ctx_         context.Context
  9057  	header_      http.Header
  9058  }
  9059  
  9060  // Delete: Deletes a cluster.
  9061  //
  9062  // - clusterId: The ID of the cluster.
  9063  // - enterpriseId: The ID of the enterprise.
  9064  // - pageId: The ID of the page.
  9065  func (r *StorelayoutclustersService) Delete(enterpriseId string, pageId string, clusterId string) *StorelayoutclustersDeleteCall {
  9066  	c := &StorelayoutclustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9067  	c.enterpriseId = enterpriseId
  9068  	c.pageId = pageId
  9069  	c.clusterId = clusterId
  9070  	return c
  9071  }
  9072  
  9073  // Fields allows partial responses to be retrieved. See
  9074  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9075  // details.
  9076  func (c *StorelayoutclustersDeleteCall) Fields(s ...googleapi.Field) *StorelayoutclustersDeleteCall {
  9077  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9078  	return c
  9079  }
  9080  
  9081  // Context sets the context to be used in this call's Do method.
  9082  func (c *StorelayoutclustersDeleteCall) Context(ctx context.Context) *StorelayoutclustersDeleteCall {
  9083  	c.ctx_ = ctx
  9084  	return c
  9085  }
  9086  
  9087  // Header returns a http.Header that can be modified by the caller to add
  9088  // headers to the request.
  9089  func (c *StorelayoutclustersDeleteCall) Header() http.Header {
  9090  	if c.header_ == nil {
  9091  		c.header_ = make(http.Header)
  9092  	}
  9093  	return c.header_
  9094  }
  9095  
  9096  func (c *StorelayoutclustersDeleteCall) doRequest(alt string) (*http.Response, error) {
  9097  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9098  	var body io.Reader = nil
  9099  	c.urlParams_.Set("alt", alt)
  9100  	c.urlParams_.Set("prettyPrint", "false")
  9101  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}")
  9102  	urls += "?" + c.urlParams_.Encode()
  9103  	req, err := http.NewRequest("DELETE", urls, body)
  9104  	if err != nil {
  9105  		return nil, err
  9106  	}
  9107  	req.Header = reqHeaders
  9108  	googleapi.Expand(req.URL, map[string]string{
  9109  		"enterpriseId": c.enterpriseId,
  9110  		"pageId":       c.pageId,
  9111  		"clusterId":    c.clusterId,
  9112  	})
  9113  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9114  }
  9115  
  9116  // Do executes the "androidenterprise.storelayoutclusters.delete" call.
  9117  func (c *StorelayoutclustersDeleteCall) Do(opts ...googleapi.CallOption) error {
  9118  	gensupport.SetOptions(c.urlParams_, opts...)
  9119  	res, err := c.doRequest("json")
  9120  	if err != nil {
  9121  		return err
  9122  	}
  9123  	defer googleapi.CloseBody(res)
  9124  	if err := googleapi.CheckResponse(res); err != nil {
  9125  		return gensupport.WrapError(err)
  9126  	}
  9127  	return nil
  9128  }
  9129  
  9130  type StorelayoutclustersGetCall struct {
  9131  	s            *Service
  9132  	enterpriseId string
  9133  	pageId       string
  9134  	clusterId    string
  9135  	urlParams_   gensupport.URLParams
  9136  	ifNoneMatch_ string
  9137  	ctx_         context.Context
  9138  	header_      http.Header
  9139  }
  9140  
  9141  // Get: Retrieves details of a cluster.
  9142  //
  9143  // - clusterId: The ID of the cluster.
  9144  // - enterpriseId: The ID of the enterprise.
  9145  // - pageId: The ID of the page.
  9146  func (r *StorelayoutclustersService) Get(enterpriseId string, pageId string, clusterId string) *StorelayoutclustersGetCall {
  9147  	c := &StorelayoutclustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9148  	c.enterpriseId = enterpriseId
  9149  	c.pageId = pageId
  9150  	c.clusterId = clusterId
  9151  	return c
  9152  }
  9153  
  9154  // Fields allows partial responses to be retrieved. See
  9155  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9156  // details.
  9157  func (c *StorelayoutclustersGetCall) Fields(s ...googleapi.Field) *StorelayoutclustersGetCall {
  9158  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9159  	return c
  9160  }
  9161  
  9162  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9163  // object's ETag matches the given value. This is useful for getting updates
  9164  // only after the object has changed since the last request.
  9165  func (c *StorelayoutclustersGetCall) IfNoneMatch(entityTag string) *StorelayoutclustersGetCall {
  9166  	c.ifNoneMatch_ = entityTag
  9167  	return c
  9168  }
  9169  
  9170  // Context sets the context to be used in this call's Do method.
  9171  func (c *StorelayoutclustersGetCall) Context(ctx context.Context) *StorelayoutclustersGetCall {
  9172  	c.ctx_ = ctx
  9173  	return c
  9174  }
  9175  
  9176  // Header returns a http.Header that can be modified by the caller to add
  9177  // headers to the request.
  9178  func (c *StorelayoutclustersGetCall) Header() http.Header {
  9179  	if c.header_ == nil {
  9180  		c.header_ = make(http.Header)
  9181  	}
  9182  	return c.header_
  9183  }
  9184  
  9185  func (c *StorelayoutclustersGetCall) doRequest(alt string) (*http.Response, error) {
  9186  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9187  	if c.ifNoneMatch_ != "" {
  9188  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9189  	}
  9190  	var body io.Reader = nil
  9191  	c.urlParams_.Set("alt", alt)
  9192  	c.urlParams_.Set("prettyPrint", "false")
  9193  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}")
  9194  	urls += "?" + c.urlParams_.Encode()
  9195  	req, err := http.NewRequest("GET", urls, body)
  9196  	if err != nil {
  9197  		return nil, err
  9198  	}
  9199  	req.Header = reqHeaders
  9200  	googleapi.Expand(req.URL, map[string]string{
  9201  		"enterpriseId": c.enterpriseId,
  9202  		"pageId":       c.pageId,
  9203  		"clusterId":    c.clusterId,
  9204  	})
  9205  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9206  }
  9207  
  9208  // Do executes the "androidenterprise.storelayoutclusters.get" call.
  9209  // Any non-2xx status code is an error. Response headers are in either
  9210  // *StoreCluster.ServerResponse.Header or (if a response was returned at all)
  9211  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9212  // whether the returned error was because http.StatusNotModified was returned.
  9213  func (c *StorelayoutclustersGetCall) Do(opts ...googleapi.CallOption) (*StoreCluster, error) {
  9214  	gensupport.SetOptions(c.urlParams_, opts...)
  9215  	res, err := c.doRequest("json")
  9216  	if res != nil && res.StatusCode == http.StatusNotModified {
  9217  		if res.Body != nil {
  9218  			res.Body.Close()
  9219  		}
  9220  		return nil, gensupport.WrapError(&googleapi.Error{
  9221  			Code:   res.StatusCode,
  9222  			Header: res.Header,
  9223  		})
  9224  	}
  9225  	if err != nil {
  9226  		return nil, err
  9227  	}
  9228  	defer googleapi.CloseBody(res)
  9229  	if err := googleapi.CheckResponse(res); err != nil {
  9230  		return nil, gensupport.WrapError(err)
  9231  	}
  9232  	ret := &StoreCluster{
  9233  		ServerResponse: googleapi.ServerResponse{
  9234  			Header:         res.Header,
  9235  			HTTPStatusCode: res.StatusCode,
  9236  		},
  9237  	}
  9238  	target := &ret
  9239  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9240  		return nil, err
  9241  	}
  9242  	return ret, nil
  9243  }
  9244  
  9245  type StorelayoutclustersInsertCall struct {
  9246  	s            *Service
  9247  	enterpriseId string
  9248  	pageId       string
  9249  	storecluster *StoreCluster
  9250  	urlParams_   gensupport.URLParams
  9251  	ctx_         context.Context
  9252  	header_      http.Header
  9253  }
  9254  
  9255  // Insert: Inserts a new cluster in a page.
  9256  //
  9257  // - enterpriseId: The ID of the enterprise.
  9258  // - pageId: The ID of the page.
  9259  func (r *StorelayoutclustersService) Insert(enterpriseId string, pageId string, storecluster *StoreCluster) *StorelayoutclustersInsertCall {
  9260  	c := &StorelayoutclustersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9261  	c.enterpriseId = enterpriseId
  9262  	c.pageId = pageId
  9263  	c.storecluster = storecluster
  9264  	return c
  9265  }
  9266  
  9267  // Fields allows partial responses to be retrieved. See
  9268  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9269  // details.
  9270  func (c *StorelayoutclustersInsertCall) Fields(s ...googleapi.Field) *StorelayoutclustersInsertCall {
  9271  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9272  	return c
  9273  }
  9274  
  9275  // Context sets the context to be used in this call's Do method.
  9276  func (c *StorelayoutclustersInsertCall) Context(ctx context.Context) *StorelayoutclustersInsertCall {
  9277  	c.ctx_ = ctx
  9278  	return c
  9279  }
  9280  
  9281  // Header returns a http.Header that can be modified by the caller to add
  9282  // headers to the request.
  9283  func (c *StorelayoutclustersInsertCall) Header() http.Header {
  9284  	if c.header_ == nil {
  9285  		c.header_ = make(http.Header)
  9286  	}
  9287  	return c.header_
  9288  }
  9289  
  9290  func (c *StorelayoutclustersInsertCall) doRequest(alt string) (*http.Response, error) {
  9291  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9292  	var body io.Reader = nil
  9293  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.storecluster)
  9294  	if err != nil {
  9295  		return nil, err
  9296  	}
  9297  	c.urlParams_.Set("alt", alt)
  9298  	c.urlParams_.Set("prettyPrint", "false")
  9299  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters")
  9300  	urls += "?" + c.urlParams_.Encode()
  9301  	req, err := http.NewRequest("POST", urls, body)
  9302  	if err != nil {
  9303  		return nil, err
  9304  	}
  9305  	req.Header = reqHeaders
  9306  	googleapi.Expand(req.URL, map[string]string{
  9307  		"enterpriseId": c.enterpriseId,
  9308  		"pageId":       c.pageId,
  9309  	})
  9310  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9311  }
  9312  
  9313  // Do executes the "androidenterprise.storelayoutclusters.insert" call.
  9314  // Any non-2xx status code is an error. Response headers are in either
  9315  // *StoreCluster.ServerResponse.Header or (if a response was returned at all)
  9316  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9317  // whether the returned error was because http.StatusNotModified was returned.
  9318  func (c *StorelayoutclustersInsertCall) Do(opts ...googleapi.CallOption) (*StoreCluster, error) {
  9319  	gensupport.SetOptions(c.urlParams_, opts...)
  9320  	res, err := c.doRequest("json")
  9321  	if res != nil && res.StatusCode == http.StatusNotModified {
  9322  		if res.Body != nil {
  9323  			res.Body.Close()
  9324  		}
  9325  		return nil, gensupport.WrapError(&googleapi.Error{
  9326  			Code:   res.StatusCode,
  9327  			Header: res.Header,
  9328  		})
  9329  	}
  9330  	if err != nil {
  9331  		return nil, err
  9332  	}
  9333  	defer googleapi.CloseBody(res)
  9334  	if err := googleapi.CheckResponse(res); err != nil {
  9335  		return nil, gensupport.WrapError(err)
  9336  	}
  9337  	ret := &StoreCluster{
  9338  		ServerResponse: googleapi.ServerResponse{
  9339  			Header:         res.Header,
  9340  			HTTPStatusCode: res.StatusCode,
  9341  		},
  9342  	}
  9343  	target := &ret
  9344  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9345  		return nil, err
  9346  	}
  9347  	return ret, nil
  9348  }
  9349  
  9350  type StorelayoutclustersListCall struct {
  9351  	s            *Service
  9352  	enterpriseId string
  9353  	pageId       string
  9354  	urlParams_   gensupport.URLParams
  9355  	ifNoneMatch_ string
  9356  	ctx_         context.Context
  9357  	header_      http.Header
  9358  }
  9359  
  9360  // List: Retrieves the details of all clusters on the specified page.
  9361  //
  9362  // - enterpriseId: The ID of the enterprise.
  9363  // - pageId: The ID of the page.
  9364  func (r *StorelayoutclustersService) List(enterpriseId string, pageId string) *StorelayoutclustersListCall {
  9365  	c := &StorelayoutclustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9366  	c.enterpriseId = enterpriseId
  9367  	c.pageId = pageId
  9368  	return c
  9369  }
  9370  
  9371  // Fields allows partial responses to be retrieved. See
  9372  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9373  // details.
  9374  func (c *StorelayoutclustersListCall) Fields(s ...googleapi.Field) *StorelayoutclustersListCall {
  9375  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9376  	return c
  9377  }
  9378  
  9379  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9380  // object's ETag matches the given value. This is useful for getting updates
  9381  // only after the object has changed since the last request.
  9382  func (c *StorelayoutclustersListCall) IfNoneMatch(entityTag string) *StorelayoutclustersListCall {
  9383  	c.ifNoneMatch_ = entityTag
  9384  	return c
  9385  }
  9386  
  9387  // Context sets the context to be used in this call's Do method.
  9388  func (c *StorelayoutclustersListCall) Context(ctx context.Context) *StorelayoutclustersListCall {
  9389  	c.ctx_ = ctx
  9390  	return c
  9391  }
  9392  
  9393  // Header returns a http.Header that can be modified by the caller to add
  9394  // headers to the request.
  9395  func (c *StorelayoutclustersListCall) Header() http.Header {
  9396  	if c.header_ == nil {
  9397  		c.header_ = make(http.Header)
  9398  	}
  9399  	return c.header_
  9400  }
  9401  
  9402  func (c *StorelayoutclustersListCall) doRequest(alt string) (*http.Response, error) {
  9403  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9404  	if c.ifNoneMatch_ != "" {
  9405  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9406  	}
  9407  	var body io.Reader = nil
  9408  	c.urlParams_.Set("alt", alt)
  9409  	c.urlParams_.Set("prettyPrint", "false")
  9410  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters")
  9411  	urls += "?" + c.urlParams_.Encode()
  9412  	req, err := http.NewRequest("GET", urls, body)
  9413  	if err != nil {
  9414  		return nil, err
  9415  	}
  9416  	req.Header = reqHeaders
  9417  	googleapi.Expand(req.URL, map[string]string{
  9418  		"enterpriseId": c.enterpriseId,
  9419  		"pageId":       c.pageId,
  9420  	})
  9421  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9422  }
  9423  
  9424  // Do executes the "androidenterprise.storelayoutclusters.list" call.
  9425  // Any non-2xx status code is an error. Response headers are in either
  9426  // *StoreLayoutClustersListResponse.ServerResponse.Header or (if a response was
  9427  // returned at all) in error.(*googleapi.Error).Header. Use
  9428  // googleapi.IsNotModified to check whether the returned error was because
  9429  // http.StatusNotModified was returned.
  9430  func (c *StorelayoutclustersListCall) Do(opts ...googleapi.CallOption) (*StoreLayoutClustersListResponse, error) {
  9431  	gensupport.SetOptions(c.urlParams_, opts...)
  9432  	res, err := c.doRequest("json")
  9433  	if res != nil && res.StatusCode == http.StatusNotModified {
  9434  		if res.Body != nil {
  9435  			res.Body.Close()
  9436  		}
  9437  		return nil, gensupport.WrapError(&googleapi.Error{
  9438  			Code:   res.StatusCode,
  9439  			Header: res.Header,
  9440  		})
  9441  	}
  9442  	if err != nil {
  9443  		return nil, err
  9444  	}
  9445  	defer googleapi.CloseBody(res)
  9446  	if err := googleapi.CheckResponse(res); err != nil {
  9447  		return nil, gensupport.WrapError(err)
  9448  	}
  9449  	ret := &StoreLayoutClustersListResponse{
  9450  		ServerResponse: googleapi.ServerResponse{
  9451  			Header:         res.Header,
  9452  			HTTPStatusCode: res.StatusCode,
  9453  		},
  9454  	}
  9455  	target := &ret
  9456  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9457  		return nil, err
  9458  	}
  9459  	return ret, nil
  9460  }
  9461  
  9462  type StorelayoutclustersUpdateCall struct {
  9463  	s            *Service
  9464  	enterpriseId string
  9465  	pageId       string
  9466  	clusterId    string
  9467  	storecluster *StoreCluster
  9468  	urlParams_   gensupport.URLParams
  9469  	ctx_         context.Context
  9470  	header_      http.Header
  9471  }
  9472  
  9473  // Update: Updates a cluster.
  9474  //
  9475  // - clusterId: The ID of the cluster.
  9476  // - enterpriseId: The ID of the enterprise.
  9477  // - pageId: The ID of the page.
  9478  func (r *StorelayoutclustersService) Update(enterpriseId string, pageId string, clusterId string, storecluster *StoreCluster) *StorelayoutclustersUpdateCall {
  9479  	c := &StorelayoutclustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9480  	c.enterpriseId = enterpriseId
  9481  	c.pageId = pageId
  9482  	c.clusterId = clusterId
  9483  	c.storecluster = storecluster
  9484  	return c
  9485  }
  9486  
  9487  // Fields allows partial responses to be retrieved. See
  9488  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9489  // details.
  9490  func (c *StorelayoutclustersUpdateCall) Fields(s ...googleapi.Field) *StorelayoutclustersUpdateCall {
  9491  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9492  	return c
  9493  }
  9494  
  9495  // Context sets the context to be used in this call's Do method.
  9496  func (c *StorelayoutclustersUpdateCall) Context(ctx context.Context) *StorelayoutclustersUpdateCall {
  9497  	c.ctx_ = ctx
  9498  	return c
  9499  }
  9500  
  9501  // Header returns a http.Header that can be modified by the caller to add
  9502  // headers to the request.
  9503  func (c *StorelayoutclustersUpdateCall) Header() http.Header {
  9504  	if c.header_ == nil {
  9505  		c.header_ = make(http.Header)
  9506  	}
  9507  	return c.header_
  9508  }
  9509  
  9510  func (c *StorelayoutclustersUpdateCall) doRequest(alt string) (*http.Response, error) {
  9511  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9512  	var body io.Reader = nil
  9513  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.storecluster)
  9514  	if err != nil {
  9515  		return nil, err
  9516  	}
  9517  	c.urlParams_.Set("alt", alt)
  9518  	c.urlParams_.Set("prettyPrint", "false")
  9519  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}")
  9520  	urls += "?" + c.urlParams_.Encode()
  9521  	req, err := http.NewRequest("PUT", urls, body)
  9522  	if err != nil {
  9523  		return nil, err
  9524  	}
  9525  	req.Header = reqHeaders
  9526  	googleapi.Expand(req.URL, map[string]string{
  9527  		"enterpriseId": c.enterpriseId,
  9528  		"pageId":       c.pageId,
  9529  		"clusterId":    c.clusterId,
  9530  	})
  9531  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9532  }
  9533  
  9534  // Do executes the "androidenterprise.storelayoutclusters.update" call.
  9535  // Any non-2xx status code is an error. Response headers are in either
  9536  // *StoreCluster.ServerResponse.Header or (if a response was returned at all)
  9537  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9538  // whether the returned error was because http.StatusNotModified was returned.
  9539  func (c *StorelayoutclustersUpdateCall) Do(opts ...googleapi.CallOption) (*StoreCluster, error) {
  9540  	gensupport.SetOptions(c.urlParams_, opts...)
  9541  	res, err := c.doRequest("json")
  9542  	if res != nil && res.StatusCode == http.StatusNotModified {
  9543  		if res.Body != nil {
  9544  			res.Body.Close()
  9545  		}
  9546  		return nil, gensupport.WrapError(&googleapi.Error{
  9547  			Code:   res.StatusCode,
  9548  			Header: res.Header,
  9549  		})
  9550  	}
  9551  	if err != nil {
  9552  		return nil, err
  9553  	}
  9554  	defer googleapi.CloseBody(res)
  9555  	if err := googleapi.CheckResponse(res); err != nil {
  9556  		return nil, gensupport.WrapError(err)
  9557  	}
  9558  	ret := &StoreCluster{
  9559  		ServerResponse: googleapi.ServerResponse{
  9560  			Header:         res.Header,
  9561  			HTTPStatusCode: res.StatusCode,
  9562  		},
  9563  	}
  9564  	target := &ret
  9565  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9566  		return nil, err
  9567  	}
  9568  	return ret, nil
  9569  }
  9570  
  9571  type StorelayoutpagesDeleteCall struct {
  9572  	s            *Service
  9573  	enterpriseId string
  9574  	pageId       string
  9575  	urlParams_   gensupport.URLParams
  9576  	ctx_         context.Context
  9577  	header_      http.Header
  9578  }
  9579  
  9580  // Delete: Deletes a store page.
  9581  //
  9582  // - enterpriseId: The ID of the enterprise.
  9583  // - pageId: The ID of the page.
  9584  func (r *StorelayoutpagesService) Delete(enterpriseId string, pageId string) *StorelayoutpagesDeleteCall {
  9585  	c := &StorelayoutpagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9586  	c.enterpriseId = enterpriseId
  9587  	c.pageId = pageId
  9588  	return c
  9589  }
  9590  
  9591  // Fields allows partial responses to be retrieved. See
  9592  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9593  // details.
  9594  func (c *StorelayoutpagesDeleteCall) Fields(s ...googleapi.Field) *StorelayoutpagesDeleteCall {
  9595  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9596  	return c
  9597  }
  9598  
  9599  // Context sets the context to be used in this call's Do method.
  9600  func (c *StorelayoutpagesDeleteCall) Context(ctx context.Context) *StorelayoutpagesDeleteCall {
  9601  	c.ctx_ = ctx
  9602  	return c
  9603  }
  9604  
  9605  // Header returns a http.Header that can be modified by the caller to add
  9606  // headers to the request.
  9607  func (c *StorelayoutpagesDeleteCall) Header() http.Header {
  9608  	if c.header_ == nil {
  9609  		c.header_ = make(http.Header)
  9610  	}
  9611  	return c.header_
  9612  }
  9613  
  9614  func (c *StorelayoutpagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  9615  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9616  	var body io.Reader = nil
  9617  	c.urlParams_.Set("alt", alt)
  9618  	c.urlParams_.Set("prettyPrint", "false")
  9619  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}")
  9620  	urls += "?" + c.urlParams_.Encode()
  9621  	req, err := http.NewRequest("DELETE", urls, body)
  9622  	if err != nil {
  9623  		return nil, err
  9624  	}
  9625  	req.Header = reqHeaders
  9626  	googleapi.Expand(req.URL, map[string]string{
  9627  		"enterpriseId": c.enterpriseId,
  9628  		"pageId":       c.pageId,
  9629  	})
  9630  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9631  }
  9632  
  9633  // Do executes the "androidenterprise.storelayoutpages.delete" call.
  9634  func (c *StorelayoutpagesDeleteCall) Do(opts ...googleapi.CallOption) error {
  9635  	gensupport.SetOptions(c.urlParams_, opts...)
  9636  	res, err := c.doRequest("json")
  9637  	if err != nil {
  9638  		return err
  9639  	}
  9640  	defer googleapi.CloseBody(res)
  9641  	if err := googleapi.CheckResponse(res); err != nil {
  9642  		return gensupport.WrapError(err)
  9643  	}
  9644  	return nil
  9645  }
  9646  
  9647  type StorelayoutpagesGetCall struct {
  9648  	s            *Service
  9649  	enterpriseId string
  9650  	pageId       string
  9651  	urlParams_   gensupport.URLParams
  9652  	ifNoneMatch_ string
  9653  	ctx_         context.Context
  9654  	header_      http.Header
  9655  }
  9656  
  9657  // Get: Retrieves details of a store page.
  9658  //
  9659  // - enterpriseId: The ID of the enterprise.
  9660  // - pageId: The ID of the page.
  9661  func (r *StorelayoutpagesService) Get(enterpriseId string, pageId string) *StorelayoutpagesGetCall {
  9662  	c := &StorelayoutpagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9663  	c.enterpriseId = enterpriseId
  9664  	c.pageId = pageId
  9665  	return c
  9666  }
  9667  
  9668  // Fields allows partial responses to be retrieved. See
  9669  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9670  // details.
  9671  func (c *StorelayoutpagesGetCall) Fields(s ...googleapi.Field) *StorelayoutpagesGetCall {
  9672  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9673  	return c
  9674  }
  9675  
  9676  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9677  // object's ETag matches the given value. This is useful for getting updates
  9678  // only after the object has changed since the last request.
  9679  func (c *StorelayoutpagesGetCall) IfNoneMatch(entityTag string) *StorelayoutpagesGetCall {
  9680  	c.ifNoneMatch_ = entityTag
  9681  	return c
  9682  }
  9683  
  9684  // Context sets the context to be used in this call's Do method.
  9685  func (c *StorelayoutpagesGetCall) Context(ctx context.Context) *StorelayoutpagesGetCall {
  9686  	c.ctx_ = ctx
  9687  	return c
  9688  }
  9689  
  9690  // Header returns a http.Header that can be modified by the caller to add
  9691  // headers to the request.
  9692  func (c *StorelayoutpagesGetCall) Header() http.Header {
  9693  	if c.header_ == nil {
  9694  		c.header_ = make(http.Header)
  9695  	}
  9696  	return c.header_
  9697  }
  9698  
  9699  func (c *StorelayoutpagesGetCall) doRequest(alt string) (*http.Response, error) {
  9700  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9701  	if c.ifNoneMatch_ != "" {
  9702  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9703  	}
  9704  	var body io.Reader = nil
  9705  	c.urlParams_.Set("alt", alt)
  9706  	c.urlParams_.Set("prettyPrint", "false")
  9707  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}")
  9708  	urls += "?" + c.urlParams_.Encode()
  9709  	req, err := http.NewRequest("GET", urls, body)
  9710  	if err != nil {
  9711  		return nil, err
  9712  	}
  9713  	req.Header = reqHeaders
  9714  	googleapi.Expand(req.URL, map[string]string{
  9715  		"enterpriseId": c.enterpriseId,
  9716  		"pageId":       c.pageId,
  9717  	})
  9718  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9719  }
  9720  
  9721  // Do executes the "androidenterprise.storelayoutpages.get" call.
  9722  // Any non-2xx status code is an error. Response headers are in either
  9723  // *StorePage.ServerResponse.Header or (if a response was returned at all) in
  9724  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9725  // whether the returned error was because http.StatusNotModified was returned.
  9726  func (c *StorelayoutpagesGetCall) Do(opts ...googleapi.CallOption) (*StorePage, error) {
  9727  	gensupport.SetOptions(c.urlParams_, opts...)
  9728  	res, err := c.doRequest("json")
  9729  	if res != nil && res.StatusCode == http.StatusNotModified {
  9730  		if res.Body != nil {
  9731  			res.Body.Close()
  9732  		}
  9733  		return nil, gensupport.WrapError(&googleapi.Error{
  9734  			Code:   res.StatusCode,
  9735  			Header: res.Header,
  9736  		})
  9737  	}
  9738  	if err != nil {
  9739  		return nil, err
  9740  	}
  9741  	defer googleapi.CloseBody(res)
  9742  	if err := googleapi.CheckResponse(res); err != nil {
  9743  		return nil, gensupport.WrapError(err)
  9744  	}
  9745  	ret := &StorePage{
  9746  		ServerResponse: googleapi.ServerResponse{
  9747  			Header:         res.Header,
  9748  			HTTPStatusCode: res.StatusCode,
  9749  		},
  9750  	}
  9751  	target := &ret
  9752  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9753  		return nil, err
  9754  	}
  9755  	return ret, nil
  9756  }
  9757  
  9758  type StorelayoutpagesInsertCall struct {
  9759  	s            *Service
  9760  	enterpriseId string
  9761  	storepage    *StorePage
  9762  	urlParams_   gensupport.URLParams
  9763  	ctx_         context.Context
  9764  	header_      http.Header
  9765  }
  9766  
  9767  // Insert: Inserts a new store page.
  9768  //
  9769  // - enterpriseId: The ID of the enterprise.
  9770  func (r *StorelayoutpagesService) Insert(enterpriseId string, storepage *StorePage) *StorelayoutpagesInsertCall {
  9771  	c := &StorelayoutpagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9772  	c.enterpriseId = enterpriseId
  9773  	c.storepage = storepage
  9774  	return c
  9775  }
  9776  
  9777  // Fields allows partial responses to be retrieved. See
  9778  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9779  // details.
  9780  func (c *StorelayoutpagesInsertCall) Fields(s ...googleapi.Field) *StorelayoutpagesInsertCall {
  9781  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9782  	return c
  9783  }
  9784  
  9785  // Context sets the context to be used in this call's Do method.
  9786  func (c *StorelayoutpagesInsertCall) Context(ctx context.Context) *StorelayoutpagesInsertCall {
  9787  	c.ctx_ = ctx
  9788  	return c
  9789  }
  9790  
  9791  // Header returns a http.Header that can be modified by the caller to add
  9792  // headers to the request.
  9793  func (c *StorelayoutpagesInsertCall) Header() http.Header {
  9794  	if c.header_ == nil {
  9795  		c.header_ = make(http.Header)
  9796  	}
  9797  	return c.header_
  9798  }
  9799  
  9800  func (c *StorelayoutpagesInsertCall) doRequest(alt string) (*http.Response, error) {
  9801  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9802  	var body io.Reader = nil
  9803  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.storepage)
  9804  	if err != nil {
  9805  		return nil, err
  9806  	}
  9807  	c.urlParams_.Set("alt", alt)
  9808  	c.urlParams_.Set("prettyPrint", "false")
  9809  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages")
  9810  	urls += "?" + c.urlParams_.Encode()
  9811  	req, err := http.NewRequest("POST", urls, body)
  9812  	if err != nil {
  9813  		return nil, err
  9814  	}
  9815  	req.Header = reqHeaders
  9816  	googleapi.Expand(req.URL, map[string]string{
  9817  		"enterpriseId": c.enterpriseId,
  9818  	})
  9819  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9820  }
  9821  
  9822  // Do executes the "androidenterprise.storelayoutpages.insert" call.
  9823  // Any non-2xx status code is an error. Response headers are in either
  9824  // *StorePage.ServerResponse.Header or (if a response was returned at all) in
  9825  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9826  // whether the returned error was because http.StatusNotModified was returned.
  9827  func (c *StorelayoutpagesInsertCall) Do(opts ...googleapi.CallOption) (*StorePage, error) {
  9828  	gensupport.SetOptions(c.urlParams_, opts...)
  9829  	res, err := c.doRequest("json")
  9830  	if res != nil && res.StatusCode == http.StatusNotModified {
  9831  		if res.Body != nil {
  9832  			res.Body.Close()
  9833  		}
  9834  		return nil, gensupport.WrapError(&googleapi.Error{
  9835  			Code:   res.StatusCode,
  9836  			Header: res.Header,
  9837  		})
  9838  	}
  9839  	if err != nil {
  9840  		return nil, err
  9841  	}
  9842  	defer googleapi.CloseBody(res)
  9843  	if err := googleapi.CheckResponse(res); err != nil {
  9844  		return nil, gensupport.WrapError(err)
  9845  	}
  9846  	ret := &StorePage{
  9847  		ServerResponse: googleapi.ServerResponse{
  9848  			Header:         res.Header,
  9849  			HTTPStatusCode: res.StatusCode,
  9850  		},
  9851  	}
  9852  	target := &ret
  9853  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9854  		return nil, err
  9855  	}
  9856  	return ret, nil
  9857  }
  9858  
  9859  type StorelayoutpagesListCall struct {
  9860  	s            *Service
  9861  	enterpriseId string
  9862  	urlParams_   gensupport.URLParams
  9863  	ifNoneMatch_ string
  9864  	ctx_         context.Context
  9865  	header_      http.Header
  9866  }
  9867  
  9868  // List: Retrieves the details of all pages in the store.
  9869  //
  9870  // - enterpriseId: The ID of the enterprise.
  9871  func (r *StorelayoutpagesService) List(enterpriseId string) *StorelayoutpagesListCall {
  9872  	c := &StorelayoutpagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9873  	c.enterpriseId = enterpriseId
  9874  	return c
  9875  }
  9876  
  9877  // Fields allows partial responses to be retrieved. See
  9878  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9879  // details.
  9880  func (c *StorelayoutpagesListCall) Fields(s ...googleapi.Field) *StorelayoutpagesListCall {
  9881  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9882  	return c
  9883  }
  9884  
  9885  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9886  // object's ETag matches the given value. This is useful for getting updates
  9887  // only after the object has changed since the last request.
  9888  func (c *StorelayoutpagesListCall) IfNoneMatch(entityTag string) *StorelayoutpagesListCall {
  9889  	c.ifNoneMatch_ = entityTag
  9890  	return c
  9891  }
  9892  
  9893  // Context sets the context to be used in this call's Do method.
  9894  func (c *StorelayoutpagesListCall) Context(ctx context.Context) *StorelayoutpagesListCall {
  9895  	c.ctx_ = ctx
  9896  	return c
  9897  }
  9898  
  9899  // Header returns a http.Header that can be modified by the caller to add
  9900  // headers to the request.
  9901  func (c *StorelayoutpagesListCall) Header() http.Header {
  9902  	if c.header_ == nil {
  9903  		c.header_ = make(http.Header)
  9904  	}
  9905  	return c.header_
  9906  }
  9907  
  9908  func (c *StorelayoutpagesListCall) doRequest(alt string) (*http.Response, error) {
  9909  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9910  	if c.ifNoneMatch_ != "" {
  9911  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9912  	}
  9913  	var body io.Reader = nil
  9914  	c.urlParams_.Set("alt", alt)
  9915  	c.urlParams_.Set("prettyPrint", "false")
  9916  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages")
  9917  	urls += "?" + c.urlParams_.Encode()
  9918  	req, err := http.NewRequest("GET", urls, body)
  9919  	if err != nil {
  9920  		return nil, err
  9921  	}
  9922  	req.Header = reqHeaders
  9923  	googleapi.Expand(req.URL, map[string]string{
  9924  		"enterpriseId": c.enterpriseId,
  9925  	})
  9926  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9927  }
  9928  
  9929  // Do executes the "androidenterprise.storelayoutpages.list" call.
  9930  // Any non-2xx status code is an error. Response headers are in either
  9931  // *StoreLayoutPagesListResponse.ServerResponse.Header or (if a response was
  9932  // returned at all) in error.(*googleapi.Error).Header. Use
  9933  // googleapi.IsNotModified to check whether the returned error was because
  9934  // http.StatusNotModified was returned.
  9935  func (c *StorelayoutpagesListCall) Do(opts ...googleapi.CallOption) (*StoreLayoutPagesListResponse, error) {
  9936  	gensupport.SetOptions(c.urlParams_, opts...)
  9937  	res, err := c.doRequest("json")
  9938  	if res != nil && res.StatusCode == http.StatusNotModified {
  9939  		if res.Body != nil {
  9940  			res.Body.Close()
  9941  		}
  9942  		return nil, gensupport.WrapError(&googleapi.Error{
  9943  			Code:   res.StatusCode,
  9944  			Header: res.Header,
  9945  		})
  9946  	}
  9947  	if err != nil {
  9948  		return nil, err
  9949  	}
  9950  	defer googleapi.CloseBody(res)
  9951  	if err := googleapi.CheckResponse(res); err != nil {
  9952  		return nil, gensupport.WrapError(err)
  9953  	}
  9954  	ret := &StoreLayoutPagesListResponse{
  9955  		ServerResponse: googleapi.ServerResponse{
  9956  			Header:         res.Header,
  9957  			HTTPStatusCode: res.StatusCode,
  9958  		},
  9959  	}
  9960  	target := &ret
  9961  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9962  		return nil, err
  9963  	}
  9964  	return ret, nil
  9965  }
  9966  
  9967  type StorelayoutpagesUpdateCall struct {
  9968  	s            *Service
  9969  	enterpriseId string
  9970  	pageId       string
  9971  	storepage    *StorePage
  9972  	urlParams_   gensupport.URLParams
  9973  	ctx_         context.Context
  9974  	header_      http.Header
  9975  }
  9976  
  9977  // Update: Updates the content of a store page.
  9978  //
  9979  // - enterpriseId: The ID of the enterprise.
  9980  // - pageId: The ID of the page.
  9981  func (r *StorelayoutpagesService) Update(enterpriseId string, pageId string, storepage *StorePage) *StorelayoutpagesUpdateCall {
  9982  	c := &StorelayoutpagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9983  	c.enterpriseId = enterpriseId
  9984  	c.pageId = pageId
  9985  	c.storepage = storepage
  9986  	return c
  9987  }
  9988  
  9989  // Fields allows partial responses to be retrieved. See
  9990  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9991  // details.
  9992  func (c *StorelayoutpagesUpdateCall) Fields(s ...googleapi.Field) *StorelayoutpagesUpdateCall {
  9993  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9994  	return c
  9995  }
  9996  
  9997  // Context sets the context to be used in this call's Do method.
  9998  func (c *StorelayoutpagesUpdateCall) Context(ctx context.Context) *StorelayoutpagesUpdateCall {
  9999  	c.ctx_ = ctx
 10000  	return c
 10001  }
 10002  
 10003  // Header returns a http.Header that can be modified by the caller to add
 10004  // headers to the request.
 10005  func (c *StorelayoutpagesUpdateCall) Header() http.Header {
 10006  	if c.header_ == nil {
 10007  		c.header_ = make(http.Header)
 10008  	}
 10009  	return c.header_
 10010  }
 10011  
 10012  func (c *StorelayoutpagesUpdateCall) doRequest(alt string) (*http.Response, error) {
 10013  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10014  	var body io.Reader = nil
 10015  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.storepage)
 10016  	if err != nil {
 10017  		return nil, err
 10018  	}
 10019  	c.urlParams_.Set("alt", alt)
 10020  	c.urlParams_.Set("prettyPrint", "false")
 10021  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}")
 10022  	urls += "?" + c.urlParams_.Encode()
 10023  	req, err := http.NewRequest("PUT", urls, body)
 10024  	if err != nil {
 10025  		return nil, err
 10026  	}
 10027  	req.Header = reqHeaders
 10028  	googleapi.Expand(req.URL, map[string]string{
 10029  		"enterpriseId": c.enterpriseId,
 10030  		"pageId":       c.pageId,
 10031  	})
 10032  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10033  }
 10034  
 10035  // Do executes the "androidenterprise.storelayoutpages.update" call.
 10036  // Any non-2xx status code is an error. Response headers are in either
 10037  // *StorePage.ServerResponse.Header or (if a response was returned at all) in
 10038  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10039  // whether the returned error was because http.StatusNotModified was returned.
 10040  func (c *StorelayoutpagesUpdateCall) Do(opts ...googleapi.CallOption) (*StorePage, error) {
 10041  	gensupport.SetOptions(c.urlParams_, opts...)
 10042  	res, err := c.doRequest("json")
 10043  	if res != nil && res.StatusCode == http.StatusNotModified {
 10044  		if res.Body != nil {
 10045  			res.Body.Close()
 10046  		}
 10047  		return nil, gensupport.WrapError(&googleapi.Error{
 10048  			Code:   res.StatusCode,
 10049  			Header: res.Header,
 10050  		})
 10051  	}
 10052  	if err != nil {
 10053  		return nil, err
 10054  	}
 10055  	defer googleapi.CloseBody(res)
 10056  	if err := googleapi.CheckResponse(res); err != nil {
 10057  		return nil, gensupport.WrapError(err)
 10058  	}
 10059  	ret := &StorePage{
 10060  		ServerResponse: googleapi.ServerResponse{
 10061  			Header:         res.Header,
 10062  			HTTPStatusCode: res.StatusCode,
 10063  		},
 10064  	}
 10065  	target := &ret
 10066  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10067  		return nil, err
 10068  	}
 10069  	return ret, nil
 10070  }
 10071  
 10072  type UsersDeleteCall struct {
 10073  	s            *Service
 10074  	enterpriseId string
 10075  	userId       string
 10076  	urlParams_   gensupport.URLParams
 10077  	ctx_         context.Context
 10078  	header_      http.Header
 10079  }
 10080  
 10081  // Delete: Deleted an EMM-managed user.
 10082  //
 10083  // - enterpriseId: The ID of the enterprise.
 10084  // - userId: The ID of the user.
 10085  func (r *UsersService) Delete(enterpriseId string, userId string) *UsersDeleteCall {
 10086  	c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10087  	c.enterpriseId = enterpriseId
 10088  	c.userId = userId
 10089  	return c
 10090  }
 10091  
 10092  // Fields allows partial responses to be retrieved. See
 10093  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10094  // details.
 10095  func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
 10096  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10097  	return c
 10098  }
 10099  
 10100  // Context sets the context to be used in this call's Do method.
 10101  func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
 10102  	c.ctx_ = ctx
 10103  	return c
 10104  }
 10105  
 10106  // Header returns a http.Header that can be modified by the caller to add
 10107  // headers to the request.
 10108  func (c *UsersDeleteCall) Header() http.Header {
 10109  	if c.header_ == nil {
 10110  		c.header_ = make(http.Header)
 10111  	}
 10112  	return c.header_
 10113  }
 10114  
 10115  func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
 10116  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10117  	var body io.Reader = nil
 10118  	c.urlParams_.Set("alt", alt)
 10119  	c.urlParams_.Set("prettyPrint", "false")
 10120  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}")
 10121  	urls += "?" + c.urlParams_.Encode()
 10122  	req, err := http.NewRequest("DELETE", urls, body)
 10123  	if err != nil {
 10124  		return nil, err
 10125  	}
 10126  	req.Header = reqHeaders
 10127  	googleapi.Expand(req.URL, map[string]string{
 10128  		"enterpriseId": c.enterpriseId,
 10129  		"userId":       c.userId,
 10130  	})
 10131  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10132  }
 10133  
 10134  // Do executes the "androidenterprise.users.delete" call.
 10135  func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) error {
 10136  	gensupport.SetOptions(c.urlParams_, opts...)
 10137  	res, err := c.doRequest("json")
 10138  	if err != nil {
 10139  		return err
 10140  	}
 10141  	defer googleapi.CloseBody(res)
 10142  	if err := googleapi.CheckResponse(res); err != nil {
 10143  		return gensupport.WrapError(err)
 10144  	}
 10145  	return nil
 10146  }
 10147  
 10148  type UsersGenerateAuthenticationTokenCall struct {
 10149  	s            *Service
 10150  	enterpriseId string
 10151  	userId       string
 10152  	urlParams_   gensupport.URLParams
 10153  	ctx_         context.Context
 10154  	header_      http.Header
 10155  }
 10156  
 10157  // GenerateAuthenticationToken: Generates an authentication token which the
 10158  // device policy client can use to provision the given EMM-managed user account
 10159  // on a device. The generated token is single-use and expires after a few
 10160  // minutes. You can provision a maximum of 10 devices per user. This call only
 10161  // works with EMM-managed accounts.
 10162  //
 10163  // - enterpriseId: The ID of the enterprise.
 10164  // - userId: The ID of the user.
 10165  func (r *UsersService) GenerateAuthenticationToken(enterpriseId string, userId string) *UsersGenerateAuthenticationTokenCall {
 10166  	c := &UsersGenerateAuthenticationTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10167  	c.enterpriseId = enterpriseId
 10168  	c.userId = userId
 10169  	return c
 10170  }
 10171  
 10172  // Fields allows partial responses to be retrieved. See
 10173  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10174  // details.
 10175  func (c *UsersGenerateAuthenticationTokenCall) Fields(s ...googleapi.Field) *UsersGenerateAuthenticationTokenCall {
 10176  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10177  	return c
 10178  }
 10179  
 10180  // Context sets the context to be used in this call's Do method.
 10181  func (c *UsersGenerateAuthenticationTokenCall) Context(ctx context.Context) *UsersGenerateAuthenticationTokenCall {
 10182  	c.ctx_ = ctx
 10183  	return c
 10184  }
 10185  
 10186  // Header returns a http.Header that can be modified by the caller to add
 10187  // headers to the request.
 10188  func (c *UsersGenerateAuthenticationTokenCall) Header() http.Header {
 10189  	if c.header_ == nil {
 10190  		c.header_ = make(http.Header)
 10191  	}
 10192  	return c.header_
 10193  }
 10194  
 10195  func (c *UsersGenerateAuthenticationTokenCall) doRequest(alt string) (*http.Response, error) {
 10196  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10197  	var body io.Reader = nil
 10198  	c.urlParams_.Set("alt", alt)
 10199  	c.urlParams_.Set("prettyPrint", "false")
 10200  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/authenticationToken")
 10201  	urls += "?" + c.urlParams_.Encode()
 10202  	req, err := http.NewRequest("POST", urls, body)
 10203  	if err != nil {
 10204  		return nil, err
 10205  	}
 10206  	req.Header = reqHeaders
 10207  	googleapi.Expand(req.URL, map[string]string{
 10208  		"enterpriseId": c.enterpriseId,
 10209  		"userId":       c.userId,
 10210  	})
 10211  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10212  }
 10213  
 10214  // Do executes the "androidenterprise.users.generateAuthenticationToken" call.
 10215  // Any non-2xx status code is an error. Response headers are in either
 10216  // *AuthenticationToken.ServerResponse.Header or (if a response was returned at
 10217  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10218  // check whether the returned error was because http.StatusNotModified was
 10219  // returned.
 10220  func (c *UsersGenerateAuthenticationTokenCall) Do(opts ...googleapi.CallOption) (*AuthenticationToken, error) {
 10221  	gensupport.SetOptions(c.urlParams_, opts...)
 10222  	res, err := c.doRequest("json")
 10223  	if res != nil && res.StatusCode == http.StatusNotModified {
 10224  		if res.Body != nil {
 10225  			res.Body.Close()
 10226  		}
 10227  		return nil, gensupport.WrapError(&googleapi.Error{
 10228  			Code:   res.StatusCode,
 10229  			Header: res.Header,
 10230  		})
 10231  	}
 10232  	if err != nil {
 10233  		return nil, err
 10234  	}
 10235  	defer googleapi.CloseBody(res)
 10236  	if err := googleapi.CheckResponse(res); err != nil {
 10237  		return nil, gensupport.WrapError(err)
 10238  	}
 10239  	ret := &AuthenticationToken{
 10240  		ServerResponse: googleapi.ServerResponse{
 10241  			Header:         res.Header,
 10242  			HTTPStatusCode: res.StatusCode,
 10243  		},
 10244  	}
 10245  	target := &ret
 10246  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10247  		return nil, err
 10248  	}
 10249  	return ret, nil
 10250  }
 10251  
 10252  type UsersGetCall struct {
 10253  	s            *Service
 10254  	enterpriseId string
 10255  	userId       string
 10256  	urlParams_   gensupport.URLParams
 10257  	ifNoneMatch_ string
 10258  	ctx_         context.Context
 10259  	header_      http.Header
 10260  }
 10261  
 10262  // Get: Retrieves a user's details.
 10263  //
 10264  // - enterpriseId: The ID of the enterprise.
 10265  // - userId: The ID of the user.
 10266  func (r *UsersService) Get(enterpriseId string, userId string) *UsersGetCall {
 10267  	c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10268  	c.enterpriseId = enterpriseId
 10269  	c.userId = userId
 10270  	return c
 10271  }
 10272  
 10273  // Fields allows partial responses to be retrieved. See
 10274  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10275  // details.
 10276  func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
 10277  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10278  	return c
 10279  }
 10280  
 10281  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10282  // object's ETag matches the given value. This is useful for getting updates
 10283  // only after the object has changed since the last request.
 10284  func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
 10285  	c.ifNoneMatch_ = entityTag
 10286  	return c
 10287  }
 10288  
 10289  // Context sets the context to be used in this call's Do method.
 10290  func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
 10291  	c.ctx_ = ctx
 10292  	return c
 10293  }
 10294  
 10295  // Header returns a http.Header that can be modified by the caller to add
 10296  // headers to the request.
 10297  func (c *UsersGetCall) Header() http.Header {
 10298  	if c.header_ == nil {
 10299  		c.header_ = make(http.Header)
 10300  	}
 10301  	return c.header_
 10302  }
 10303  
 10304  func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
 10305  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10306  	if c.ifNoneMatch_ != "" {
 10307  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10308  	}
 10309  	var body io.Reader = nil
 10310  	c.urlParams_.Set("alt", alt)
 10311  	c.urlParams_.Set("prettyPrint", "false")
 10312  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}")
 10313  	urls += "?" + c.urlParams_.Encode()
 10314  	req, err := http.NewRequest("GET", urls, body)
 10315  	if err != nil {
 10316  		return nil, err
 10317  	}
 10318  	req.Header = reqHeaders
 10319  	googleapi.Expand(req.URL, map[string]string{
 10320  		"enterpriseId": c.enterpriseId,
 10321  		"userId":       c.userId,
 10322  	})
 10323  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10324  }
 10325  
 10326  // Do executes the "androidenterprise.users.get" call.
 10327  // Any non-2xx status code is an error. Response headers are in either
 10328  // *User.ServerResponse.Header or (if a response was returned at all) in
 10329  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10330  // whether the returned error was because http.StatusNotModified was returned.
 10331  func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
 10332  	gensupport.SetOptions(c.urlParams_, opts...)
 10333  	res, err := c.doRequest("json")
 10334  	if res != nil && res.StatusCode == http.StatusNotModified {
 10335  		if res.Body != nil {
 10336  			res.Body.Close()
 10337  		}
 10338  		return nil, gensupport.WrapError(&googleapi.Error{
 10339  			Code:   res.StatusCode,
 10340  			Header: res.Header,
 10341  		})
 10342  	}
 10343  	if err != nil {
 10344  		return nil, err
 10345  	}
 10346  	defer googleapi.CloseBody(res)
 10347  	if err := googleapi.CheckResponse(res); err != nil {
 10348  		return nil, gensupport.WrapError(err)
 10349  	}
 10350  	ret := &User{
 10351  		ServerResponse: googleapi.ServerResponse{
 10352  			Header:         res.Header,
 10353  			HTTPStatusCode: res.StatusCode,
 10354  		},
 10355  	}
 10356  	target := &ret
 10357  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10358  		return nil, err
 10359  	}
 10360  	return ret, nil
 10361  }
 10362  
 10363  type UsersGetAvailableProductSetCall struct {
 10364  	s            *Service
 10365  	enterpriseId string
 10366  	userId       string
 10367  	urlParams_   gensupport.URLParams
 10368  	ifNoneMatch_ string
 10369  	ctx_         context.Context
 10370  	header_      http.Header
 10371  }
 10372  
 10373  // GetAvailableProductSet: Retrieves the set of products a user is entitled to
 10374  // access. **Note:** This item has been deprecated. New integrations cannot use
 10375  // this method and can refer to our new recommendations.
 10376  //
 10377  // - enterpriseId: The ID of the enterprise.
 10378  // - userId: The ID of the user.
 10379  func (r *UsersService) GetAvailableProductSet(enterpriseId string, userId string) *UsersGetAvailableProductSetCall {
 10380  	c := &UsersGetAvailableProductSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10381  	c.enterpriseId = enterpriseId
 10382  	c.userId = userId
 10383  	return c
 10384  }
 10385  
 10386  // Fields allows partial responses to be retrieved. See
 10387  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10388  // details.
 10389  func (c *UsersGetAvailableProductSetCall) Fields(s ...googleapi.Field) *UsersGetAvailableProductSetCall {
 10390  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10391  	return c
 10392  }
 10393  
 10394  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10395  // object's ETag matches the given value. This is useful for getting updates
 10396  // only after the object has changed since the last request.
 10397  func (c *UsersGetAvailableProductSetCall) IfNoneMatch(entityTag string) *UsersGetAvailableProductSetCall {
 10398  	c.ifNoneMatch_ = entityTag
 10399  	return c
 10400  }
 10401  
 10402  // Context sets the context to be used in this call's Do method.
 10403  func (c *UsersGetAvailableProductSetCall) Context(ctx context.Context) *UsersGetAvailableProductSetCall {
 10404  	c.ctx_ = ctx
 10405  	return c
 10406  }
 10407  
 10408  // Header returns a http.Header that can be modified by the caller to add
 10409  // headers to the request.
 10410  func (c *UsersGetAvailableProductSetCall) Header() http.Header {
 10411  	if c.header_ == nil {
 10412  		c.header_ = make(http.Header)
 10413  	}
 10414  	return c.header_
 10415  }
 10416  
 10417  func (c *UsersGetAvailableProductSetCall) doRequest(alt string) (*http.Response, error) {
 10418  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10419  	if c.ifNoneMatch_ != "" {
 10420  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10421  	}
 10422  	var body io.Reader = nil
 10423  	c.urlParams_.Set("alt", alt)
 10424  	c.urlParams_.Set("prettyPrint", "false")
 10425  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet")
 10426  	urls += "?" + c.urlParams_.Encode()
 10427  	req, err := http.NewRequest("GET", urls, body)
 10428  	if err != nil {
 10429  		return nil, err
 10430  	}
 10431  	req.Header = reqHeaders
 10432  	googleapi.Expand(req.URL, map[string]string{
 10433  		"enterpriseId": c.enterpriseId,
 10434  		"userId":       c.userId,
 10435  	})
 10436  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10437  }
 10438  
 10439  // Do executes the "androidenterprise.users.getAvailableProductSet" call.
 10440  // Any non-2xx status code is an error. Response headers are in either
 10441  // *ProductSet.ServerResponse.Header or (if a response was returned at all) in
 10442  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10443  // whether the returned error was because http.StatusNotModified was returned.
 10444  func (c *UsersGetAvailableProductSetCall) Do(opts ...googleapi.CallOption) (*ProductSet, error) {
 10445  	gensupport.SetOptions(c.urlParams_, opts...)
 10446  	res, err := c.doRequest("json")
 10447  	if res != nil && res.StatusCode == http.StatusNotModified {
 10448  		if res.Body != nil {
 10449  			res.Body.Close()
 10450  		}
 10451  		return nil, gensupport.WrapError(&googleapi.Error{
 10452  			Code:   res.StatusCode,
 10453  			Header: res.Header,
 10454  		})
 10455  	}
 10456  	if err != nil {
 10457  		return nil, err
 10458  	}
 10459  	defer googleapi.CloseBody(res)
 10460  	if err := googleapi.CheckResponse(res); err != nil {
 10461  		return nil, gensupport.WrapError(err)
 10462  	}
 10463  	ret := &ProductSet{
 10464  		ServerResponse: googleapi.ServerResponse{
 10465  			Header:         res.Header,
 10466  			HTTPStatusCode: res.StatusCode,
 10467  		},
 10468  	}
 10469  	target := &ret
 10470  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10471  		return nil, err
 10472  	}
 10473  	return ret, nil
 10474  }
 10475  
 10476  type UsersInsertCall struct {
 10477  	s            *Service
 10478  	enterpriseId string
 10479  	user         *User
 10480  	urlParams_   gensupport.URLParams
 10481  	ctx_         context.Context
 10482  	header_      http.Header
 10483  }
 10484  
 10485  // Insert: Creates a new EMM-managed user. The Users resource passed in the
 10486  // body of the request should include an accountIdentifier and an accountType.
 10487  // If a corresponding user already exists with the same account identifier, the
 10488  // user will be updated with the resource. In this case only the displayName
 10489  // field can be changed.
 10490  //
 10491  // - enterpriseId: The ID of the enterprise.
 10492  func (r *UsersService) Insert(enterpriseId string, user *User) *UsersInsertCall {
 10493  	c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10494  	c.enterpriseId = enterpriseId
 10495  	c.user = user
 10496  	return c
 10497  }
 10498  
 10499  // Fields allows partial responses to be retrieved. See
 10500  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10501  // details.
 10502  func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
 10503  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10504  	return c
 10505  }
 10506  
 10507  // Context sets the context to be used in this call's Do method.
 10508  func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
 10509  	c.ctx_ = ctx
 10510  	return c
 10511  }
 10512  
 10513  // Header returns a http.Header that can be modified by the caller to add
 10514  // headers to the request.
 10515  func (c *UsersInsertCall) Header() http.Header {
 10516  	if c.header_ == nil {
 10517  		c.header_ = make(http.Header)
 10518  	}
 10519  	return c.header_
 10520  }
 10521  
 10522  func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
 10523  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10524  	var body io.Reader = nil
 10525  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
 10526  	if err != nil {
 10527  		return nil, err
 10528  	}
 10529  	c.urlParams_.Set("alt", alt)
 10530  	c.urlParams_.Set("prettyPrint", "false")
 10531  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users")
 10532  	urls += "?" + c.urlParams_.Encode()
 10533  	req, err := http.NewRequest("POST", urls, body)
 10534  	if err != nil {
 10535  		return nil, err
 10536  	}
 10537  	req.Header = reqHeaders
 10538  	googleapi.Expand(req.URL, map[string]string{
 10539  		"enterpriseId": c.enterpriseId,
 10540  	})
 10541  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10542  }
 10543  
 10544  // Do executes the "androidenterprise.users.insert" call.
 10545  // Any non-2xx status code is an error. Response headers are in either
 10546  // *User.ServerResponse.Header or (if a response was returned at all) in
 10547  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10548  // whether the returned error was because http.StatusNotModified was returned.
 10549  func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*User, error) {
 10550  	gensupport.SetOptions(c.urlParams_, opts...)
 10551  	res, err := c.doRequest("json")
 10552  	if res != nil && res.StatusCode == http.StatusNotModified {
 10553  		if res.Body != nil {
 10554  			res.Body.Close()
 10555  		}
 10556  		return nil, gensupport.WrapError(&googleapi.Error{
 10557  			Code:   res.StatusCode,
 10558  			Header: res.Header,
 10559  		})
 10560  	}
 10561  	if err != nil {
 10562  		return nil, err
 10563  	}
 10564  	defer googleapi.CloseBody(res)
 10565  	if err := googleapi.CheckResponse(res); err != nil {
 10566  		return nil, gensupport.WrapError(err)
 10567  	}
 10568  	ret := &User{
 10569  		ServerResponse: googleapi.ServerResponse{
 10570  			Header:         res.Header,
 10571  			HTTPStatusCode: res.StatusCode,
 10572  		},
 10573  	}
 10574  	target := &ret
 10575  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10576  		return nil, err
 10577  	}
 10578  	return ret, nil
 10579  }
 10580  
 10581  type UsersListCall struct {
 10582  	s            *Service
 10583  	enterpriseId string
 10584  	urlParams_   gensupport.URLParams
 10585  	ifNoneMatch_ string
 10586  	ctx_         context.Context
 10587  	header_      http.Header
 10588  }
 10589  
 10590  // List: Looks up a user by primary email address. This is only supported for
 10591  // Google-managed users. Lookup of the id is not needed for EMM-managed users
 10592  // because the id is already returned in the result of the Users.insert call.
 10593  //
 10594  // - email: The exact primary email address of the user to look up.
 10595  // - enterpriseId: The ID of the enterprise.
 10596  func (r *UsersService) List(enterpriseId string, email string) *UsersListCall {
 10597  	c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10598  	c.enterpriseId = enterpriseId
 10599  	c.urlParams_.Set("email", email)
 10600  	return c
 10601  }
 10602  
 10603  // Fields allows partial responses to be retrieved. See
 10604  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10605  // details.
 10606  func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
 10607  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10608  	return c
 10609  }
 10610  
 10611  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10612  // object's ETag matches the given value. This is useful for getting updates
 10613  // only after the object has changed since the last request.
 10614  func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
 10615  	c.ifNoneMatch_ = entityTag
 10616  	return c
 10617  }
 10618  
 10619  // Context sets the context to be used in this call's Do method.
 10620  func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
 10621  	c.ctx_ = ctx
 10622  	return c
 10623  }
 10624  
 10625  // Header returns a http.Header that can be modified by the caller to add
 10626  // headers to the request.
 10627  func (c *UsersListCall) Header() http.Header {
 10628  	if c.header_ == nil {
 10629  		c.header_ = make(http.Header)
 10630  	}
 10631  	return c.header_
 10632  }
 10633  
 10634  func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
 10635  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10636  	if c.ifNoneMatch_ != "" {
 10637  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10638  	}
 10639  	var body io.Reader = nil
 10640  	c.urlParams_.Set("alt", alt)
 10641  	c.urlParams_.Set("prettyPrint", "false")
 10642  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users")
 10643  	urls += "?" + c.urlParams_.Encode()
 10644  	req, err := http.NewRequest("GET", urls, body)
 10645  	if err != nil {
 10646  		return nil, err
 10647  	}
 10648  	req.Header = reqHeaders
 10649  	googleapi.Expand(req.URL, map[string]string{
 10650  		"enterpriseId": c.enterpriseId,
 10651  	})
 10652  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10653  }
 10654  
 10655  // Do executes the "androidenterprise.users.list" call.
 10656  // Any non-2xx status code is an error. Response headers are in either
 10657  // *UsersListResponse.ServerResponse.Header or (if a response was returned at
 10658  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10659  // check whether the returned error was because http.StatusNotModified was
 10660  // returned.
 10661  func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error) {
 10662  	gensupport.SetOptions(c.urlParams_, opts...)
 10663  	res, err := c.doRequest("json")
 10664  	if res != nil && res.StatusCode == http.StatusNotModified {
 10665  		if res.Body != nil {
 10666  			res.Body.Close()
 10667  		}
 10668  		return nil, gensupport.WrapError(&googleapi.Error{
 10669  			Code:   res.StatusCode,
 10670  			Header: res.Header,
 10671  		})
 10672  	}
 10673  	if err != nil {
 10674  		return nil, err
 10675  	}
 10676  	defer googleapi.CloseBody(res)
 10677  	if err := googleapi.CheckResponse(res); err != nil {
 10678  		return nil, gensupport.WrapError(err)
 10679  	}
 10680  	ret := &UsersListResponse{
 10681  		ServerResponse: googleapi.ServerResponse{
 10682  			Header:         res.Header,
 10683  			HTTPStatusCode: res.StatusCode,
 10684  		},
 10685  	}
 10686  	target := &ret
 10687  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10688  		return nil, err
 10689  	}
 10690  	return ret, nil
 10691  }
 10692  
 10693  type UsersRevokeDeviceAccessCall struct {
 10694  	s            *Service
 10695  	enterpriseId string
 10696  	userId       string
 10697  	urlParams_   gensupport.URLParams
 10698  	ctx_         context.Context
 10699  	header_      http.Header
 10700  }
 10701  
 10702  // RevokeDeviceAccess: Revokes access to all devices currently provisioned to
 10703  // the user. The user will no longer be able to use the managed Play store on
 10704  // any of their managed devices. This call only works with EMM-managed
 10705  // accounts.
 10706  //
 10707  // - enterpriseId: The ID of the enterprise.
 10708  // - userId: The ID of the user.
 10709  func (r *UsersService) RevokeDeviceAccess(enterpriseId string, userId string) *UsersRevokeDeviceAccessCall {
 10710  	c := &UsersRevokeDeviceAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10711  	c.enterpriseId = enterpriseId
 10712  	c.userId = userId
 10713  	return c
 10714  }
 10715  
 10716  // Fields allows partial responses to be retrieved. See
 10717  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10718  // details.
 10719  func (c *UsersRevokeDeviceAccessCall) Fields(s ...googleapi.Field) *UsersRevokeDeviceAccessCall {
 10720  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10721  	return c
 10722  }
 10723  
 10724  // Context sets the context to be used in this call's Do method.
 10725  func (c *UsersRevokeDeviceAccessCall) Context(ctx context.Context) *UsersRevokeDeviceAccessCall {
 10726  	c.ctx_ = ctx
 10727  	return c
 10728  }
 10729  
 10730  // Header returns a http.Header that can be modified by the caller to add
 10731  // headers to the request.
 10732  func (c *UsersRevokeDeviceAccessCall) Header() http.Header {
 10733  	if c.header_ == nil {
 10734  		c.header_ = make(http.Header)
 10735  	}
 10736  	return c.header_
 10737  }
 10738  
 10739  func (c *UsersRevokeDeviceAccessCall) doRequest(alt string) (*http.Response, error) {
 10740  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10741  	var body io.Reader = nil
 10742  	c.urlParams_.Set("alt", alt)
 10743  	c.urlParams_.Set("prettyPrint", "false")
 10744  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/deviceAccess")
 10745  	urls += "?" + c.urlParams_.Encode()
 10746  	req, err := http.NewRequest("DELETE", urls, body)
 10747  	if err != nil {
 10748  		return nil, err
 10749  	}
 10750  	req.Header = reqHeaders
 10751  	googleapi.Expand(req.URL, map[string]string{
 10752  		"enterpriseId": c.enterpriseId,
 10753  		"userId":       c.userId,
 10754  	})
 10755  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10756  }
 10757  
 10758  // Do executes the "androidenterprise.users.revokeDeviceAccess" call.
 10759  func (c *UsersRevokeDeviceAccessCall) Do(opts ...googleapi.CallOption) error {
 10760  	gensupport.SetOptions(c.urlParams_, opts...)
 10761  	res, err := c.doRequest("json")
 10762  	if err != nil {
 10763  		return err
 10764  	}
 10765  	defer googleapi.CloseBody(res)
 10766  	if err := googleapi.CheckResponse(res); err != nil {
 10767  		return gensupport.WrapError(err)
 10768  	}
 10769  	return nil
 10770  }
 10771  
 10772  type UsersSetAvailableProductSetCall struct {
 10773  	s            *Service
 10774  	enterpriseId string
 10775  	userId       string
 10776  	productset   *ProductSet
 10777  	urlParams_   gensupport.URLParams
 10778  	ctx_         context.Context
 10779  	header_      http.Header
 10780  }
 10781  
 10782  // SetAvailableProductSet: Modifies the set of products that a user is entitled
 10783  // to access (referred to as *whitelisted* products). Only products that are
 10784  // approved or products that were previously approved (products with revoked
 10785  // approval) can be whitelisted. **Note:** This item has been deprecated. New
 10786  // integrations cannot use this method and can refer to our new
 10787  // recommendations.
 10788  //
 10789  // - enterpriseId: The ID of the enterprise.
 10790  // - userId: The ID of the user.
 10791  func (r *UsersService) SetAvailableProductSet(enterpriseId string, userId string, productset *ProductSet) *UsersSetAvailableProductSetCall {
 10792  	c := &UsersSetAvailableProductSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10793  	c.enterpriseId = enterpriseId
 10794  	c.userId = userId
 10795  	c.productset = productset
 10796  	return c
 10797  }
 10798  
 10799  // Fields allows partial responses to be retrieved. See
 10800  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10801  // details.
 10802  func (c *UsersSetAvailableProductSetCall) Fields(s ...googleapi.Field) *UsersSetAvailableProductSetCall {
 10803  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10804  	return c
 10805  }
 10806  
 10807  // Context sets the context to be used in this call's Do method.
 10808  func (c *UsersSetAvailableProductSetCall) Context(ctx context.Context) *UsersSetAvailableProductSetCall {
 10809  	c.ctx_ = ctx
 10810  	return c
 10811  }
 10812  
 10813  // Header returns a http.Header that can be modified by the caller to add
 10814  // headers to the request.
 10815  func (c *UsersSetAvailableProductSetCall) Header() http.Header {
 10816  	if c.header_ == nil {
 10817  		c.header_ = make(http.Header)
 10818  	}
 10819  	return c.header_
 10820  }
 10821  
 10822  func (c *UsersSetAvailableProductSetCall) doRequest(alt string) (*http.Response, error) {
 10823  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10824  	var body io.Reader = nil
 10825  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.productset)
 10826  	if err != nil {
 10827  		return nil, err
 10828  	}
 10829  	c.urlParams_.Set("alt", alt)
 10830  	c.urlParams_.Set("prettyPrint", "false")
 10831  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet")
 10832  	urls += "?" + c.urlParams_.Encode()
 10833  	req, err := http.NewRequest("PUT", urls, body)
 10834  	if err != nil {
 10835  		return nil, err
 10836  	}
 10837  	req.Header = reqHeaders
 10838  	googleapi.Expand(req.URL, map[string]string{
 10839  		"enterpriseId": c.enterpriseId,
 10840  		"userId":       c.userId,
 10841  	})
 10842  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10843  }
 10844  
 10845  // Do executes the "androidenterprise.users.setAvailableProductSet" call.
 10846  // Any non-2xx status code is an error. Response headers are in either
 10847  // *ProductSet.ServerResponse.Header or (if a response was returned at all) in
 10848  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10849  // whether the returned error was because http.StatusNotModified was returned.
 10850  func (c *UsersSetAvailableProductSetCall) Do(opts ...googleapi.CallOption) (*ProductSet, error) {
 10851  	gensupport.SetOptions(c.urlParams_, opts...)
 10852  	res, err := c.doRequest("json")
 10853  	if res != nil && res.StatusCode == http.StatusNotModified {
 10854  		if res.Body != nil {
 10855  			res.Body.Close()
 10856  		}
 10857  		return nil, gensupport.WrapError(&googleapi.Error{
 10858  			Code:   res.StatusCode,
 10859  			Header: res.Header,
 10860  		})
 10861  	}
 10862  	if err != nil {
 10863  		return nil, err
 10864  	}
 10865  	defer googleapi.CloseBody(res)
 10866  	if err := googleapi.CheckResponse(res); err != nil {
 10867  		return nil, gensupport.WrapError(err)
 10868  	}
 10869  	ret := &ProductSet{
 10870  		ServerResponse: googleapi.ServerResponse{
 10871  			Header:         res.Header,
 10872  			HTTPStatusCode: res.StatusCode,
 10873  		},
 10874  	}
 10875  	target := &ret
 10876  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10877  		return nil, err
 10878  	}
 10879  	return ret, nil
 10880  }
 10881  
 10882  type UsersUpdateCall struct {
 10883  	s            *Service
 10884  	enterpriseId string
 10885  	userId       string
 10886  	user         *User
 10887  	urlParams_   gensupport.URLParams
 10888  	ctx_         context.Context
 10889  	header_      http.Header
 10890  }
 10891  
 10892  // Update: Updates the details of an EMM-managed user. Can be used with
 10893  // EMM-managed users only (not Google managed users). Pass the new details in
 10894  // the Users resource in the request body. Only the displayName field can be
 10895  // changed. Other fields must either be unset or have the currently active
 10896  // value.
 10897  //
 10898  // - enterpriseId: The ID of the enterprise.
 10899  // - userId: The ID of the user.
 10900  func (r *UsersService) Update(enterpriseId string, userId string, user *User) *UsersUpdateCall {
 10901  	c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10902  	c.enterpriseId = enterpriseId
 10903  	c.userId = userId
 10904  	c.user = user
 10905  	return c
 10906  }
 10907  
 10908  // Fields allows partial responses to be retrieved. See
 10909  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10910  // details.
 10911  func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
 10912  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10913  	return c
 10914  }
 10915  
 10916  // Context sets the context to be used in this call's Do method.
 10917  func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
 10918  	c.ctx_ = ctx
 10919  	return c
 10920  }
 10921  
 10922  // Header returns a http.Header that can be modified by the caller to add
 10923  // headers to the request.
 10924  func (c *UsersUpdateCall) Header() http.Header {
 10925  	if c.header_ == nil {
 10926  		c.header_ = make(http.Header)
 10927  	}
 10928  	return c.header_
 10929  }
 10930  
 10931  func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
 10932  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10933  	var body io.Reader = nil
 10934  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
 10935  	if err != nil {
 10936  		return nil, err
 10937  	}
 10938  	c.urlParams_.Set("alt", alt)
 10939  	c.urlParams_.Set("prettyPrint", "false")
 10940  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}")
 10941  	urls += "?" + c.urlParams_.Encode()
 10942  	req, err := http.NewRequest("PUT", urls, body)
 10943  	if err != nil {
 10944  		return nil, err
 10945  	}
 10946  	req.Header = reqHeaders
 10947  	googleapi.Expand(req.URL, map[string]string{
 10948  		"enterpriseId": c.enterpriseId,
 10949  		"userId":       c.userId,
 10950  	})
 10951  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10952  }
 10953  
 10954  // Do executes the "androidenterprise.users.update" call.
 10955  // Any non-2xx status code is an error. Response headers are in either
 10956  // *User.ServerResponse.Header or (if a response was returned at all) in
 10957  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10958  // whether the returned error was because http.StatusNotModified was returned.
 10959  func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*User, error) {
 10960  	gensupport.SetOptions(c.urlParams_, opts...)
 10961  	res, err := c.doRequest("json")
 10962  	if res != nil && res.StatusCode == http.StatusNotModified {
 10963  		if res.Body != nil {
 10964  			res.Body.Close()
 10965  		}
 10966  		return nil, gensupport.WrapError(&googleapi.Error{
 10967  			Code:   res.StatusCode,
 10968  			Header: res.Header,
 10969  		})
 10970  	}
 10971  	if err != nil {
 10972  		return nil, err
 10973  	}
 10974  	defer googleapi.CloseBody(res)
 10975  	if err := googleapi.CheckResponse(res); err != nil {
 10976  		return nil, gensupport.WrapError(err)
 10977  	}
 10978  	ret := &User{
 10979  		ServerResponse: googleapi.ServerResponse{
 10980  			Header:         res.Header,
 10981  			HTTPStatusCode: res.StatusCode,
 10982  		},
 10983  	}
 10984  	target := &ret
 10985  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10986  		return nil, err
 10987  	}
 10988  	return ret, nil
 10989  }
 10990  
 10991  type WebappsDeleteCall struct {
 10992  	s            *Service
 10993  	enterpriseId string
 10994  	webAppId     string
 10995  	urlParams_   gensupport.URLParams
 10996  	ctx_         context.Context
 10997  	header_      http.Header
 10998  }
 10999  
 11000  // Delete: Deletes an existing web app.
 11001  //
 11002  // - enterpriseId: The ID of the enterprise.
 11003  // - webAppId: The ID of the web app.
 11004  func (r *WebappsService) Delete(enterpriseId string, webAppId string) *WebappsDeleteCall {
 11005  	c := &WebappsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11006  	c.enterpriseId = enterpriseId
 11007  	c.webAppId = webAppId
 11008  	return c
 11009  }
 11010  
 11011  // Fields allows partial responses to be retrieved. See
 11012  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11013  // details.
 11014  func (c *WebappsDeleteCall) Fields(s ...googleapi.Field) *WebappsDeleteCall {
 11015  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11016  	return c
 11017  }
 11018  
 11019  // Context sets the context to be used in this call's Do method.
 11020  func (c *WebappsDeleteCall) Context(ctx context.Context) *WebappsDeleteCall {
 11021  	c.ctx_ = ctx
 11022  	return c
 11023  }
 11024  
 11025  // Header returns a http.Header that can be modified by the caller to add
 11026  // headers to the request.
 11027  func (c *WebappsDeleteCall) Header() http.Header {
 11028  	if c.header_ == nil {
 11029  		c.header_ = make(http.Header)
 11030  	}
 11031  	return c.header_
 11032  }
 11033  
 11034  func (c *WebappsDeleteCall) doRequest(alt string) (*http.Response, error) {
 11035  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11036  	var body io.Reader = nil
 11037  	c.urlParams_.Set("alt", alt)
 11038  	c.urlParams_.Set("prettyPrint", "false")
 11039  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}")
 11040  	urls += "?" + c.urlParams_.Encode()
 11041  	req, err := http.NewRequest("DELETE", urls, body)
 11042  	if err != nil {
 11043  		return nil, err
 11044  	}
 11045  	req.Header = reqHeaders
 11046  	googleapi.Expand(req.URL, map[string]string{
 11047  		"enterpriseId": c.enterpriseId,
 11048  		"webAppId":     c.webAppId,
 11049  	})
 11050  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11051  }
 11052  
 11053  // Do executes the "androidenterprise.webapps.delete" call.
 11054  func (c *WebappsDeleteCall) Do(opts ...googleapi.CallOption) error {
 11055  	gensupport.SetOptions(c.urlParams_, opts...)
 11056  	res, err := c.doRequest("json")
 11057  	if err != nil {
 11058  		return err
 11059  	}
 11060  	defer googleapi.CloseBody(res)
 11061  	if err := googleapi.CheckResponse(res); err != nil {
 11062  		return gensupport.WrapError(err)
 11063  	}
 11064  	return nil
 11065  }
 11066  
 11067  type WebappsGetCall struct {
 11068  	s            *Service
 11069  	enterpriseId string
 11070  	webAppId     string
 11071  	urlParams_   gensupport.URLParams
 11072  	ifNoneMatch_ string
 11073  	ctx_         context.Context
 11074  	header_      http.Header
 11075  }
 11076  
 11077  // Get: Gets an existing web app.
 11078  //
 11079  // - enterpriseId: The ID of the enterprise.
 11080  // - webAppId: The ID of the web app.
 11081  func (r *WebappsService) Get(enterpriseId string, webAppId string) *WebappsGetCall {
 11082  	c := &WebappsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11083  	c.enterpriseId = enterpriseId
 11084  	c.webAppId = webAppId
 11085  	return c
 11086  }
 11087  
 11088  // Fields allows partial responses to be retrieved. See
 11089  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11090  // details.
 11091  func (c *WebappsGetCall) Fields(s ...googleapi.Field) *WebappsGetCall {
 11092  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11093  	return c
 11094  }
 11095  
 11096  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11097  // object's ETag matches the given value. This is useful for getting updates
 11098  // only after the object has changed since the last request.
 11099  func (c *WebappsGetCall) IfNoneMatch(entityTag string) *WebappsGetCall {
 11100  	c.ifNoneMatch_ = entityTag
 11101  	return c
 11102  }
 11103  
 11104  // Context sets the context to be used in this call's Do method.
 11105  func (c *WebappsGetCall) Context(ctx context.Context) *WebappsGetCall {
 11106  	c.ctx_ = ctx
 11107  	return c
 11108  }
 11109  
 11110  // Header returns a http.Header that can be modified by the caller to add
 11111  // headers to the request.
 11112  func (c *WebappsGetCall) Header() http.Header {
 11113  	if c.header_ == nil {
 11114  		c.header_ = make(http.Header)
 11115  	}
 11116  	return c.header_
 11117  }
 11118  
 11119  func (c *WebappsGetCall) doRequest(alt string) (*http.Response, error) {
 11120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11121  	if c.ifNoneMatch_ != "" {
 11122  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11123  	}
 11124  	var body io.Reader = nil
 11125  	c.urlParams_.Set("alt", alt)
 11126  	c.urlParams_.Set("prettyPrint", "false")
 11127  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}")
 11128  	urls += "?" + c.urlParams_.Encode()
 11129  	req, err := http.NewRequest("GET", urls, body)
 11130  	if err != nil {
 11131  		return nil, err
 11132  	}
 11133  	req.Header = reqHeaders
 11134  	googleapi.Expand(req.URL, map[string]string{
 11135  		"enterpriseId": c.enterpriseId,
 11136  		"webAppId":     c.webAppId,
 11137  	})
 11138  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11139  }
 11140  
 11141  // Do executes the "androidenterprise.webapps.get" call.
 11142  // Any non-2xx status code is an error. Response headers are in either
 11143  // *WebApp.ServerResponse.Header or (if a response was returned at all) in
 11144  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11145  // whether the returned error was because http.StatusNotModified was returned.
 11146  func (c *WebappsGetCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
 11147  	gensupport.SetOptions(c.urlParams_, opts...)
 11148  	res, err := c.doRequest("json")
 11149  	if res != nil && res.StatusCode == http.StatusNotModified {
 11150  		if res.Body != nil {
 11151  			res.Body.Close()
 11152  		}
 11153  		return nil, gensupport.WrapError(&googleapi.Error{
 11154  			Code:   res.StatusCode,
 11155  			Header: res.Header,
 11156  		})
 11157  	}
 11158  	if err != nil {
 11159  		return nil, err
 11160  	}
 11161  	defer googleapi.CloseBody(res)
 11162  	if err := googleapi.CheckResponse(res); err != nil {
 11163  		return nil, gensupport.WrapError(err)
 11164  	}
 11165  	ret := &WebApp{
 11166  		ServerResponse: googleapi.ServerResponse{
 11167  			Header:         res.Header,
 11168  			HTTPStatusCode: res.StatusCode,
 11169  		},
 11170  	}
 11171  	target := &ret
 11172  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11173  		return nil, err
 11174  	}
 11175  	return ret, nil
 11176  }
 11177  
 11178  type WebappsInsertCall struct {
 11179  	s            *Service
 11180  	enterpriseId string
 11181  	webapp       *WebApp
 11182  	urlParams_   gensupport.URLParams
 11183  	ctx_         context.Context
 11184  	header_      http.Header
 11185  }
 11186  
 11187  // Insert: Creates a new web app for the enterprise.
 11188  //
 11189  // - enterpriseId: The ID of the enterprise.
 11190  func (r *WebappsService) Insert(enterpriseId string, webapp *WebApp) *WebappsInsertCall {
 11191  	c := &WebappsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11192  	c.enterpriseId = enterpriseId
 11193  	c.webapp = webapp
 11194  	return c
 11195  }
 11196  
 11197  // Fields allows partial responses to be retrieved. See
 11198  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11199  // details.
 11200  func (c *WebappsInsertCall) Fields(s ...googleapi.Field) *WebappsInsertCall {
 11201  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11202  	return c
 11203  }
 11204  
 11205  // Context sets the context to be used in this call's Do method.
 11206  func (c *WebappsInsertCall) Context(ctx context.Context) *WebappsInsertCall {
 11207  	c.ctx_ = ctx
 11208  	return c
 11209  }
 11210  
 11211  // Header returns a http.Header that can be modified by the caller to add
 11212  // headers to the request.
 11213  func (c *WebappsInsertCall) Header() http.Header {
 11214  	if c.header_ == nil {
 11215  		c.header_ = make(http.Header)
 11216  	}
 11217  	return c.header_
 11218  }
 11219  
 11220  func (c *WebappsInsertCall) doRequest(alt string) (*http.Response, error) {
 11221  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11222  	var body io.Reader = nil
 11223  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
 11224  	if err != nil {
 11225  		return nil, err
 11226  	}
 11227  	c.urlParams_.Set("alt", alt)
 11228  	c.urlParams_.Set("prettyPrint", "false")
 11229  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps")
 11230  	urls += "?" + c.urlParams_.Encode()
 11231  	req, err := http.NewRequest("POST", urls, body)
 11232  	if err != nil {
 11233  		return nil, err
 11234  	}
 11235  	req.Header = reqHeaders
 11236  	googleapi.Expand(req.URL, map[string]string{
 11237  		"enterpriseId": c.enterpriseId,
 11238  	})
 11239  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11240  }
 11241  
 11242  // Do executes the "androidenterprise.webapps.insert" call.
 11243  // Any non-2xx status code is an error. Response headers are in either
 11244  // *WebApp.ServerResponse.Header or (if a response was returned at all) in
 11245  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11246  // whether the returned error was because http.StatusNotModified was returned.
 11247  func (c *WebappsInsertCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
 11248  	gensupport.SetOptions(c.urlParams_, opts...)
 11249  	res, err := c.doRequest("json")
 11250  	if res != nil && res.StatusCode == http.StatusNotModified {
 11251  		if res.Body != nil {
 11252  			res.Body.Close()
 11253  		}
 11254  		return nil, gensupport.WrapError(&googleapi.Error{
 11255  			Code:   res.StatusCode,
 11256  			Header: res.Header,
 11257  		})
 11258  	}
 11259  	if err != nil {
 11260  		return nil, err
 11261  	}
 11262  	defer googleapi.CloseBody(res)
 11263  	if err := googleapi.CheckResponse(res); err != nil {
 11264  		return nil, gensupport.WrapError(err)
 11265  	}
 11266  	ret := &WebApp{
 11267  		ServerResponse: googleapi.ServerResponse{
 11268  			Header:         res.Header,
 11269  			HTTPStatusCode: res.StatusCode,
 11270  		},
 11271  	}
 11272  	target := &ret
 11273  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11274  		return nil, err
 11275  	}
 11276  	return ret, nil
 11277  }
 11278  
 11279  type WebappsListCall struct {
 11280  	s            *Service
 11281  	enterpriseId string
 11282  	urlParams_   gensupport.URLParams
 11283  	ifNoneMatch_ string
 11284  	ctx_         context.Context
 11285  	header_      http.Header
 11286  }
 11287  
 11288  // List: Retrieves the details of all web apps for a given enterprise.
 11289  //
 11290  // - enterpriseId: The ID of the enterprise.
 11291  func (r *WebappsService) List(enterpriseId string) *WebappsListCall {
 11292  	c := &WebappsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11293  	c.enterpriseId = enterpriseId
 11294  	return c
 11295  }
 11296  
 11297  // Fields allows partial responses to be retrieved. See
 11298  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11299  // details.
 11300  func (c *WebappsListCall) Fields(s ...googleapi.Field) *WebappsListCall {
 11301  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11302  	return c
 11303  }
 11304  
 11305  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11306  // object's ETag matches the given value. This is useful for getting updates
 11307  // only after the object has changed since the last request.
 11308  func (c *WebappsListCall) IfNoneMatch(entityTag string) *WebappsListCall {
 11309  	c.ifNoneMatch_ = entityTag
 11310  	return c
 11311  }
 11312  
 11313  // Context sets the context to be used in this call's Do method.
 11314  func (c *WebappsListCall) Context(ctx context.Context) *WebappsListCall {
 11315  	c.ctx_ = ctx
 11316  	return c
 11317  }
 11318  
 11319  // Header returns a http.Header that can be modified by the caller to add
 11320  // headers to the request.
 11321  func (c *WebappsListCall) Header() http.Header {
 11322  	if c.header_ == nil {
 11323  		c.header_ = make(http.Header)
 11324  	}
 11325  	return c.header_
 11326  }
 11327  
 11328  func (c *WebappsListCall) doRequest(alt string) (*http.Response, error) {
 11329  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11330  	if c.ifNoneMatch_ != "" {
 11331  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11332  	}
 11333  	var body io.Reader = nil
 11334  	c.urlParams_.Set("alt", alt)
 11335  	c.urlParams_.Set("prettyPrint", "false")
 11336  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps")
 11337  	urls += "?" + c.urlParams_.Encode()
 11338  	req, err := http.NewRequest("GET", urls, body)
 11339  	if err != nil {
 11340  		return nil, err
 11341  	}
 11342  	req.Header = reqHeaders
 11343  	googleapi.Expand(req.URL, map[string]string{
 11344  		"enterpriseId": c.enterpriseId,
 11345  	})
 11346  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11347  }
 11348  
 11349  // Do executes the "androidenterprise.webapps.list" call.
 11350  // Any non-2xx status code is an error. Response headers are in either
 11351  // *WebAppsListResponse.ServerResponse.Header or (if a response was returned at
 11352  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11353  // check whether the returned error was because http.StatusNotModified was
 11354  // returned.
 11355  func (c *WebappsListCall) Do(opts ...googleapi.CallOption) (*WebAppsListResponse, error) {
 11356  	gensupport.SetOptions(c.urlParams_, opts...)
 11357  	res, err := c.doRequest("json")
 11358  	if res != nil && res.StatusCode == http.StatusNotModified {
 11359  		if res.Body != nil {
 11360  			res.Body.Close()
 11361  		}
 11362  		return nil, gensupport.WrapError(&googleapi.Error{
 11363  			Code:   res.StatusCode,
 11364  			Header: res.Header,
 11365  		})
 11366  	}
 11367  	if err != nil {
 11368  		return nil, err
 11369  	}
 11370  	defer googleapi.CloseBody(res)
 11371  	if err := googleapi.CheckResponse(res); err != nil {
 11372  		return nil, gensupport.WrapError(err)
 11373  	}
 11374  	ret := &WebAppsListResponse{
 11375  		ServerResponse: googleapi.ServerResponse{
 11376  			Header:         res.Header,
 11377  			HTTPStatusCode: res.StatusCode,
 11378  		},
 11379  	}
 11380  	target := &ret
 11381  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11382  		return nil, err
 11383  	}
 11384  	return ret, nil
 11385  }
 11386  
 11387  type WebappsUpdateCall struct {
 11388  	s            *Service
 11389  	enterpriseId string
 11390  	webAppId     string
 11391  	webapp       *WebApp
 11392  	urlParams_   gensupport.URLParams
 11393  	ctx_         context.Context
 11394  	header_      http.Header
 11395  }
 11396  
 11397  // Update: Updates an existing web app.
 11398  //
 11399  // - enterpriseId: The ID of the enterprise.
 11400  // - webAppId: The ID of the web app.
 11401  func (r *WebappsService) Update(enterpriseId string, webAppId string, webapp *WebApp) *WebappsUpdateCall {
 11402  	c := &WebappsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11403  	c.enterpriseId = enterpriseId
 11404  	c.webAppId = webAppId
 11405  	c.webapp = webapp
 11406  	return c
 11407  }
 11408  
 11409  // Fields allows partial responses to be retrieved. See
 11410  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11411  // details.
 11412  func (c *WebappsUpdateCall) Fields(s ...googleapi.Field) *WebappsUpdateCall {
 11413  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11414  	return c
 11415  }
 11416  
 11417  // Context sets the context to be used in this call's Do method.
 11418  func (c *WebappsUpdateCall) Context(ctx context.Context) *WebappsUpdateCall {
 11419  	c.ctx_ = ctx
 11420  	return c
 11421  }
 11422  
 11423  // Header returns a http.Header that can be modified by the caller to add
 11424  // headers to the request.
 11425  func (c *WebappsUpdateCall) Header() http.Header {
 11426  	if c.header_ == nil {
 11427  		c.header_ = make(http.Header)
 11428  	}
 11429  	return c.header_
 11430  }
 11431  
 11432  func (c *WebappsUpdateCall) doRequest(alt string) (*http.Response, error) {
 11433  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11434  	var body io.Reader = nil
 11435  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
 11436  	if err != nil {
 11437  		return nil, err
 11438  	}
 11439  	c.urlParams_.Set("alt", alt)
 11440  	c.urlParams_.Set("prettyPrint", "false")
 11441  	urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}")
 11442  	urls += "?" + c.urlParams_.Encode()
 11443  	req, err := http.NewRequest("PUT", urls, body)
 11444  	if err != nil {
 11445  		return nil, err
 11446  	}
 11447  	req.Header = reqHeaders
 11448  	googleapi.Expand(req.URL, map[string]string{
 11449  		"enterpriseId": c.enterpriseId,
 11450  		"webAppId":     c.webAppId,
 11451  	})
 11452  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11453  }
 11454  
 11455  // Do executes the "androidenterprise.webapps.update" call.
 11456  // Any non-2xx status code is an error. Response headers are in either
 11457  // *WebApp.ServerResponse.Header or (if a response was returned at all) in
 11458  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11459  // whether the returned error was because http.StatusNotModified was returned.
 11460  func (c *WebappsUpdateCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
 11461  	gensupport.SetOptions(c.urlParams_, opts...)
 11462  	res, err := c.doRequest("json")
 11463  	if res != nil && res.StatusCode == http.StatusNotModified {
 11464  		if res.Body != nil {
 11465  			res.Body.Close()
 11466  		}
 11467  		return nil, gensupport.WrapError(&googleapi.Error{
 11468  			Code:   res.StatusCode,
 11469  			Header: res.Header,
 11470  		})
 11471  	}
 11472  	if err != nil {
 11473  		return nil, err
 11474  	}
 11475  	defer googleapi.CloseBody(res)
 11476  	if err := googleapi.CheckResponse(res); err != nil {
 11477  		return nil, gensupport.WrapError(err)
 11478  	}
 11479  	ret := &WebApp{
 11480  		ServerResponse: googleapi.ServerResponse{
 11481  			Header:         res.Header,
 11482  			HTTPStatusCode: res.StatusCode,
 11483  		},
 11484  	}
 11485  	target := &ret
 11486  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11487  		return nil, err
 11488  	}
 11489  	return ret, nil
 11490  }
 11491  

View as plain text