...

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

Documentation: google.golang.org/api/androiddeviceprovisioning/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 androiddeviceprovisioning provides access to the Android Device Provisioning Partner API.
     8  //
     9  // For product documentation, see: https://developers.google.com/zero-touch/
    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/androiddeviceprovisioning/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	androiddeviceprovisioningService, err := androiddeviceprovisioning.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  //	androiddeviceprovisioningService, err := androiddeviceprovisioning.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  //	androiddeviceprovisioningService, err := androiddeviceprovisioning.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package androiddeviceprovisioning // import "google.golang.org/api/androiddeviceprovisioning/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 = "androiddeviceprovisioning:v1"
    90  const apiName = "androiddeviceprovisioning"
    91  const apiVersion = "v1"
    92  const basePath = "https://androiddeviceprovisioning.googleapis.com/"
    93  const basePathTemplate = "https://androiddeviceprovisioning.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://androiddeviceprovisioning.mtls.googleapis.com/"
    95  
    96  // NewService creates a new Service.
    97  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    98  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
    99  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   100  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   101  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   102  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	s, err := New(client)
   107  	if err != nil {
   108  		return nil, err
   109  	}
   110  	if endpoint != "" {
   111  		s.BasePath = endpoint
   112  	}
   113  	return s, nil
   114  }
   115  
   116  // New creates a new Service. It uses the provided http.Client for requests.
   117  //
   118  // Deprecated: please use NewService instead.
   119  // To provide a custom HTTP client, use option.WithHTTPClient.
   120  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   121  func New(client *http.Client) (*Service, error) {
   122  	if client == nil {
   123  		return nil, errors.New("client is nil")
   124  	}
   125  	s := &Service{client: client, BasePath: basePath}
   126  	s.Customers = NewCustomersService(s)
   127  	s.Operations = NewOperationsService(s)
   128  	s.Partners = NewPartnersService(s)
   129  	return s, nil
   130  }
   131  
   132  type Service struct {
   133  	client    *http.Client
   134  	BasePath  string // API endpoint base URL
   135  	UserAgent string // optional additional User-Agent fragment
   136  
   137  	Customers *CustomersService
   138  
   139  	Operations *OperationsService
   140  
   141  	Partners *PartnersService
   142  }
   143  
   144  func (s *Service) userAgent() string {
   145  	if s.UserAgent == "" {
   146  		return googleapi.UserAgent
   147  	}
   148  	return googleapi.UserAgent + " " + s.UserAgent
   149  }
   150  
   151  func NewCustomersService(s *Service) *CustomersService {
   152  	rs := &CustomersService{s: s}
   153  	rs.Configurations = NewCustomersConfigurationsService(s)
   154  	rs.Devices = NewCustomersDevicesService(s)
   155  	rs.Dpcs = NewCustomersDpcsService(s)
   156  	return rs
   157  }
   158  
   159  type CustomersService struct {
   160  	s *Service
   161  
   162  	Configurations *CustomersConfigurationsService
   163  
   164  	Devices *CustomersDevicesService
   165  
   166  	Dpcs *CustomersDpcsService
   167  }
   168  
   169  func NewCustomersConfigurationsService(s *Service) *CustomersConfigurationsService {
   170  	rs := &CustomersConfigurationsService{s: s}
   171  	return rs
   172  }
   173  
   174  type CustomersConfigurationsService struct {
   175  	s *Service
   176  }
   177  
   178  func NewCustomersDevicesService(s *Service) *CustomersDevicesService {
   179  	rs := &CustomersDevicesService{s: s}
   180  	return rs
   181  }
   182  
   183  type CustomersDevicesService struct {
   184  	s *Service
   185  }
   186  
   187  func NewCustomersDpcsService(s *Service) *CustomersDpcsService {
   188  	rs := &CustomersDpcsService{s: s}
   189  	return rs
   190  }
   191  
   192  type CustomersDpcsService struct {
   193  	s *Service
   194  }
   195  
   196  func NewOperationsService(s *Service) *OperationsService {
   197  	rs := &OperationsService{s: s}
   198  	return rs
   199  }
   200  
   201  type OperationsService struct {
   202  	s *Service
   203  }
   204  
   205  func NewPartnersService(s *Service) *PartnersService {
   206  	rs := &PartnersService{s: s}
   207  	rs.Customers = NewPartnersCustomersService(s)
   208  	rs.Devices = NewPartnersDevicesService(s)
   209  	rs.Vendors = NewPartnersVendorsService(s)
   210  	return rs
   211  }
   212  
   213  type PartnersService struct {
   214  	s *Service
   215  
   216  	Customers *PartnersCustomersService
   217  
   218  	Devices *PartnersDevicesService
   219  
   220  	Vendors *PartnersVendorsService
   221  }
   222  
   223  func NewPartnersCustomersService(s *Service) *PartnersCustomersService {
   224  	rs := &PartnersCustomersService{s: s}
   225  	return rs
   226  }
   227  
   228  type PartnersCustomersService struct {
   229  	s *Service
   230  }
   231  
   232  func NewPartnersDevicesService(s *Service) *PartnersDevicesService {
   233  	rs := &PartnersDevicesService{s: s}
   234  	return rs
   235  }
   236  
   237  type PartnersDevicesService struct {
   238  	s *Service
   239  }
   240  
   241  func NewPartnersVendorsService(s *Service) *PartnersVendorsService {
   242  	rs := &PartnersVendorsService{s: s}
   243  	rs.Customers = NewPartnersVendorsCustomersService(s)
   244  	return rs
   245  }
   246  
   247  type PartnersVendorsService struct {
   248  	s *Service
   249  
   250  	Customers *PartnersVendorsCustomersService
   251  }
   252  
   253  func NewPartnersVendorsCustomersService(s *Service) *PartnersVendorsCustomersService {
   254  	rs := &PartnersVendorsCustomersService{s: s}
   255  	return rs
   256  }
   257  
   258  type PartnersVendorsCustomersService struct {
   259  	s *Service
   260  }
   261  
   262  // ClaimDeviceRequest: Request message to claim a device on behalf of a
   263  // customer.
   264  type ClaimDeviceRequest struct {
   265  	// ConfigurationId: Optional. The ID of the configuration applied to the device
   266  	// section.
   267  	ConfigurationId int64 `json:"configurationId,omitempty,string"`
   268  	// CustomerId: The ID of the customer for whom the device is being claimed.
   269  	CustomerId int64 `json:"customerId,omitempty,string"`
   270  	// DeviceIdentifier: Required. Required. The device identifier of the device to
   271  	// claim.
   272  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
   273  	// DeviceMetadata: Optional. The metadata to attach to the device.
   274  	DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
   275  	// GoogleWorkspaceCustomerId: The Google Workspace customer ID.
   276  	GoogleWorkspaceCustomerId string `json:"googleWorkspaceCustomerId,omitempty"`
   277  	// PreProvisioningToken: Optional. Must and can only be set for Chrome OS
   278  	// devices.
   279  	PreProvisioningToken string `json:"preProvisioningToken,omitempty"`
   280  	// SectionType: Required. The section type of the device's provisioning record.
   281  	//
   282  	// Possible values:
   283  	//   "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
   284  	//   "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
   285  	//   "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
   286  	SectionType string `json:"sectionType,omitempty"`
   287  	// SimlockProfileId: Optional. Must and can only be set when
   288  	// DeviceProvisioningSectionType is SECTION_TYPE_SIM_LOCK. The unique
   289  	// identifier of the SimLock profile.
   290  	SimlockProfileId int64 `json:"simlockProfileId,omitempty,string"`
   291  	// ForceSendFields is a list of field names (e.g. "ConfigurationId") to
   292  	// unconditionally include in API requests. By default, fields with empty or
   293  	// default values are omitted from API requests. See
   294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   295  	// details.
   296  	ForceSendFields []string `json:"-"`
   297  	// NullFields is a list of field names (e.g. "ConfigurationId") to include in
   298  	// API requests with the JSON null value. By default, fields with empty values
   299  	// are omitted from API requests. See
   300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   301  	NullFields []string `json:"-"`
   302  }
   303  
   304  func (s *ClaimDeviceRequest) MarshalJSON() ([]byte, error) {
   305  	type NoMethod ClaimDeviceRequest
   306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   307  }
   308  
   309  // ClaimDeviceResponse: Response message containing device id of the claim.
   310  type ClaimDeviceResponse struct {
   311  	// DeviceId: The device ID of the claimed device.
   312  	DeviceId int64 `json:"deviceId,omitempty,string"`
   313  	// DeviceName: The resource name of the device in the format
   314  	// `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.
   315  	DeviceName string `json:"deviceName,omitempty"`
   316  
   317  	// ServerResponse contains the HTTP response code and headers from the server.
   318  	googleapi.ServerResponse `json:"-"`
   319  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
   320  	// unconditionally include in API requests. By default, fields with empty or
   321  	// default values are omitted from API requests. See
   322  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   323  	// details.
   324  	ForceSendFields []string `json:"-"`
   325  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
   326  	// requests with the JSON null value. By default, fields with empty values are
   327  	// omitted from API requests. See
   328  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   329  	NullFields []string `json:"-"`
   330  }
   331  
   332  func (s *ClaimDeviceResponse) MarshalJSON() ([]byte, error) {
   333  	type NoMethod ClaimDeviceResponse
   334  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   335  }
   336  
   337  // ClaimDevicesRequest: Request to claim devices asynchronously in batch.
   338  // Claiming a device adds the device to zero-touch enrollment and shows the
   339  // device in the customer's view of the portal.
   340  type ClaimDevicesRequest struct {
   341  	// Claims: Required. A list of device claims.
   342  	Claims []*PartnerClaim `json:"claims,omitempty"`
   343  	// ForceSendFields is a list of field names (e.g. "Claims") to unconditionally
   344  	// include in API requests. By default, fields with empty or default values are
   345  	// omitted from API requests. See
   346  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   347  	// details.
   348  	ForceSendFields []string `json:"-"`
   349  	// NullFields is a list of field names (e.g. "Claims") to include in API
   350  	// requests with the JSON null value. By default, fields with empty values are
   351  	// omitted from API requests. See
   352  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   353  	NullFields []string `json:"-"`
   354  }
   355  
   356  func (s *ClaimDevicesRequest) MarshalJSON() ([]byte, error) {
   357  	type NoMethod ClaimDevicesRequest
   358  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   359  }
   360  
   361  // Company: A reseller, vendor, or customer in the zero-touch reseller and
   362  // customer APIs.
   363  type Company struct {
   364  	// AdminEmails: Optional. Email address of customer's users in the admin role.
   365  	// Each email address must be associated with a Google Account.
   366  	AdminEmails []string `json:"adminEmails,omitempty"`
   367  	// CompanyId: Output only. The ID of the company. Assigned by the server.
   368  	CompanyId int64 `json:"companyId,omitempty,string"`
   369  	// CompanyName: Required. The name of the company. For example _XYZ Corp_.
   370  	// Displayed to the company's employees in the zero-touch enrollment portal.
   371  	CompanyName string `json:"companyName,omitempty"`
   372  	// GoogleWorkspaceAccount: Output only. The Google Workspace account associated
   373  	// with this customer. Only used for customer Companies.
   374  	GoogleWorkspaceAccount *GoogleWorkspaceAccount `json:"googleWorkspaceAccount,omitempty"`
   375  	// LanguageCode: Input only. The preferred locale of the customer represented
   376  	// as a BCP47 language code. This field is validated on input and requests
   377  	// containing unsupported language codes will be rejected. Supported language
   378  	// codes: Arabic (ar) Chinese (Hong Kong) (zh-HK) Chinese (Simplified) (zh-CN)
   379  	// Chinese (Traditional) (zh-TW) Czech (cs) Danish (da) Dutch (nl) English (UK)
   380  	// (en-GB) English (US) (en-US) Filipino (fil) Finnish (fi) French (fr) German
   381  	// (de) Hebrew (iw) Hindi (hi) Hungarian (hu) Indonesian (id) Italian (it)
   382  	// Japanese (ja) Korean (ko) Norwegian (Bokmal) (no) Polish (pl) Portuguese
   383  	// (Brazil) (pt-BR) Portuguese (Portugal) (pt-PT) Russian (ru) Spanish (es)
   384  	// Spanish (Latin America) (es-419) Swedish (sv) Thai (th) Turkish (tr)
   385  	// Ukrainian (uk) Vietnamese (vi)
   386  	LanguageCode string `json:"languageCode,omitempty"`
   387  	// Name: Output only. The API resource name of the company. The resource name
   388  	// is one of the following formats: *
   389  	// `partners/[PARTNER_ID]/customers/[CUSTOMER_ID]` *
   390  	// `partners/[PARTNER_ID]/vendors/[VENDOR_ID]` *
   391  	// `partners/[PARTNER_ID]/vendors/[VENDOR_ID]/customers/[CUSTOMER_ID]` Assigned
   392  	// by the server.
   393  	Name string `json:"name,omitempty"`
   394  	// OwnerEmails: Required. Input only. Email address of customer's users in the
   395  	// owner role. At least one `owner_email` is required. Owners share the same
   396  	// access as admins but can also add, delete, and edit your organization's
   397  	// portal users.
   398  	OwnerEmails []string `json:"ownerEmails,omitempty"`
   399  	// SkipWelcomeEmail: Input only. If set to true, welcome email will not be sent
   400  	// to the customer. It is recommended to skip the welcome email if devices will
   401  	// be claimed with additional DEVICE_PROTECTION service, as the customer will
   402  	// receive separate emails at device claim time. This field is ignored if this
   403  	// is not a Zero-touch customer.
   404  	SkipWelcomeEmail bool `json:"skipWelcomeEmail,omitempty"`
   405  	// TermsStatus: Output only. Whether any user from the company has accepted the
   406  	// latest Terms of Service (ToS). See TermsStatus.
   407  	//
   408  	// Possible values:
   409  	//   "TERMS_STATUS_UNSPECIFIED" - Default value. This value should never be set
   410  	// if the enum is present.
   411  	//   "TERMS_STATUS_NOT_ACCEPTED" - None of the company's users have accepted
   412  	// the ToS.
   413  	//   "TERMS_STATUS_ACCEPTED" - One (or more) of the company's users has
   414  	// accepted the ToS.
   415  	//   "TERMS_STATUS_STALE" - None of the company's users has accepted the
   416  	// current ToS but at least one user accepted a previous ToS.
   417  	TermsStatus string `json:"termsStatus,omitempty"`
   418  
   419  	// ServerResponse contains the HTTP response code and headers from the server.
   420  	googleapi.ServerResponse `json:"-"`
   421  	// ForceSendFields is a list of field names (e.g. "AdminEmails") to
   422  	// unconditionally include in API requests. By default, fields with empty or
   423  	// default values are omitted from API requests. See
   424  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   425  	// details.
   426  	ForceSendFields []string `json:"-"`
   427  	// NullFields is a list of field names (e.g. "AdminEmails") to include in API
   428  	// requests with the JSON null value. By default, fields with empty values are
   429  	// omitted from API requests. See
   430  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   431  	NullFields []string `json:"-"`
   432  }
   433  
   434  func (s *Company) MarshalJSON() ([]byte, error) {
   435  	type NoMethod Company
   436  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   437  }
   438  
   439  // Configuration: A configuration collects the provisioning options for Android
   440  // devices. Each configuration combines the following: * The EMM device policy
   441  // controller (DPC) installed on the devices. * EMM policies enforced on the
   442  // devices. * Metadata displayed on the device to help users during setup.
   443  // Customers can add as many configurations as they need. However, zero-touch
   444  // enrollment works best when a customer sets a default configuration that's
   445  // applied to any new devices the organization purchases.
   446  type Configuration struct {
   447  	// CompanyName: Required. The name of the organization. Zero-touch enrollment
   448  	// shows this organization name to device users during device provisioning.
   449  	CompanyName string `json:"companyName,omitempty"`
   450  	// ConfigurationId: Output only. The ID of the configuration. Assigned by the
   451  	// server.
   452  	ConfigurationId int64 `json:"configurationId,omitempty,string"`
   453  	// ConfigurationName: Required. A short name that describes the configuration's
   454  	// purpose. For example, _Sales team_ or _Temporary employees_. The zero-touch
   455  	// enrollment portal displays this name to IT admins.
   456  	ConfigurationName string `json:"configurationName,omitempty"`
   457  	// ContactEmail: Required. The email address that device users can contact to
   458  	// get help. Zero-touch enrollment shows this email address to device users
   459  	// before device provisioning. The value is validated on input.
   460  	ContactEmail string `json:"contactEmail,omitempty"`
   461  	// ContactPhone: Required. The telephone number that device users can call,
   462  	// using another device, to get help. Zero-touch enrollment shows this number
   463  	// to device users before device provisioning. Accepts numerals, spaces, the
   464  	// plus sign, hyphens, and parentheses.
   465  	ContactPhone string `json:"contactPhone,omitempty"`
   466  	// CustomMessage: A message, containing one or two sentences, to help device
   467  	// users get help or give them more details about what’s happening to their
   468  	// device. Zero-touch enrollment shows this message before the device is
   469  	// provisioned.
   470  	CustomMessage string `json:"customMessage,omitempty"`
   471  	// DpcExtras: The JSON-formatted EMM provisioning extras that are passed to the
   472  	// DPC.
   473  	DpcExtras string `json:"dpcExtras,omitempty"`
   474  	// DpcResourcePath: Required. The resource name of the selected DPC (device
   475  	// policy controller) in the format `customers/[CUSTOMER_ID]/dpcs/*`. To list
   476  	// the supported DPCs, call `customers.dpcs.list`.
   477  	DpcResourcePath string `json:"dpcResourcePath,omitempty"`
   478  	// ForcedResetTime: Optional. The timeout before forcing factory reset the
   479  	// device if the device doesn't go through provisioning in the setup wizard,
   480  	// usually due to lack of network connectivity during setup wizard. Ranges from
   481  	// 0-6 hours, with 2 hours being the default if unset.
   482  	ForcedResetTime string `json:"forcedResetTime,omitempty"`
   483  	// IsDefault: Required. Whether this is the default configuration that
   484  	// zero-touch enrollment applies to any new devices the organization purchases
   485  	// in the future. Only one customer configuration can be the default. Setting
   486  	// this value to `true`, changes the previous default configuration's
   487  	// `isDefault` value to `false`.
   488  	IsDefault bool `json:"isDefault,omitempty"`
   489  	// Name: Output only. The API resource name in the format
   490  	// `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. Assigned by the
   491  	// server.
   492  	Name string `json:"name,omitempty"`
   493  
   494  	// ServerResponse contains the HTTP response code and headers from the server.
   495  	googleapi.ServerResponse `json:"-"`
   496  	// ForceSendFields is a list of field names (e.g. "CompanyName") to
   497  	// unconditionally include in API requests. By default, fields with empty or
   498  	// default values are omitted from API requests. See
   499  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   500  	// details.
   501  	ForceSendFields []string `json:"-"`
   502  	// NullFields is a list of field names (e.g. "CompanyName") to include in API
   503  	// requests with the JSON null value. By default, fields with empty values are
   504  	// omitted from API requests. See
   505  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   506  	NullFields []string `json:"-"`
   507  }
   508  
   509  func (s *Configuration) MarshalJSON() ([]byte, error) {
   510  	type NoMethod Configuration
   511  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   512  }
   513  
   514  // CreateCustomerRequest: Request message to create a customer.
   515  type CreateCustomerRequest struct {
   516  	// Customer: Required. The company data to populate the new customer. Must
   517  	// contain a value for `companyName` and at least one `owner_email` that's
   518  	// associated with a Google Account. The values for `companyId` and `name` must
   519  	// be empty.
   520  	Customer *Company `json:"customer,omitempty"`
   521  	// ForceSendFields is a list of field names (e.g. "Customer") to
   522  	// unconditionally include in API requests. By default, fields with empty or
   523  	// default values are omitted from API requests. See
   524  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   525  	// details.
   526  	ForceSendFields []string `json:"-"`
   527  	// NullFields is a list of field names (e.g. "Customer") to include in API
   528  	// requests with the JSON null value. By default, fields with empty values are
   529  	// omitted from API requests. See
   530  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   531  	NullFields []string `json:"-"`
   532  }
   533  
   534  func (s *CreateCustomerRequest) MarshalJSON() ([]byte, error) {
   535  	type NoMethod CreateCustomerRequest
   536  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   537  }
   538  
   539  // CustomerApplyConfigurationRequest: Request message for customer to assign a
   540  // configuration to device.
   541  type CustomerApplyConfigurationRequest struct {
   542  	// Configuration: Required. The configuration applied to the device in the
   543  	// format `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`.
   544  	Configuration string `json:"configuration,omitempty"`
   545  	// Device: Required. The device the configuration is applied to. There are
   546  	// custom validations in ApplyConfigurationRequestValidator
   547  	Device *DeviceReference `json:"device,omitempty"`
   548  	// ForceSendFields is a list of field names (e.g. "Configuration") to
   549  	// unconditionally include in API requests. By default, fields with empty or
   550  	// default values are omitted from API requests. See
   551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   552  	// details.
   553  	ForceSendFields []string `json:"-"`
   554  	// NullFields is a list of field names (e.g. "Configuration") to include in API
   555  	// requests with the JSON null value. By default, fields with empty values are
   556  	// omitted from API requests. See
   557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   558  	NullFields []string `json:"-"`
   559  }
   560  
   561  func (s *CustomerApplyConfigurationRequest) MarshalJSON() ([]byte, error) {
   562  	type NoMethod CustomerApplyConfigurationRequest
   563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   564  }
   565  
   566  // CustomerListConfigurationsResponse: Response message of customer's listing
   567  // configuration.
   568  type CustomerListConfigurationsResponse struct {
   569  	// Configurations: The configurations.
   570  	Configurations []*Configuration `json:"configurations,omitempty"`
   571  
   572  	// ServerResponse contains the HTTP response code and headers from the server.
   573  	googleapi.ServerResponse `json:"-"`
   574  	// ForceSendFields is a list of field names (e.g. "Configurations") to
   575  	// unconditionally include in API requests. By default, fields with empty or
   576  	// default values are omitted from API requests. See
   577  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   578  	// details.
   579  	ForceSendFields []string `json:"-"`
   580  	// NullFields is a list of field names (e.g. "Configurations") to include in
   581  	// API requests with the JSON null value. By default, fields with empty values
   582  	// are omitted from API requests. See
   583  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   584  	NullFields []string `json:"-"`
   585  }
   586  
   587  func (s *CustomerListConfigurationsResponse) MarshalJSON() ([]byte, error) {
   588  	type NoMethod CustomerListConfigurationsResponse
   589  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   590  }
   591  
   592  // CustomerListCustomersResponse: Response message for listing my customers.
   593  type CustomerListCustomersResponse struct {
   594  	// Customers: The customer accounts the calling user is a member of.
   595  	Customers []*Company `json:"customers,omitempty"`
   596  	// NextPageToken: A token used to access the next page of results. Omitted if
   597  	// no further results are available.
   598  	NextPageToken string `json:"nextPageToken,omitempty"`
   599  
   600  	// ServerResponse contains the HTTP response code and headers from the server.
   601  	googleapi.ServerResponse `json:"-"`
   602  	// ForceSendFields is a list of field names (e.g. "Customers") to
   603  	// unconditionally include in API requests. By default, fields with empty or
   604  	// default values are omitted from API requests. See
   605  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   606  	// details.
   607  	ForceSendFields []string `json:"-"`
   608  	// NullFields is a list of field names (e.g. "Customers") to include in API
   609  	// requests with the JSON null value. By default, fields with empty values are
   610  	// omitted from API requests. See
   611  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   612  	NullFields []string `json:"-"`
   613  }
   614  
   615  func (s *CustomerListCustomersResponse) MarshalJSON() ([]byte, error) {
   616  	type NoMethod CustomerListCustomersResponse
   617  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   618  }
   619  
   620  // CustomerListDevicesResponse: Response message of customer's liting devices.
   621  type CustomerListDevicesResponse struct {
   622  	// Devices: The customer's devices.
   623  	Devices []*Device `json:"devices,omitempty"`
   624  	// NextPageToken: A token used to access the next page of results. Omitted if
   625  	// no further results are available.
   626  	NextPageToken string `json:"nextPageToken,omitempty"`
   627  
   628  	// ServerResponse contains the HTTP response code and headers from the server.
   629  	googleapi.ServerResponse `json:"-"`
   630  	// ForceSendFields is a list of field names (e.g. "Devices") to unconditionally
   631  	// include in API requests. By default, fields with empty or default values are
   632  	// omitted from API requests. See
   633  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   634  	// details.
   635  	ForceSendFields []string `json:"-"`
   636  	// NullFields is a list of field names (e.g. "Devices") to include in API
   637  	// requests with the JSON null value. By default, fields with empty values are
   638  	// omitted from API requests. See
   639  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   640  	NullFields []string `json:"-"`
   641  }
   642  
   643  func (s *CustomerListDevicesResponse) MarshalJSON() ([]byte, error) {
   644  	type NoMethod CustomerListDevicesResponse
   645  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   646  }
   647  
   648  // CustomerListDpcsResponse: Response message of customer's listing DPCs.
   649  type CustomerListDpcsResponse struct {
   650  	// Dpcs: The list of DPCs available to the customer that support zero-touch
   651  	// enrollment.
   652  	Dpcs []*Dpc `json:"dpcs,omitempty"`
   653  
   654  	// ServerResponse contains the HTTP response code and headers from the server.
   655  	googleapi.ServerResponse `json:"-"`
   656  	// ForceSendFields is a list of field names (e.g. "Dpcs") to unconditionally
   657  	// include in API requests. By default, fields with empty or default values are
   658  	// omitted from API requests. See
   659  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   660  	// details.
   661  	ForceSendFields []string `json:"-"`
   662  	// NullFields is a list of field names (e.g. "Dpcs") to include in API requests
   663  	// with the JSON null value. By default, fields with empty values are omitted
   664  	// from API requests. See
   665  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   666  	NullFields []string `json:"-"`
   667  }
   668  
   669  func (s *CustomerListDpcsResponse) MarshalJSON() ([]byte, error) {
   670  	type NoMethod CustomerListDpcsResponse
   671  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   672  }
   673  
   674  // CustomerRemoveConfigurationRequest: Request message for customer to remove
   675  // the configuration from device.
   676  type CustomerRemoveConfigurationRequest struct {
   677  	// Device: Required. The device to remove the configuration from. There are
   678  	// custom validations in RemoveConfigurationRequestValidator
   679  	Device *DeviceReference `json:"device,omitempty"`
   680  	// ForceSendFields is a list of field names (e.g. "Device") to unconditionally
   681  	// include in API requests. By default, fields with empty or default values are
   682  	// omitted from API requests. See
   683  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   684  	// details.
   685  	ForceSendFields []string `json:"-"`
   686  	// NullFields is a list of field names (e.g. "Device") to include in API
   687  	// requests with the JSON null value. By default, fields with empty values are
   688  	// omitted from API requests. See
   689  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   690  	NullFields []string `json:"-"`
   691  }
   692  
   693  func (s *CustomerRemoveConfigurationRequest) MarshalJSON() ([]byte, error) {
   694  	type NoMethod CustomerRemoveConfigurationRequest
   695  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   696  }
   697  
   698  // CustomerUnclaimDeviceRequest: Request message for customer to unclaim a
   699  // device.
   700  type CustomerUnclaimDeviceRequest struct {
   701  	// Device: Required. The device to unclaim. There are custom validations in
   702  	// UnclaimDeviceRequestValidator.
   703  	Device *DeviceReference `json:"device,omitempty"`
   704  	// ForceSendFields is a list of field names (e.g. "Device") to unconditionally
   705  	// include in API requests. By default, fields with empty or default values are
   706  	// omitted from API requests. See
   707  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   708  	// details.
   709  	ForceSendFields []string `json:"-"`
   710  	// NullFields is a list of field names (e.g. "Device") to include in API
   711  	// requests with the JSON null value. By default, fields with empty values are
   712  	// omitted from API requests. See
   713  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   714  	NullFields []string `json:"-"`
   715  }
   716  
   717  func (s *CustomerUnclaimDeviceRequest) MarshalJSON() ([]byte, error) {
   718  	type NoMethod CustomerUnclaimDeviceRequest
   719  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   720  }
   721  
   722  // Device: An Android or Chrome OS device registered for zero-touch enrollment.
   723  type Device struct {
   724  	// Claims: Output only. The provisioning claims for a device. Devices claimed
   725  	// for zero-touch enrollment have a claim with the type
   726  	// `SECTION_TYPE_ZERO_TOUCH`. Call `partners.devices.unclaim` or
   727  	// `partners.devices.unclaimAsync` to remove the device from zero-touch
   728  	// enrollment.
   729  	Claims []*DeviceClaim `json:"claims,omitempty"`
   730  	// Configuration: Not available to resellers.
   731  	Configuration string `json:"configuration,omitempty"`
   732  	// DeviceId: Output only. The ID of the device. Assigned by the server.
   733  	DeviceId int64 `json:"deviceId,omitempty,string"`
   734  	// DeviceIdentifier: The hardware IDs that identify a manufactured device. To
   735  	// learn more, read Identifiers
   736  	// (https://developers.google.com/zero-touch/guides/identifiers).
   737  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
   738  	// DeviceMetadata: The metadata attached to the device. Structured as key-value
   739  	// pairs. To learn more, read Device metadata
   740  	// (https://developers.google.com/zero-touch/guides/metadata).
   741  	DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
   742  	// Name: Output only. The API resource name in the format
   743  	// `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. Assigned by the server.
   744  	Name string `json:"name,omitempty"`
   745  
   746  	// ServerResponse contains the HTTP response code and headers from the server.
   747  	googleapi.ServerResponse `json:"-"`
   748  	// ForceSendFields is a list of field names (e.g. "Claims") to unconditionally
   749  	// include in API requests. By default, fields with empty or default values are
   750  	// omitted from API requests. See
   751  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   752  	// details.
   753  	ForceSendFields []string `json:"-"`
   754  	// NullFields is a list of field names (e.g. "Claims") to include in API
   755  	// requests with the JSON null value. By default, fields with empty values are
   756  	// omitted from API requests. See
   757  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   758  	NullFields []string `json:"-"`
   759  }
   760  
   761  func (s *Device) MarshalJSON() ([]byte, error) {
   762  	type NoMethod Device
   763  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   764  }
   765  
   766  // DeviceClaim: A record of a device claimed by a reseller for a customer.
   767  // Devices claimed for zero-touch enrollment have a claim with the type
   768  // `SECTION_TYPE_ZERO_TOUCH`. To learn more, read Claim devices for customers
   769  // (/zero-touch/guides/how-it-works#claim).
   770  type DeviceClaim struct {
   771  	// AdditionalService: The Additional service registered for the device.
   772  	//
   773  	// Possible values:
   774  	//   "ADDITIONAL_SERVICE_UNSPECIFIED" - No additional service.
   775  	//   "DEVICE_PROTECTION" - Device protection service, also known as Android
   776  	// Enterprise Essentials. To claim a device with the device protection service
   777  	// you must enroll with the partnership team.
   778  	AdditionalService string `json:"additionalService,omitempty"`
   779  	// GoogleWorkspaceCustomerId: The ID of the Google Workspace account that owns
   780  	// the Chrome OS device.
   781  	GoogleWorkspaceCustomerId string `json:"googleWorkspaceCustomerId,omitempty"`
   782  	// OwnerCompanyId: The ID of the Customer that purchased the device.
   783  	OwnerCompanyId int64 `json:"ownerCompanyId,omitempty,string"`
   784  	// ResellerId: The ID of the reseller that claimed the device.
   785  	ResellerId int64 `json:"resellerId,omitempty,string"`
   786  	// SectionType: Output only. The type of claim made on the device.
   787  	//
   788  	// Possible values:
   789  	//   "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
   790  	//   "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
   791  	//   "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
   792  	SectionType string `json:"sectionType,omitempty"`
   793  	// VacationModeExpireTime: The timestamp when the device will exit ‘vacation
   794  	// mode’. This value is present iff the device is in 'vacation mode'.
   795  	VacationModeExpireTime string `json:"vacationModeExpireTime,omitempty"`
   796  	// VacationModeStartTime: The timestamp when the device was put into
   797  	// ‘vacation mode’. This value is present iff the device is in 'vacation
   798  	// mode'.
   799  	VacationModeStartTime string `json:"vacationModeStartTime,omitempty"`
   800  	// ForceSendFields is a list of field names (e.g. "AdditionalService") to
   801  	// unconditionally include in API requests. By default, fields with empty or
   802  	// default values are omitted from API requests. See
   803  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   804  	// details.
   805  	ForceSendFields []string `json:"-"`
   806  	// NullFields is a list of field names (e.g. "AdditionalService") to include in
   807  	// API requests with the JSON null value. By default, fields with empty values
   808  	// are omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   810  	NullFields []string `json:"-"`
   811  }
   812  
   813  func (s *DeviceClaim) MarshalJSON() ([]byte, error) {
   814  	type NoMethod DeviceClaim
   815  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   816  }
   817  
   818  // DeviceIdentifier: Encapsulates hardware and product IDs to identify a
   819  // manufactured device. To understand requirements on identifier sets, read
   820  // Identifiers (https://developers.google.com/zero-touch/guides/identifiers).
   821  type DeviceIdentifier struct {
   822  	// ChromeOsAttestedDeviceId: An identifier provided by OEMs, carried through
   823  	// the production and sales process. Only applicable to Chrome OS devices.
   824  	ChromeOsAttestedDeviceId string `json:"chromeOsAttestedDeviceId,omitempty"`
   825  	// DeviceType: The type of the device
   826  	//
   827  	// Possible values:
   828  	//   "DEVICE_TYPE_UNSPECIFIED" - Device type is not specified.
   829  	//   "DEVICE_TYPE_ANDROID" - Android device
   830  	//   "DEVICE_TYPE_CHROME_OS" - Chrome OS device
   831  	DeviceType string `json:"deviceType,omitempty"`
   832  	// Imei: The device’s IMEI number. Validated on input.
   833  	Imei string `json:"imei,omitempty"`
   834  	// Manufacturer: The device manufacturer’s name. Matches the device's
   835  	// built-in value returned from `android.os.Build.MANUFACTURER`. Allowed values
   836  	// are listed in Android manufacturers
   837  	// (/zero-touch/resources/manufacturer-names#manufacturers-names).
   838  	Manufacturer string `json:"manufacturer,omitempty"`
   839  	// Meid: The device’s MEID number.
   840  	Meid string `json:"meid,omitempty"`
   841  	// Model: The device model's name. Allowed values are listed in Android models
   842  	// (/zero-touch/resources/manufacturer-names#model-names) and Chrome OS models
   843  	// (https://support.google.com/chrome/a/answer/10130175#identify_compatible).
   844  	Model string `json:"model,omitempty"`
   845  	// SerialNumber: The manufacturer's serial number for the device. This value
   846  	// might not be unique across different device models.
   847  	SerialNumber string `json:"serialNumber,omitempty"`
   848  	// ForceSendFields is a list of field names (e.g. "ChromeOsAttestedDeviceId")
   849  	// to unconditionally include in API requests. By default, fields with empty or
   850  	// default values are omitted from API requests. See
   851  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   852  	// details.
   853  	ForceSendFields []string `json:"-"`
   854  	// NullFields is a list of field names (e.g. "ChromeOsAttestedDeviceId") to
   855  	// include in API requests with the JSON null value. By default, fields with
   856  	// empty values are omitted from API requests. See
   857  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   858  	NullFields []string `json:"-"`
   859  }
   860  
   861  func (s *DeviceIdentifier) MarshalJSON() ([]byte, error) {
   862  	type NoMethod DeviceIdentifier
   863  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   864  }
   865  
   866  // DeviceMetadata: Metadata entries that can be attached to a `Device`. To
   867  // learn more, read Device metadata
   868  // (https://developers.google.com/zero-touch/guides/metadata).
   869  type DeviceMetadata struct {
   870  	// Entries: Metadata entries recorded as key-value pairs.
   871  	Entries map[string]string `json:"entries,omitempty"`
   872  
   873  	// ServerResponse contains the HTTP response code and headers from the server.
   874  	googleapi.ServerResponse `json:"-"`
   875  	// ForceSendFields is a list of field names (e.g. "Entries") to unconditionally
   876  	// include in API requests. By default, fields with empty or default values are
   877  	// omitted from API requests. See
   878  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   879  	// details.
   880  	ForceSendFields []string `json:"-"`
   881  	// NullFields is a list of field names (e.g. "Entries") to include in API
   882  	// requests with the JSON null value. By default, fields with empty values are
   883  	// omitted from API requests. See
   884  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   885  	NullFields []string `json:"-"`
   886  }
   887  
   888  func (s *DeviceMetadata) MarshalJSON() ([]byte, error) {
   889  	type NoMethod DeviceMetadata
   890  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   891  }
   892  
   893  // DeviceReference: A `DeviceReference` is an API abstraction that lets you
   894  // supply a _device_ argument to a method using one of the following identifier
   895  // types: * A numeric API resource ID. * Real-world hardware IDs, such as IMEI
   896  // number, belonging to the manufactured device. Methods that operate on
   897  // devices take a `DeviceReference` as a parameter type because it's more
   898  // flexible for the caller. To learn more about device identifiers, read
   899  // Identifiers (https://developers.google.com/zero-touch/guides/identifiers).
   900  type DeviceReference struct {
   901  	// DeviceId: The ID of the device.
   902  	DeviceId int64 `json:"deviceId,omitempty,string"`
   903  	// DeviceIdentifier: The hardware IDs of the device.
   904  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
   905  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
   906  	// unconditionally include in API requests. By default, fields with empty or
   907  	// default values are omitted from API requests. See
   908  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   909  	// details.
   910  	ForceSendFields []string `json:"-"`
   911  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
   912  	// requests with the JSON null value. By default, fields with empty values are
   913  	// omitted from API requests. See
   914  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   915  	NullFields []string `json:"-"`
   916  }
   917  
   918  func (s *DeviceReference) MarshalJSON() ([]byte, error) {
   919  	type NoMethod DeviceReference
   920  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   921  }
   922  
   923  // DevicesLongRunningOperationMetadata: Tracks the status of a long-running
   924  // operation to asynchronously update a batch of reseller metadata attached to
   925  // devices. To learn more, read Long‑running batch operations
   926  // (/zero-touch/guides/how-it-works#operations).
   927  type DevicesLongRunningOperationMetadata struct {
   928  	// DevicesCount: The number of metadata updates in the operation. This might be
   929  	// different from the number of updates in the request if the API can't parse
   930  	// some of the updates.
   931  	DevicesCount int64 `json:"devicesCount,omitempty"`
   932  	// ProcessingStatus: The processing status of the operation.
   933  	//
   934  	// Possible values:
   935  	//   "BATCH_PROCESS_STATUS_UNSPECIFIED" - Invalid code. Shouldn't be used.
   936  	//   "BATCH_PROCESS_PENDING" - Pending.
   937  	//   "BATCH_PROCESS_IN_PROGRESS" - In progress.
   938  	//   "BATCH_PROCESS_PROCESSED" - Processed. This doesn't mean all items were
   939  	// processed successfully, you should check the `response` field for the result
   940  	// of every item.
   941  	ProcessingStatus string `json:"processingStatus,omitempty"`
   942  	// Progress: The processing progress of the operation. Measured as a number
   943  	// from 0 to 100. A value of 10O doesn't always mean the operation
   944  	// completed—check for the inclusion of a `done` field.
   945  	Progress int64 `json:"progress,omitempty"`
   946  	// ForceSendFields is a list of field names (e.g. "DevicesCount") to
   947  	// unconditionally include in API requests. By default, fields with empty or
   948  	// default values are omitted from API requests. See
   949  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   950  	// details.
   951  	ForceSendFields []string `json:"-"`
   952  	// NullFields is a list of field names (e.g. "DevicesCount") to include in API
   953  	// requests with the JSON null value. By default, fields with empty values are
   954  	// omitted from API requests. See
   955  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   956  	NullFields []string `json:"-"`
   957  }
   958  
   959  func (s *DevicesLongRunningOperationMetadata) MarshalJSON() ([]byte, error) {
   960  	type NoMethod DevicesLongRunningOperationMetadata
   961  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   962  }
   963  
   964  // DevicesLongRunningOperationResponse: Tracks the status of a long-running
   965  // operation to claim, unclaim, or attach metadata to devices. To learn more,
   966  // read Long‑running batch operations
   967  // (/zero-touch/guides/how-it-works#operations).
   968  type DevicesLongRunningOperationResponse struct {
   969  	// PerDeviceStatus: The processing status for each device in the operation. One
   970  	// `PerDeviceStatus` per device. The list order matches the items in the
   971  	// original request.
   972  	PerDeviceStatus []*OperationPerDevice `json:"perDeviceStatus,omitempty"`
   973  	// SuccessCount: A summary of how many items in the operation the server
   974  	// processed successfully. Updated as the operation progresses.
   975  	SuccessCount int64 `json:"successCount,omitempty"`
   976  	// ForceSendFields is a list of field names (e.g. "PerDeviceStatus") to
   977  	// unconditionally include in API requests. By default, fields with empty or
   978  	// default values are omitted from API requests. See
   979  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   980  	// details.
   981  	ForceSendFields []string `json:"-"`
   982  	// NullFields is a list of field names (e.g. "PerDeviceStatus") to include in
   983  	// API requests with the JSON null value. By default, fields with empty values
   984  	// are omitted from API requests. See
   985  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   986  	NullFields []string `json:"-"`
   987  }
   988  
   989  func (s *DevicesLongRunningOperationResponse) MarshalJSON() ([]byte, error) {
   990  	type NoMethod DevicesLongRunningOperationResponse
   991  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   992  }
   993  
   994  // Dpc: An EMM's DPC (device policy controller
   995  // (http://developer.android.com/work/dpc/build-dpc.html)). Zero-touch
   996  // enrollment installs a DPC (listed in the `Configuration`) on a device to
   997  // maintain the customer's mobile policies. All the DPCs listed by the API
   998  // support zero-touch enrollment and are available in Google Play.
   999  type Dpc struct {
  1000  	// DpcName: Output only. The title of the DPC app in Google Play. For example,
  1001  	// _Google Apps Device Policy_. Useful in an application's user interface.
  1002  	DpcName string `json:"dpcName,omitempty"`
  1003  	// Name: Output only. The API resource name in the format
  1004  	// `customers/[CUSTOMER_ID]/dpcs/[DPC_ID]`. Assigned by the server. To maintain
  1005  	// a reference to a DPC across customer accounts, persist and match the last
  1006  	// path component (`DPC_ID`).
  1007  	Name string `json:"name,omitempty"`
  1008  	// PackageName: Output only. The DPC's Android application ID that looks like a
  1009  	// Java package name. Zero-touch enrollment installs the DPC app onto a device
  1010  	// using this identifier.
  1011  	PackageName string `json:"packageName,omitempty"`
  1012  	// ForceSendFields is a list of field names (e.g. "DpcName") to unconditionally
  1013  	// include in API requests. By default, fields with empty or default values are
  1014  	// omitted from API requests. See
  1015  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1016  	// details.
  1017  	ForceSendFields []string `json:"-"`
  1018  	// NullFields is a list of field names (e.g. "DpcName") to include in API
  1019  	// requests with the JSON null value. By default, fields with empty values are
  1020  	// omitted from API requests. See
  1021  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1022  	NullFields []string `json:"-"`
  1023  }
  1024  
  1025  func (s *Dpc) MarshalJSON() ([]byte, error) {
  1026  	type NoMethod Dpc
  1027  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1028  }
  1029  
  1030  // Empty: A generic empty message that you can re-use to avoid defining
  1031  // duplicated empty messages in your APIs. A typical example is to use it as
  1032  // the request or the response type of an API method. For instance: service Foo
  1033  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1034  type Empty struct {
  1035  	// ServerResponse contains the HTTP response code and headers from the server.
  1036  	googleapi.ServerResponse `json:"-"`
  1037  }
  1038  
  1039  // FindDevicesByDeviceIdentifierRequest: Request to find devices.
  1040  type FindDevicesByDeviceIdentifierRequest struct {
  1041  	// DeviceIdentifier: Required. Required. The device identifier to search for.
  1042  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
  1043  	// Limit: Required. The maximum number of devices to show in a page of results.
  1044  	// Must be between 1 and 100 inclusive.
  1045  	Limit int64 `json:"limit,omitempty,string"`
  1046  	// PageToken: A token specifying which result page to return.
  1047  	PageToken string `json:"pageToken,omitempty"`
  1048  	// ForceSendFields is a list of field names (e.g. "DeviceIdentifier") to
  1049  	// unconditionally include in API requests. By default, fields with empty or
  1050  	// default values are omitted from API requests. See
  1051  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1052  	// details.
  1053  	ForceSendFields []string `json:"-"`
  1054  	// NullFields is a list of field names (e.g. "DeviceIdentifier") to include in
  1055  	// API requests with the JSON null value. By default, fields with empty values
  1056  	// are omitted from API requests. See
  1057  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1058  	NullFields []string `json:"-"`
  1059  }
  1060  
  1061  func (s *FindDevicesByDeviceIdentifierRequest) MarshalJSON() ([]byte, error) {
  1062  	type NoMethod FindDevicesByDeviceIdentifierRequest
  1063  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1064  }
  1065  
  1066  // FindDevicesByDeviceIdentifierResponse: Response containing found devices.
  1067  type FindDevicesByDeviceIdentifierResponse struct {
  1068  	// Devices: Found devices.
  1069  	Devices []*Device `json:"devices,omitempty"`
  1070  	// NextPageToken: A token used to access the next page of results. Omitted if
  1071  	// no further results are available.
  1072  	NextPageToken string `json:"nextPageToken,omitempty"`
  1073  	// TotalSize: The total count of items in the list irrespective of pagination.
  1074  	TotalSize int64 `json:"totalSize,omitempty"`
  1075  
  1076  	// ServerResponse contains the HTTP response code and headers from the server.
  1077  	googleapi.ServerResponse `json:"-"`
  1078  	// ForceSendFields is a list of field names (e.g. "Devices") to unconditionally
  1079  	// include in API requests. By default, fields with empty or default values are
  1080  	// omitted from API requests. See
  1081  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1082  	// details.
  1083  	ForceSendFields []string `json:"-"`
  1084  	// NullFields is a list of field names (e.g. "Devices") to include in API
  1085  	// requests with the JSON null value. By default, fields with empty values are
  1086  	// omitted from API requests. See
  1087  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1088  	NullFields []string `json:"-"`
  1089  }
  1090  
  1091  func (s *FindDevicesByDeviceIdentifierResponse) MarshalJSON() ([]byte, error) {
  1092  	type NoMethod FindDevicesByDeviceIdentifierResponse
  1093  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1094  }
  1095  
  1096  // FindDevicesByOwnerRequest: Request to find devices by customers.
  1097  type FindDevicesByOwnerRequest struct {
  1098  	// CustomerId: The list of customer IDs to search for.
  1099  	CustomerId googleapi.Int64s `json:"customerId,omitempty"`
  1100  	// GoogleWorkspaceCustomerId: The list of IDs of Google Workspace accounts to
  1101  	// search for.
  1102  	GoogleWorkspaceCustomerId []string `json:"googleWorkspaceCustomerId,omitempty"`
  1103  	// Limit: Required. The maximum number of devices to show in a page of results.
  1104  	// Must be between 1 and 100 inclusive.
  1105  	Limit int64 `json:"limit,omitempty,string"`
  1106  	// PageToken: A token specifying which result page to return.
  1107  	PageToken string `json:"pageToken,omitempty"`
  1108  	// SectionType: Required. The section type of the device's provisioning record.
  1109  	//
  1110  	// Possible values:
  1111  	//   "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
  1112  	//   "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
  1113  	//   "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
  1114  	SectionType string `json:"sectionType,omitempty"`
  1115  	// ForceSendFields is a list of field names (e.g. "CustomerId") to
  1116  	// unconditionally include in API requests. By default, fields with empty or
  1117  	// default values are omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1119  	// details.
  1120  	ForceSendFields []string `json:"-"`
  1121  	// NullFields is a list of field names (e.g. "CustomerId") to include in API
  1122  	// requests with the JSON null value. By default, fields with empty values are
  1123  	// omitted from API requests. See
  1124  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1125  	NullFields []string `json:"-"`
  1126  }
  1127  
  1128  func (s *FindDevicesByOwnerRequest) MarshalJSON() ([]byte, error) {
  1129  	type NoMethod FindDevicesByOwnerRequest
  1130  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1131  }
  1132  
  1133  // FindDevicesByOwnerResponse: Response containing found devices.
  1134  type FindDevicesByOwnerResponse struct {
  1135  	// Devices: The customer's devices.
  1136  	Devices []*Device `json:"devices,omitempty"`
  1137  	// NextPageToken: A token used to access the next page of results. Omitted if
  1138  	// no further results are available.
  1139  	NextPageToken string `json:"nextPageToken,omitempty"`
  1140  	// TotalSize: The total count of items in the list irrespective of pagination.
  1141  	TotalSize int64 `json:"totalSize,omitempty"`
  1142  
  1143  	// ServerResponse contains the HTTP response code and headers from the server.
  1144  	googleapi.ServerResponse `json:"-"`
  1145  	// ForceSendFields is a list of field names (e.g. "Devices") to unconditionally
  1146  	// include in API requests. By default, fields with empty or default values are
  1147  	// omitted from API requests. See
  1148  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1149  	// details.
  1150  	ForceSendFields []string `json:"-"`
  1151  	// NullFields is a list of field names (e.g. "Devices") to include in API
  1152  	// requests with the JSON null value. By default, fields with empty values are
  1153  	// omitted from API requests. See
  1154  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1155  	NullFields []string `json:"-"`
  1156  }
  1157  
  1158  func (s *FindDevicesByOwnerResponse) MarshalJSON() ([]byte, error) {
  1159  	type NoMethod FindDevicesByOwnerResponse
  1160  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1161  }
  1162  
  1163  // GetDeviceSimLockStateRequest: Request to get a device's SIM lock status.
  1164  type GetDeviceSimLockStateRequest struct {
  1165  	// DeviceIdentifier: Required. Required. The device identifier to search for.
  1166  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
  1167  	// ForceSendFields is a list of field names (e.g. "DeviceIdentifier") to
  1168  	// unconditionally include in API requests. By default, fields with empty or
  1169  	// default values are omitted from API requests. See
  1170  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1171  	// details.
  1172  	ForceSendFields []string `json:"-"`
  1173  	// NullFields is a list of field names (e.g. "DeviceIdentifier") to include in
  1174  	// API requests with the JSON null value. By default, fields with empty values
  1175  	// are omitted from API requests. See
  1176  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1177  	NullFields []string `json:"-"`
  1178  }
  1179  
  1180  func (s *GetDeviceSimLockStateRequest) MarshalJSON() ([]byte, error) {
  1181  	type NoMethod GetDeviceSimLockStateRequest
  1182  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1183  }
  1184  
  1185  // GetDeviceSimLockStateResponse: Response containing a device's SimLock state.
  1186  type GetDeviceSimLockStateResponse struct {
  1187  	// Possible values:
  1188  	//   "SIM_LOCK_STATE_UNSPECIFIED" - Invalid code. Shouldn't be used.
  1189  	//   "UNLOCKED" - Device is not SIM locked.
  1190  	//   "LOCKED_TO_PARTNER" - Device is SIM locked to the partner querying SIM
  1191  	// lock state.
  1192  	//   "LOCKED_TO_OTHER_PARTNER" - Device is SIM locked to a different partner.
  1193  	SimLockState string `json:"simLockState,omitempty"`
  1194  
  1195  	// ServerResponse contains the HTTP response code and headers from the server.
  1196  	googleapi.ServerResponse `json:"-"`
  1197  	// ForceSendFields is a list of field names (e.g. "SimLockState") to
  1198  	// unconditionally include in API requests. By default, fields with empty or
  1199  	// default values are omitted from API requests. See
  1200  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1201  	// details.
  1202  	ForceSendFields []string `json:"-"`
  1203  	// NullFields is a list of field names (e.g. "SimLockState") to include in API
  1204  	// requests with the JSON null value. By default, fields with empty values are
  1205  	// omitted from API requests. See
  1206  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1207  	NullFields []string `json:"-"`
  1208  }
  1209  
  1210  func (s *GetDeviceSimLockStateResponse) MarshalJSON() ([]byte, error) {
  1211  	type NoMethod GetDeviceSimLockStateResponse
  1212  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1213  }
  1214  
  1215  // GoogleWorkspaceAccount: A Google Workspace customer.
  1216  type GoogleWorkspaceAccount struct {
  1217  	// CustomerId: Required. The customer ID.
  1218  	CustomerId string `json:"customerId,omitempty"`
  1219  	// PreProvisioningTokens: Output only. The pre-provisioning tokens previously
  1220  	// used to claim devices.
  1221  	PreProvisioningTokens []string `json:"preProvisioningTokens,omitempty"`
  1222  	// ForceSendFields is a list of field names (e.g. "CustomerId") to
  1223  	// unconditionally include in API requests. By default, fields with empty or
  1224  	// default values are omitted from API requests. See
  1225  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1226  	// details.
  1227  	ForceSendFields []string `json:"-"`
  1228  	// NullFields is a list of field names (e.g. "CustomerId") to include in API
  1229  	// requests with the JSON null value. By default, fields with empty values are
  1230  	// omitted from API requests. See
  1231  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1232  	NullFields []string `json:"-"`
  1233  }
  1234  
  1235  func (s *GoogleWorkspaceAccount) MarshalJSON() ([]byte, error) {
  1236  	type NoMethod GoogleWorkspaceAccount
  1237  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1238  }
  1239  
  1240  // ListCustomersResponse: Response message of all customers related to this
  1241  // partner.
  1242  type ListCustomersResponse struct {
  1243  	// Customers: List of customers related to this reseller partner.
  1244  	Customers []*Company `json:"customers,omitempty"`
  1245  	// NextPageToken: A token to retrieve the next page of results. Omitted if no
  1246  	// further results are available.
  1247  	NextPageToken string `json:"nextPageToken,omitempty"`
  1248  	// TotalSize: The total count of items in the list irrespective of pagination.
  1249  	TotalSize int64 `json:"totalSize,omitempty"`
  1250  
  1251  	// ServerResponse contains the HTTP response code and headers from the server.
  1252  	googleapi.ServerResponse `json:"-"`
  1253  	// ForceSendFields is a list of field names (e.g. "Customers") to
  1254  	// unconditionally include in API requests. By default, fields with empty or
  1255  	// default values are omitted from API requests. See
  1256  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1257  	// details.
  1258  	ForceSendFields []string `json:"-"`
  1259  	// NullFields is a list of field names (e.g. "Customers") to include in API
  1260  	// requests with the JSON null value. By default, fields with empty values are
  1261  	// omitted from API requests. See
  1262  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1263  	NullFields []string `json:"-"`
  1264  }
  1265  
  1266  func (s *ListCustomersResponse) MarshalJSON() ([]byte, error) {
  1267  	type NoMethod ListCustomersResponse
  1268  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1269  }
  1270  
  1271  // ListVendorCustomersResponse: Response message to list customers of the
  1272  // vendor.
  1273  type ListVendorCustomersResponse struct {
  1274  	// Customers: List of customers of the vendor.
  1275  	Customers []*Company `json:"customers,omitempty"`
  1276  	// NextPageToken: A token to retrieve the next page of results. Omitted if no
  1277  	// further results are available.
  1278  	NextPageToken string `json:"nextPageToken,omitempty"`
  1279  	// TotalSize: The total count of items in the list irrespective of pagination.
  1280  	TotalSize int64 `json:"totalSize,omitempty"`
  1281  
  1282  	// ServerResponse contains the HTTP response code and headers from the server.
  1283  	googleapi.ServerResponse `json:"-"`
  1284  	// ForceSendFields is a list of field names (e.g. "Customers") to
  1285  	// unconditionally include in API requests. By default, fields with empty or
  1286  	// default values are omitted from API requests. See
  1287  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1288  	// details.
  1289  	ForceSendFields []string `json:"-"`
  1290  	// NullFields is a list of field names (e.g. "Customers") to include in API
  1291  	// requests with the JSON null value. By default, fields with empty values are
  1292  	// omitted from API requests. See
  1293  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1294  	NullFields []string `json:"-"`
  1295  }
  1296  
  1297  func (s *ListVendorCustomersResponse) MarshalJSON() ([]byte, error) {
  1298  	type NoMethod ListVendorCustomersResponse
  1299  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1300  }
  1301  
  1302  // ListVendorsResponse: Response message to list vendors of the partner.
  1303  type ListVendorsResponse struct {
  1304  	// NextPageToken: A token to retrieve the next page of results. Omitted if no
  1305  	// further results are available.
  1306  	NextPageToken string `json:"nextPageToken,omitempty"`
  1307  	// TotalSize: The total count of items in the list irrespective of pagination.
  1308  	TotalSize int64 `json:"totalSize,omitempty"`
  1309  	// Vendors: List of vendors of the reseller partner. Fields `name`, `companyId`
  1310  	// and `companyName` are populated to the Company object.
  1311  	Vendors []*Company `json:"vendors,omitempty"`
  1312  
  1313  	// ServerResponse contains the HTTP response code and headers from the server.
  1314  	googleapi.ServerResponse `json:"-"`
  1315  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1316  	// unconditionally include in API requests. By default, fields with empty or
  1317  	// default values are omitted from API requests. See
  1318  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1319  	// details.
  1320  	ForceSendFields []string `json:"-"`
  1321  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1322  	// requests with the JSON null value. By default, fields with empty values are
  1323  	// omitted from API requests. See
  1324  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1325  	NullFields []string `json:"-"`
  1326  }
  1327  
  1328  func (s *ListVendorsResponse) MarshalJSON() ([]byte, error) {
  1329  	type NoMethod ListVendorsResponse
  1330  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1331  }
  1332  
  1333  // Operation: This resource represents a long-running operation that is the
  1334  // result of a network API call.
  1335  type Operation struct {
  1336  	// Done: If the value is `false`, it means the operation is still in progress.
  1337  	// If `true`, the operation is completed, and either `error` or `response` is
  1338  	// available.
  1339  	Done bool `json:"done,omitempty"`
  1340  	// Error: This field will always be not set if the operation is created by
  1341  	// `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, error
  1342  	// information for each device is set in
  1343  	// `response.perDeviceStatus.result.status`.
  1344  	Error *Status `json:"error,omitempty"`
  1345  	// Metadata: This field will contain a `DevicesLongRunningOperationMetadata`
  1346  	// object if the operation is created by `claimAsync`, `unclaimAsync`, or
  1347  	// `updateMetadataAsync`.
  1348  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1349  	// Name: The server-assigned name, which is only unique within the same service
  1350  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1351  	// should be a resource name ending with `operations/{unique_id}`.
  1352  	Name string `json:"name,omitempty"`
  1353  	// Response: This field will contain a `DevicesLongRunningOperationResponse`
  1354  	// object if the operation is created by `claimAsync`, `unclaimAsync`, or
  1355  	// `updateMetadataAsync`.
  1356  	Response googleapi.RawMessage `json:"response,omitempty"`
  1357  
  1358  	// ServerResponse contains the HTTP response code and headers from the server.
  1359  	googleapi.ServerResponse `json:"-"`
  1360  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1361  	// include in API requests. By default, fields with empty or default values are
  1362  	// omitted from API requests. See
  1363  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1364  	// details.
  1365  	ForceSendFields []string `json:"-"`
  1366  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1367  	// with the JSON null value. By default, fields with empty values are omitted
  1368  	// from API requests. See
  1369  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1370  	NullFields []string `json:"-"`
  1371  }
  1372  
  1373  func (s *Operation) MarshalJSON() ([]byte, error) {
  1374  	type NoMethod Operation
  1375  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1376  }
  1377  
  1378  // OperationPerDevice: A task for each device in the operation. Corresponds to
  1379  // each device change in the request.
  1380  type OperationPerDevice struct {
  1381  	// Claim: A copy of the original device-claim request received by the server.
  1382  	Claim *PartnerClaim `json:"claim,omitempty"`
  1383  	// Result: The processing result for each device.
  1384  	Result *PerDeviceStatusInBatch `json:"result,omitempty"`
  1385  	// Unclaim: A copy of the original device-unclaim request received by the
  1386  	// server.
  1387  	Unclaim *PartnerUnclaim `json:"unclaim,omitempty"`
  1388  	// UpdateMetadata: A copy of the original metadata-update request received by
  1389  	// the server.
  1390  	UpdateMetadata *UpdateMetadataArguments `json:"updateMetadata,omitempty"`
  1391  	// ForceSendFields is a list of field names (e.g. "Claim") to unconditionally
  1392  	// include in API requests. By default, fields with empty or default values are
  1393  	// omitted from API requests. See
  1394  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1395  	// details.
  1396  	ForceSendFields []string `json:"-"`
  1397  	// NullFields is a list of field names (e.g. "Claim") to include in API
  1398  	// requests with the JSON null value. By default, fields with empty values are
  1399  	// omitted from API requests. See
  1400  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1401  	NullFields []string `json:"-"`
  1402  }
  1403  
  1404  func (s *OperationPerDevice) MarshalJSON() ([]byte, error) {
  1405  	type NoMethod OperationPerDevice
  1406  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1407  }
  1408  
  1409  // PartnerClaim: Identifies one claim request.
  1410  type PartnerClaim struct {
  1411  	// ConfigurationId: Optional. The ID of the configuration applied to the device
  1412  	// section.
  1413  	ConfigurationId int64 `json:"configurationId,omitempty,string"`
  1414  	// CustomerId: The ID of the customer for whom the device is being claimed.
  1415  	CustomerId int64 `json:"customerId,omitempty,string"`
  1416  	// DeviceIdentifier: Required. Required. Device identifier of the device.
  1417  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
  1418  	// DeviceMetadata: Required. The metadata to attach to the device at claim.
  1419  	DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
  1420  	// GoogleWorkspaceCustomerId: The Google Workspace customer ID.
  1421  	GoogleWorkspaceCustomerId string `json:"googleWorkspaceCustomerId,omitempty"`
  1422  	// PreProvisioningToken: Optional. Must and can only be set for Chrome OS
  1423  	// devices.
  1424  	PreProvisioningToken string `json:"preProvisioningToken,omitempty"`
  1425  	// SectionType: Required. The section type of the device's provisioning record.
  1426  	//
  1427  	// Possible values:
  1428  	//   "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
  1429  	//   "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
  1430  	//   "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
  1431  	SectionType string `json:"sectionType,omitempty"`
  1432  	// SimlockProfileId: Optional. Must and can only be set when
  1433  	// DeviceProvisioningSectionType is SECTION_TYPE_SIM_LOCK. The unique
  1434  	// identifier of the SimLock profile.
  1435  	SimlockProfileId int64 `json:"simlockProfileId,omitempty,string"`
  1436  	// ForceSendFields is a list of field names (e.g. "ConfigurationId") to
  1437  	// unconditionally include in API requests. By default, fields with empty or
  1438  	// default values are omitted from API requests. See
  1439  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1440  	// details.
  1441  	ForceSendFields []string `json:"-"`
  1442  	// NullFields is a list of field names (e.g. "ConfigurationId") to include in
  1443  	// API requests with the JSON null value. By default, fields with empty values
  1444  	// are omitted from API requests. See
  1445  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1446  	NullFields []string `json:"-"`
  1447  }
  1448  
  1449  func (s *PartnerClaim) MarshalJSON() ([]byte, error) {
  1450  	type NoMethod PartnerClaim
  1451  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1452  }
  1453  
  1454  // PartnerUnclaim: Identifies one unclaim request.
  1455  type PartnerUnclaim struct {
  1456  	// DeviceId: Required. Device ID of the device.
  1457  	DeviceId int64 `json:"deviceId,omitempty,string"`
  1458  	// DeviceIdentifier: Required. Device identifier of the device.
  1459  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
  1460  	// SectionType: Required. The section type of the device's provisioning record.
  1461  	//
  1462  	// Possible values:
  1463  	//   "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
  1464  	//   "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
  1465  	//   "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
  1466  	SectionType string `json:"sectionType,omitempty"`
  1467  	// VacationModeDays: Optional. The duration of the vacation unlock starting
  1468  	// from when the request is processed. (1 day is treated as 24 hours)
  1469  	VacationModeDays int64 `json:"vacationModeDays,omitempty"`
  1470  	// VacationModeExpireTime: Optional. The expiration time of the vacation
  1471  	// unlock.
  1472  	VacationModeExpireTime string `json:"vacationModeExpireTime,omitempty"`
  1473  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
  1474  	// unconditionally include in API requests. By default, fields with empty or
  1475  	// default values are omitted from API requests. See
  1476  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1477  	// details.
  1478  	ForceSendFields []string `json:"-"`
  1479  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
  1480  	// requests with the JSON null value. By default, fields with empty values are
  1481  	// omitted from API requests. See
  1482  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1483  	NullFields []string `json:"-"`
  1484  }
  1485  
  1486  func (s *PartnerUnclaim) MarshalJSON() ([]byte, error) {
  1487  	type NoMethod PartnerUnclaim
  1488  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1489  }
  1490  
  1491  // PerDeviceStatusInBatch: Captures the processing status for each device in
  1492  // the operation.
  1493  type PerDeviceStatusInBatch struct {
  1494  	// DeviceId: If processing succeeds, the device ID of the device.
  1495  	DeviceId int64 `json:"deviceId,omitempty,string"`
  1496  	// ErrorIdentifier: If processing fails, the error type.
  1497  	ErrorIdentifier string `json:"errorIdentifier,omitempty"`
  1498  	// ErrorMessage: If processing fails, a developer message explaining what went
  1499  	// wrong.
  1500  	ErrorMessage string `json:"errorMessage,omitempty"`
  1501  	// Status: The result status of the device after processing.
  1502  	//
  1503  	// Possible values:
  1504  	//   "SINGLE_DEVICE_STATUS_UNSPECIFIED" - Invalid code. Shouldn't be used.
  1505  	//   "SINGLE_DEVICE_STATUS_UNKNOWN_ERROR" - Unknown error. We don't expect this
  1506  	// error to occur here.
  1507  	//   "SINGLE_DEVICE_STATUS_OTHER_ERROR" - Other error. We know/expect this
  1508  	// error, but there's no defined error code for the error.
  1509  	//   "SINGLE_DEVICE_STATUS_SUCCESS" - Success.
  1510  	//   "SINGLE_DEVICE_STATUS_PERMISSION_DENIED" - Permission denied.
  1511  	//   "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER" - Invalid device
  1512  	// identifier.
  1513  	//   "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE" - Invalid section type.
  1514  	//   "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" - This section is claimed by
  1515  	// another company.
  1516  	//   "SINGLE_DEVICE_STATUS_INVALID_TOKEN" - Invalid pre-provisioning token.
  1517  	//   "SINGLE_DEVICE_STATUS_REVOKED_TOKEN" - Revoked pre-provisioning token.
  1518  	//   "SINGLE_DEVICE_STATUS_DEVICE_LIMIT_EXCEEDED" - Status used to indicate a
  1519  	// failure due to a device limit being exceeded
  1520  	Status string `json:"status,omitempty"`
  1521  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
  1522  	// unconditionally include in API requests. By default, fields with empty or
  1523  	// default values are omitted from API requests. See
  1524  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1525  	// details.
  1526  	ForceSendFields []string `json:"-"`
  1527  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
  1528  	// requests with the JSON null value. By default, fields with empty values are
  1529  	// omitted from API requests. See
  1530  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1531  	NullFields []string `json:"-"`
  1532  }
  1533  
  1534  func (s *PerDeviceStatusInBatch) MarshalJSON() ([]byte, error) {
  1535  	type NoMethod PerDeviceStatusInBatch
  1536  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1537  }
  1538  
  1539  // Status: The `Status` type defines a logical error model that is suitable for
  1540  // different programming environments, including REST APIs and RPC APIs. It is
  1541  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1542  // pieces of data: error code, error message, and error details. You can find
  1543  // out more about this error model and how to work with it in the API Design
  1544  // Guide (https://cloud.google.com/apis/design/errors).
  1545  type Status struct {
  1546  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1547  	Code int64 `json:"code,omitempty"`
  1548  	// Details: A list of messages that carry the error details. There is a common
  1549  	// set of message types for APIs to use.
  1550  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1551  	// Message: A developer-facing error message, which should be in English. Any
  1552  	// user-facing error message should be localized and sent in the
  1553  	// google.rpc.Status.details field, or localized by the client.
  1554  	Message string `json:"message,omitempty"`
  1555  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1556  	// include in API requests. By default, fields with empty or default values are
  1557  	// omitted from API requests. See
  1558  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1559  	// details.
  1560  	ForceSendFields []string `json:"-"`
  1561  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1562  	// with the JSON null value. By default, fields with empty values are omitted
  1563  	// from API requests. See
  1564  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1565  	NullFields []string `json:"-"`
  1566  }
  1567  
  1568  func (s *Status) MarshalJSON() ([]byte, error) {
  1569  	type NoMethod Status
  1570  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1571  }
  1572  
  1573  // UnclaimDeviceRequest: Request message to unclaim a device.
  1574  type UnclaimDeviceRequest struct {
  1575  	// DeviceId: Required. The device ID returned by `ClaimDevice`.
  1576  	DeviceId int64 `json:"deviceId,omitempty,string"`
  1577  	// DeviceIdentifier: Required. The device identifier you used when you claimed
  1578  	// this device.
  1579  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
  1580  	// SectionType: Required. The section type of the device's provisioning record.
  1581  	//
  1582  	// Possible values:
  1583  	//   "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
  1584  	//   "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
  1585  	//   "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
  1586  	SectionType string `json:"sectionType,omitempty"`
  1587  	// VacationModeDays: The duration of the vacation unlock starting from when the
  1588  	// request is processed. (1 day is treated as 24 hours)
  1589  	VacationModeDays int64 `json:"vacationModeDays,omitempty"`
  1590  	// VacationModeExpireTime: The expiration time of the vacation unlock.
  1591  	VacationModeExpireTime string `json:"vacationModeExpireTime,omitempty"`
  1592  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
  1593  	// unconditionally include in API requests. By default, fields with empty or
  1594  	// default values are omitted from API requests. See
  1595  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1596  	// details.
  1597  	ForceSendFields []string `json:"-"`
  1598  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
  1599  	// requests with the JSON null value. By default, fields with empty values are
  1600  	// omitted from API requests. See
  1601  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1602  	NullFields []string `json:"-"`
  1603  }
  1604  
  1605  func (s *UnclaimDeviceRequest) MarshalJSON() ([]byte, error) {
  1606  	type NoMethod UnclaimDeviceRequest
  1607  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1608  }
  1609  
  1610  // UnclaimDevicesRequest: Request to unclaim devices asynchronously in batch.
  1611  type UnclaimDevicesRequest struct {
  1612  	// Unclaims: Required. The list of devices to unclaim.
  1613  	Unclaims []*PartnerUnclaim `json:"unclaims,omitempty"`
  1614  	// ForceSendFields is a list of field names (e.g. "Unclaims") to
  1615  	// unconditionally include in API requests. By default, fields with empty or
  1616  	// default values are omitted from API requests. See
  1617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1618  	// details.
  1619  	ForceSendFields []string `json:"-"`
  1620  	// NullFields is a list of field names (e.g. "Unclaims") to include in API
  1621  	// requests with the JSON null value. By default, fields with empty values are
  1622  	// omitted from API requests. See
  1623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1624  	NullFields []string `json:"-"`
  1625  }
  1626  
  1627  func (s *UnclaimDevicesRequest) MarshalJSON() ([]byte, error) {
  1628  	type NoMethod UnclaimDevicesRequest
  1629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1630  }
  1631  
  1632  // UpdateDeviceMetadataInBatchRequest: Request to update device metadata in
  1633  // batch.
  1634  type UpdateDeviceMetadataInBatchRequest struct {
  1635  	// Updates: Required. The list of metadata updates.
  1636  	Updates []*UpdateMetadataArguments `json:"updates,omitempty"`
  1637  	// ForceSendFields is a list of field names (e.g. "Updates") to unconditionally
  1638  	// include in API requests. By default, fields with empty or default values are
  1639  	// omitted from API requests. See
  1640  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1641  	// details.
  1642  	ForceSendFields []string `json:"-"`
  1643  	// NullFields is a list of field names (e.g. "Updates") to include in API
  1644  	// requests with the JSON null value. By default, fields with empty values are
  1645  	// omitted from API requests. See
  1646  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1647  	NullFields []string `json:"-"`
  1648  }
  1649  
  1650  func (s *UpdateDeviceMetadataInBatchRequest) MarshalJSON() ([]byte, error) {
  1651  	type NoMethod UpdateDeviceMetadataInBatchRequest
  1652  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1653  }
  1654  
  1655  // UpdateDeviceMetadataRequest: Request to set metadata for a device.
  1656  type UpdateDeviceMetadataRequest struct {
  1657  	// DeviceMetadata: Required. The metadata to attach to the device.
  1658  	DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
  1659  	// ForceSendFields is a list of field names (e.g. "DeviceMetadata") to
  1660  	// unconditionally include in API requests. By default, fields with empty or
  1661  	// default values are omitted from API requests. See
  1662  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1663  	// details.
  1664  	ForceSendFields []string `json:"-"`
  1665  	// NullFields is a list of field names (e.g. "DeviceMetadata") to include in
  1666  	// API requests with the JSON null value. By default, fields with empty values
  1667  	// are omitted from API requests. See
  1668  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1669  	NullFields []string `json:"-"`
  1670  }
  1671  
  1672  func (s *UpdateDeviceMetadataRequest) MarshalJSON() ([]byte, error) {
  1673  	type NoMethod UpdateDeviceMetadataRequest
  1674  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1675  }
  1676  
  1677  // UpdateMetadataArguments: Identifies metadata updates to one device.
  1678  type UpdateMetadataArguments struct {
  1679  	// DeviceId: Required. Device ID of the device.
  1680  	DeviceId int64 `json:"deviceId,omitempty,string"`
  1681  	// DeviceIdentifier: Required. Device identifier.
  1682  	DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
  1683  	// DeviceMetadata: Required. The metadata to update.
  1684  	DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
  1685  	// ForceSendFields is a list of field names (e.g. "DeviceId") to
  1686  	// unconditionally include in API requests. By default, fields with empty or
  1687  	// default values are omitted from API requests. See
  1688  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1689  	// details.
  1690  	ForceSendFields []string `json:"-"`
  1691  	// NullFields is a list of field names (e.g. "DeviceId") to include in API
  1692  	// requests with the JSON null value. By default, fields with empty values are
  1693  	// omitted from API requests. See
  1694  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1695  	NullFields []string `json:"-"`
  1696  }
  1697  
  1698  func (s *UpdateMetadataArguments) MarshalJSON() ([]byte, error) {
  1699  	type NoMethod UpdateMetadataArguments
  1700  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1701  }
  1702  
  1703  type CustomersListCall struct {
  1704  	s            *Service
  1705  	urlParams_   gensupport.URLParams
  1706  	ifNoneMatch_ string
  1707  	ctx_         context.Context
  1708  	header_      http.Header
  1709  }
  1710  
  1711  // List: Lists the user's customer accounts.
  1712  func (r *CustomersService) List() *CustomersListCall {
  1713  	c := &CustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1714  	return c
  1715  }
  1716  
  1717  // PageSize sets the optional parameter "pageSize": The maximum number of
  1718  // customers to show in a page of results. A number between 1 and 100
  1719  // (inclusive).
  1720  func (c *CustomersListCall) PageSize(pageSize int64) *CustomersListCall {
  1721  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1722  	return c
  1723  }
  1724  
  1725  // PageToken sets the optional parameter "pageToken": A token specifying which
  1726  // result page to return. This field has custom validations in
  1727  // ListCustomersRequestValidator
  1728  func (c *CustomersListCall) PageToken(pageToken string) *CustomersListCall {
  1729  	c.urlParams_.Set("pageToken", pageToken)
  1730  	return c
  1731  }
  1732  
  1733  // Fields allows partial responses to be retrieved. See
  1734  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1735  // details.
  1736  func (c *CustomersListCall) Fields(s ...googleapi.Field) *CustomersListCall {
  1737  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1738  	return c
  1739  }
  1740  
  1741  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1742  // object's ETag matches the given value. This is useful for getting updates
  1743  // only after the object has changed since the last request.
  1744  func (c *CustomersListCall) IfNoneMatch(entityTag string) *CustomersListCall {
  1745  	c.ifNoneMatch_ = entityTag
  1746  	return c
  1747  }
  1748  
  1749  // Context sets the context to be used in this call's Do method.
  1750  func (c *CustomersListCall) Context(ctx context.Context) *CustomersListCall {
  1751  	c.ctx_ = ctx
  1752  	return c
  1753  }
  1754  
  1755  // Header returns a http.Header that can be modified by the caller to add
  1756  // headers to the request.
  1757  func (c *CustomersListCall) Header() http.Header {
  1758  	if c.header_ == nil {
  1759  		c.header_ = make(http.Header)
  1760  	}
  1761  	return c.header_
  1762  }
  1763  
  1764  func (c *CustomersListCall) doRequest(alt string) (*http.Response, error) {
  1765  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1766  	if c.ifNoneMatch_ != "" {
  1767  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1768  	}
  1769  	var body io.Reader = nil
  1770  	c.urlParams_.Set("alt", alt)
  1771  	c.urlParams_.Set("prettyPrint", "false")
  1772  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customers")
  1773  	urls += "?" + c.urlParams_.Encode()
  1774  	req, err := http.NewRequest("GET", urls, body)
  1775  	if err != nil {
  1776  		return nil, err
  1777  	}
  1778  	req.Header = reqHeaders
  1779  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1780  }
  1781  
  1782  // Do executes the "androiddeviceprovisioning.customers.list" call.
  1783  // Any non-2xx status code is an error. Response headers are in either
  1784  // *CustomerListCustomersResponse.ServerResponse.Header or (if a response was
  1785  // returned at all) in error.(*googleapi.Error).Header. Use
  1786  // googleapi.IsNotModified to check whether the returned error was because
  1787  // http.StatusNotModified was returned.
  1788  func (c *CustomersListCall) Do(opts ...googleapi.CallOption) (*CustomerListCustomersResponse, error) {
  1789  	gensupport.SetOptions(c.urlParams_, opts...)
  1790  	res, err := c.doRequest("json")
  1791  	if res != nil && res.StatusCode == http.StatusNotModified {
  1792  		if res.Body != nil {
  1793  			res.Body.Close()
  1794  		}
  1795  		return nil, gensupport.WrapError(&googleapi.Error{
  1796  			Code:   res.StatusCode,
  1797  			Header: res.Header,
  1798  		})
  1799  	}
  1800  	if err != nil {
  1801  		return nil, err
  1802  	}
  1803  	defer googleapi.CloseBody(res)
  1804  	if err := googleapi.CheckResponse(res); err != nil {
  1805  		return nil, gensupport.WrapError(err)
  1806  	}
  1807  	ret := &CustomerListCustomersResponse{
  1808  		ServerResponse: googleapi.ServerResponse{
  1809  			Header:         res.Header,
  1810  			HTTPStatusCode: res.StatusCode,
  1811  		},
  1812  	}
  1813  	target := &ret
  1814  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1815  		return nil, err
  1816  	}
  1817  	return ret, nil
  1818  }
  1819  
  1820  // Pages invokes f for each page of results.
  1821  // A non-nil error returned from f will halt the iteration.
  1822  // The provided context supersedes any context provided to the Context method.
  1823  func (c *CustomersListCall) Pages(ctx context.Context, f func(*CustomerListCustomersResponse) error) error {
  1824  	c.ctx_ = ctx
  1825  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1826  	for {
  1827  		x, err := c.Do()
  1828  		if err != nil {
  1829  			return err
  1830  		}
  1831  		if err := f(x); err != nil {
  1832  			return err
  1833  		}
  1834  		if x.NextPageToken == "" {
  1835  			return nil
  1836  		}
  1837  		c.PageToken(x.NextPageToken)
  1838  	}
  1839  }
  1840  
  1841  type CustomersConfigurationsCreateCall struct {
  1842  	s             *Service
  1843  	parent        string
  1844  	configuration *Configuration
  1845  	urlParams_    gensupport.URLParams
  1846  	ctx_          context.Context
  1847  	header_       http.Header
  1848  }
  1849  
  1850  // Create: Creates a new configuration. Once created, a customer can apply the
  1851  // configuration to devices.
  1852  //
  1853  //   - parent: The customer that manages the configuration. An API resource name
  1854  //     in the format `customers/[CUSTOMER_ID]`. This field has custom validation
  1855  //     in CreateConfigurationRequestValidator.
  1856  func (r *CustomersConfigurationsService) Create(parent string, configuration *Configuration) *CustomersConfigurationsCreateCall {
  1857  	c := &CustomersConfigurationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1858  	c.parent = parent
  1859  	c.configuration = configuration
  1860  	return c
  1861  }
  1862  
  1863  // Fields allows partial responses to be retrieved. See
  1864  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1865  // details.
  1866  func (c *CustomersConfigurationsCreateCall) Fields(s ...googleapi.Field) *CustomersConfigurationsCreateCall {
  1867  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1868  	return c
  1869  }
  1870  
  1871  // Context sets the context to be used in this call's Do method.
  1872  func (c *CustomersConfigurationsCreateCall) Context(ctx context.Context) *CustomersConfigurationsCreateCall {
  1873  	c.ctx_ = ctx
  1874  	return c
  1875  }
  1876  
  1877  // Header returns a http.Header that can be modified by the caller to add
  1878  // headers to the request.
  1879  func (c *CustomersConfigurationsCreateCall) Header() http.Header {
  1880  	if c.header_ == nil {
  1881  		c.header_ = make(http.Header)
  1882  	}
  1883  	return c.header_
  1884  }
  1885  
  1886  func (c *CustomersConfigurationsCreateCall) doRequest(alt string) (*http.Response, error) {
  1887  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1888  	var body io.Reader = nil
  1889  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.configuration)
  1890  	if err != nil {
  1891  		return nil, err
  1892  	}
  1893  	c.urlParams_.Set("alt", alt)
  1894  	c.urlParams_.Set("prettyPrint", "false")
  1895  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/configurations")
  1896  	urls += "?" + c.urlParams_.Encode()
  1897  	req, err := http.NewRequest("POST", urls, body)
  1898  	if err != nil {
  1899  		return nil, err
  1900  	}
  1901  	req.Header = reqHeaders
  1902  	googleapi.Expand(req.URL, map[string]string{
  1903  		"parent": c.parent,
  1904  	})
  1905  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1906  }
  1907  
  1908  // Do executes the "androiddeviceprovisioning.customers.configurations.create" call.
  1909  // Any non-2xx status code is an error. Response headers are in either
  1910  // *Configuration.ServerResponse.Header or (if a response was returned at all)
  1911  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1912  // whether the returned error was because http.StatusNotModified was returned.
  1913  func (c *CustomersConfigurationsCreateCall) Do(opts ...googleapi.CallOption) (*Configuration, error) {
  1914  	gensupport.SetOptions(c.urlParams_, opts...)
  1915  	res, err := c.doRequest("json")
  1916  	if res != nil && res.StatusCode == http.StatusNotModified {
  1917  		if res.Body != nil {
  1918  			res.Body.Close()
  1919  		}
  1920  		return nil, gensupport.WrapError(&googleapi.Error{
  1921  			Code:   res.StatusCode,
  1922  			Header: res.Header,
  1923  		})
  1924  	}
  1925  	if err != nil {
  1926  		return nil, err
  1927  	}
  1928  	defer googleapi.CloseBody(res)
  1929  	if err := googleapi.CheckResponse(res); err != nil {
  1930  		return nil, gensupport.WrapError(err)
  1931  	}
  1932  	ret := &Configuration{
  1933  		ServerResponse: googleapi.ServerResponse{
  1934  			Header:         res.Header,
  1935  			HTTPStatusCode: res.StatusCode,
  1936  		},
  1937  	}
  1938  	target := &ret
  1939  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1940  		return nil, err
  1941  	}
  1942  	return ret, nil
  1943  }
  1944  
  1945  type CustomersConfigurationsDeleteCall struct {
  1946  	s          *Service
  1947  	name       string
  1948  	urlParams_ gensupport.URLParams
  1949  	ctx_       context.Context
  1950  	header_    http.Header
  1951  }
  1952  
  1953  // Delete: Deletes an unused configuration. The API call fails if the customer
  1954  // has devices with the configuration applied.
  1955  //
  1956  //   - name: The configuration to delete. An API resource name in the format
  1957  //     `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. If the
  1958  //     configuration is applied to any devices, the API call fails.
  1959  func (r *CustomersConfigurationsService) Delete(name string) *CustomersConfigurationsDeleteCall {
  1960  	c := &CustomersConfigurationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1961  	c.name = name
  1962  	return c
  1963  }
  1964  
  1965  // Fields allows partial responses to be retrieved. See
  1966  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1967  // details.
  1968  func (c *CustomersConfigurationsDeleteCall) Fields(s ...googleapi.Field) *CustomersConfigurationsDeleteCall {
  1969  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1970  	return c
  1971  }
  1972  
  1973  // Context sets the context to be used in this call's Do method.
  1974  func (c *CustomersConfigurationsDeleteCall) Context(ctx context.Context) *CustomersConfigurationsDeleteCall {
  1975  	c.ctx_ = ctx
  1976  	return c
  1977  }
  1978  
  1979  // Header returns a http.Header that can be modified by the caller to add
  1980  // headers to the request.
  1981  func (c *CustomersConfigurationsDeleteCall) Header() http.Header {
  1982  	if c.header_ == nil {
  1983  		c.header_ = make(http.Header)
  1984  	}
  1985  	return c.header_
  1986  }
  1987  
  1988  func (c *CustomersConfigurationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1989  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1990  	var body io.Reader = nil
  1991  	c.urlParams_.Set("alt", alt)
  1992  	c.urlParams_.Set("prettyPrint", "false")
  1993  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1994  	urls += "?" + c.urlParams_.Encode()
  1995  	req, err := http.NewRequest("DELETE", urls, body)
  1996  	if err != nil {
  1997  		return nil, err
  1998  	}
  1999  	req.Header = reqHeaders
  2000  	googleapi.Expand(req.URL, map[string]string{
  2001  		"name": c.name,
  2002  	})
  2003  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2004  }
  2005  
  2006  // Do executes the "androiddeviceprovisioning.customers.configurations.delete" call.
  2007  // Any non-2xx status code is an error. Response headers are in either
  2008  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2009  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2010  // whether the returned error was because http.StatusNotModified was returned.
  2011  func (c *CustomersConfigurationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2012  	gensupport.SetOptions(c.urlParams_, opts...)
  2013  	res, err := c.doRequest("json")
  2014  	if res != nil && res.StatusCode == http.StatusNotModified {
  2015  		if res.Body != nil {
  2016  			res.Body.Close()
  2017  		}
  2018  		return nil, gensupport.WrapError(&googleapi.Error{
  2019  			Code:   res.StatusCode,
  2020  			Header: res.Header,
  2021  		})
  2022  	}
  2023  	if err != nil {
  2024  		return nil, err
  2025  	}
  2026  	defer googleapi.CloseBody(res)
  2027  	if err := googleapi.CheckResponse(res); err != nil {
  2028  		return nil, gensupport.WrapError(err)
  2029  	}
  2030  	ret := &Empty{
  2031  		ServerResponse: googleapi.ServerResponse{
  2032  			Header:         res.Header,
  2033  			HTTPStatusCode: res.StatusCode,
  2034  		},
  2035  	}
  2036  	target := &ret
  2037  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2038  		return nil, err
  2039  	}
  2040  	return ret, nil
  2041  }
  2042  
  2043  type CustomersConfigurationsGetCall struct {
  2044  	s            *Service
  2045  	name         string
  2046  	urlParams_   gensupport.URLParams
  2047  	ifNoneMatch_ string
  2048  	ctx_         context.Context
  2049  	header_      http.Header
  2050  }
  2051  
  2052  // Get: Gets the details of a configuration.
  2053  //
  2054  //   - name: The configuration to get. An API resource name in the format
  2055  //     `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`.
  2056  func (r *CustomersConfigurationsService) Get(name string) *CustomersConfigurationsGetCall {
  2057  	c := &CustomersConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2058  	c.name = name
  2059  	return c
  2060  }
  2061  
  2062  // Fields allows partial responses to be retrieved. See
  2063  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2064  // details.
  2065  func (c *CustomersConfigurationsGetCall) Fields(s ...googleapi.Field) *CustomersConfigurationsGetCall {
  2066  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2067  	return c
  2068  }
  2069  
  2070  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2071  // object's ETag matches the given value. This is useful for getting updates
  2072  // only after the object has changed since the last request.
  2073  func (c *CustomersConfigurationsGetCall) IfNoneMatch(entityTag string) *CustomersConfigurationsGetCall {
  2074  	c.ifNoneMatch_ = entityTag
  2075  	return c
  2076  }
  2077  
  2078  // Context sets the context to be used in this call's Do method.
  2079  func (c *CustomersConfigurationsGetCall) Context(ctx context.Context) *CustomersConfigurationsGetCall {
  2080  	c.ctx_ = ctx
  2081  	return c
  2082  }
  2083  
  2084  // Header returns a http.Header that can be modified by the caller to add
  2085  // headers to the request.
  2086  func (c *CustomersConfigurationsGetCall) Header() http.Header {
  2087  	if c.header_ == nil {
  2088  		c.header_ = make(http.Header)
  2089  	}
  2090  	return c.header_
  2091  }
  2092  
  2093  func (c *CustomersConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
  2094  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2095  	if c.ifNoneMatch_ != "" {
  2096  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2097  	}
  2098  	var body io.Reader = nil
  2099  	c.urlParams_.Set("alt", alt)
  2100  	c.urlParams_.Set("prettyPrint", "false")
  2101  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2102  	urls += "?" + c.urlParams_.Encode()
  2103  	req, err := http.NewRequest("GET", urls, body)
  2104  	if err != nil {
  2105  		return nil, err
  2106  	}
  2107  	req.Header = reqHeaders
  2108  	googleapi.Expand(req.URL, map[string]string{
  2109  		"name": c.name,
  2110  	})
  2111  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2112  }
  2113  
  2114  // Do executes the "androiddeviceprovisioning.customers.configurations.get" call.
  2115  // Any non-2xx status code is an error. Response headers are in either
  2116  // *Configuration.ServerResponse.Header or (if a response was returned at all)
  2117  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2118  // whether the returned error was because http.StatusNotModified was returned.
  2119  func (c *CustomersConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*Configuration, error) {
  2120  	gensupport.SetOptions(c.urlParams_, opts...)
  2121  	res, err := c.doRequest("json")
  2122  	if res != nil && res.StatusCode == http.StatusNotModified {
  2123  		if res.Body != nil {
  2124  			res.Body.Close()
  2125  		}
  2126  		return nil, gensupport.WrapError(&googleapi.Error{
  2127  			Code:   res.StatusCode,
  2128  			Header: res.Header,
  2129  		})
  2130  	}
  2131  	if err != nil {
  2132  		return nil, err
  2133  	}
  2134  	defer googleapi.CloseBody(res)
  2135  	if err := googleapi.CheckResponse(res); err != nil {
  2136  		return nil, gensupport.WrapError(err)
  2137  	}
  2138  	ret := &Configuration{
  2139  		ServerResponse: googleapi.ServerResponse{
  2140  			Header:         res.Header,
  2141  			HTTPStatusCode: res.StatusCode,
  2142  		},
  2143  	}
  2144  	target := &ret
  2145  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2146  		return nil, err
  2147  	}
  2148  	return ret, nil
  2149  }
  2150  
  2151  type CustomersConfigurationsListCall struct {
  2152  	s            *Service
  2153  	parent       string
  2154  	urlParams_   gensupport.URLParams
  2155  	ifNoneMatch_ string
  2156  	ctx_         context.Context
  2157  	header_      http.Header
  2158  }
  2159  
  2160  // List: Lists a customer's configurations.
  2161  //
  2162  //   - parent: The customer that manages the listed configurations. An API
  2163  //     resource name in the format `customers/[CUSTOMER_ID]`.
  2164  func (r *CustomersConfigurationsService) List(parent string) *CustomersConfigurationsListCall {
  2165  	c := &CustomersConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2166  	c.parent = parent
  2167  	return c
  2168  }
  2169  
  2170  // Fields allows partial responses to be retrieved. See
  2171  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2172  // details.
  2173  func (c *CustomersConfigurationsListCall) Fields(s ...googleapi.Field) *CustomersConfigurationsListCall {
  2174  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2175  	return c
  2176  }
  2177  
  2178  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2179  // object's ETag matches the given value. This is useful for getting updates
  2180  // only after the object has changed since the last request.
  2181  func (c *CustomersConfigurationsListCall) IfNoneMatch(entityTag string) *CustomersConfigurationsListCall {
  2182  	c.ifNoneMatch_ = entityTag
  2183  	return c
  2184  }
  2185  
  2186  // Context sets the context to be used in this call's Do method.
  2187  func (c *CustomersConfigurationsListCall) Context(ctx context.Context) *CustomersConfigurationsListCall {
  2188  	c.ctx_ = ctx
  2189  	return c
  2190  }
  2191  
  2192  // Header returns a http.Header that can be modified by the caller to add
  2193  // headers to the request.
  2194  func (c *CustomersConfigurationsListCall) Header() http.Header {
  2195  	if c.header_ == nil {
  2196  		c.header_ = make(http.Header)
  2197  	}
  2198  	return c.header_
  2199  }
  2200  
  2201  func (c *CustomersConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
  2202  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2203  	if c.ifNoneMatch_ != "" {
  2204  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2205  	}
  2206  	var body io.Reader = nil
  2207  	c.urlParams_.Set("alt", alt)
  2208  	c.urlParams_.Set("prettyPrint", "false")
  2209  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/configurations")
  2210  	urls += "?" + c.urlParams_.Encode()
  2211  	req, err := http.NewRequest("GET", urls, body)
  2212  	if err != nil {
  2213  		return nil, err
  2214  	}
  2215  	req.Header = reqHeaders
  2216  	googleapi.Expand(req.URL, map[string]string{
  2217  		"parent": c.parent,
  2218  	})
  2219  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2220  }
  2221  
  2222  // Do executes the "androiddeviceprovisioning.customers.configurations.list" call.
  2223  // Any non-2xx status code is an error. Response headers are in either
  2224  // *CustomerListConfigurationsResponse.ServerResponse.Header or (if a response
  2225  // was returned at all) in error.(*googleapi.Error).Header. Use
  2226  // googleapi.IsNotModified to check whether the returned error was because
  2227  // http.StatusNotModified was returned.
  2228  func (c *CustomersConfigurationsListCall) Do(opts ...googleapi.CallOption) (*CustomerListConfigurationsResponse, error) {
  2229  	gensupport.SetOptions(c.urlParams_, opts...)
  2230  	res, err := c.doRequest("json")
  2231  	if res != nil && res.StatusCode == http.StatusNotModified {
  2232  		if res.Body != nil {
  2233  			res.Body.Close()
  2234  		}
  2235  		return nil, gensupport.WrapError(&googleapi.Error{
  2236  			Code:   res.StatusCode,
  2237  			Header: res.Header,
  2238  		})
  2239  	}
  2240  	if err != nil {
  2241  		return nil, err
  2242  	}
  2243  	defer googleapi.CloseBody(res)
  2244  	if err := googleapi.CheckResponse(res); err != nil {
  2245  		return nil, gensupport.WrapError(err)
  2246  	}
  2247  	ret := &CustomerListConfigurationsResponse{
  2248  		ServerResponse: googleapi.ServerResponse{
  2249  			Header:         res.Header,
  2250  			HTTPStatusCode: res.StatusCode,
  2251  		},
  2252  	}
  2253  	target := &ret
  2254  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2255  		return nil, err
  2256  	}
  2257  	return ret, nil
  2258  }
  2259  
  2260  type CustomersConfigurationsPatchCall struct {
  2261  	s             *Service
  2262  	name          string
  2263  	configuration *Configuration
  2264  	urlParams_    gensupport.URLParams
  2265  	ctx_          context.Context
  2266  	header_       http.Header
  2267  }
  2268  
  2269  // Patch: Updates a configuration's field values.
  2270  //
  2271  //   - name: Output only. The API resource name in the format
  2272  //     `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. Assigned by
  2273  //     the server.
  2274  func (r *CustomersConfigurationsService) Patch(name string, configuration *Configuration) *CustomersConfigurationsPatchCall {
  2275  	c := &CustomersConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2276  	c.name = name
  2277  	c.configuration = configuration
  2278  	return c
  2279  }
  2280  
  2281  // UpdateMask sets the optional parameter "updateMask": Required. The field
  2282  // mask applied to the target `Configuration` before updating the fields. To
  2283  // learn more about using field masks, read FieldMask
  2284  // (/protocol-buffers/docs/reference/google.protobuf#fieldmask) in the Protocol
  2285  // Buffers documentation.
  2286  func (c *CustomersConfigurationsPatchCall) UpdateMask(updateMask string) *CustomersConfigurationsPatchCall {
  2287  	c.urlParams_.Set("updateMask", updateMask)
  2288  	return c
  2289  }
  2290  
  2291  // Fields allows partial responses to be retrieved. See
  2292  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2293  // details.
  2294  func (c *CustomersConfigurationsPatchCall) Fields(s ...googleapi.Field) *CustomersConfigurationsPatchCall {
  2295  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2296  	return c
  2297  }
  2298  
  2299  // Context sets the context to be used in this call's Do method.
  2300  func (c *CustomersConfigurationsPatchCall) Context(ctx context.Context) *CustomersConfigurationsPatchCall {
  2301  	c.ctx_ = ctx
  2302  	return c
  2303  }
  2304  
  2305  // Header returns a http.Header that can be modified by the caller to add
  2306  // headers to the request.
  2307  func (c *CustomersConfigurationsPatchCall) Header() http.Header {
  2308  	if c.header_ == nil {
  2309  		c.header_ = make(http.Header)
  2310  	}
  2311  	return c.header_
  2312  }
  2313  
  2314  func (c *CustomersConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
  2315  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2316  	var body io.Reader = nil
  2317  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.configuration)
  2318  	if err != nil {
  2319  		return nil, err
  2320  	}
  2321  	c.urlParams_.Set("alt", alt)
  2322  	c.urlParams_.Set("prettyPrint", "false")
  2323  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2324  	urls += "?" + c.urlParams_.Encode()
  2325  	req, err := http.NewRequest("PATCH", urls, body)
  2326  	if err != nil {
  2327  		return nil, err
  2328  	}
  2329  	req.Header = reqHeaders
  2330  	googleapi.Expand(req.URL, map[string]string{
  2331  		"name": c.name,
  2332  	})
  2333  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2334  }
  2335  
  2336  // Do executes the "androiddeviceprovisioning.customers.configurations.patch" call.
  2337  // Any non-2xx status code is an error. Response headers are in either
  2338  // *Configuration.ServerResponse.Header or (if a response was returned at all)
  2339  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2340  // whether the returned error was because http.StatusNotModified was returned.
  2341  func (c *CustomersConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*Configuration, error) {
  2342  	gensupport.SetOptions(c.urlParams_, opts...)
  2343  	res, err := c.doRequest("json")
  2344  	if res != nil && res.StatusCode == http.StatusNotModified {
  2345  		if res.Body != nil {
  2346  			res.Body.Close()
  2347  		}
  2348  		return nil, gensupport.WrapError(&googleapi.Error{
  2349  			Code:   res.StatusCode,
  2350  			Header: res.Header,
  2351  		})
  2352  	}
  2353  	if err != nil {
  2354  		return nil, err
  2355  	}
  2356  	defer googleapi.CloseBody(res)
  2357  	if err := googleapi.CheckResponse(res); err != nil {
  2358  		return nil, gensupport.WrapError(err)
  2359  	}
  2360  	ret := &Configuration{
  2361  		ServerResponse: googleapi.ServerResponse{
  2362  			Header:         res.Header,
  2363  			HTTPStatusCode: res.StatusCode,
  2364  		},
  2365  	}
  2366  	target := &ret
  2367  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2368  		return nil, err
  2369  	}
  2370  	return ret, nil
  2371  }
  2372  
  2373  type CustomersDevicesApplyConfigurationCall struct {
  2374  	s                                 *Service
  2375  	parent                            string
  2376  	customerapplyconfigurationrequest *CustomerApplyConfigurationRequest
  2377  	urlParams_                        gensupport.URLParams
  2378  	ctx_                              context.Context
  2379  	header_                           http.Header
  2380  }
  2381  
  2382  // ApplyConfiguration: Applies a Configuration to the device to register the
  2383  // device for zero-touch enrollment. After applying a configuration to a
  2384  // device, the device automatically provisions itself on first boot, or next
  2385  // factory reset.
  2386  //
  2387  //   - parent: The customer managing the device. An API resource name in the
  2388  //     format `customers/[CUSTOMER_ID]`.
  2389  func (r *CustomersDevicesService) ApplyConfiguration(parent string, customerapplyconfigurationrequest *CustomerApplyConfigurationRequest) *CustomersDevicesApplyConfigurationCall {
  2390  	c := &CustomersDevicesApplyConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2391  	c.parent = parent
  2392  	c.customerapplyconfigurationrequest = customerapplyconfigurationrequest
  2393  	return c
  2394  }
  2395  
  2396  // Fields allows partial responses to be retrieved. See
  2397  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2398  // details.
  2399  func (c *CustomersDevicesApplyConfigurationCall) Fields(s ...googleapi.Field) *CustomersDevicesApplyConfigurationCall {
  2400  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2401  	return c
  2402  }
  2403  
  2404  // Context sets the context to be used in this call's Do method.
  2405  func (c *CustomersDevicesApplyConfigurationCall) Context(ctx context.Context) *CustomersDevicesApplyConfigurationCall {
  2406  	c.ctx_ = ctx
  2407  	return c
  2408  }
  2409  
  2410  // Header returns a http.Header that can be modified by the caller to add
  2411  // headers to the request.
  2412  func (c *CustomersDevicesApplyConfigurationCall) Header() http.Header {
  2413  	if c.header_ == nil {
  2414  		c.header_ = make(http.Header)
  2415  	}
  2416  	return c.header_
  2417  }
  2418  
  2419  func (c *CustomersDevicesApplyConfigurationCall) doRequest(alt string) (*http.Response, error) {
  2420  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2421  	var body io.Reader = nil
  2422  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customerapplyconfigurationrequest)
  2423  	if err != nil {
  2424  		return nil, err
  2425  	}
  2426  	c.urlParams_.Set("alt", alt)
  2427  	c.urlParams_.Set("prettyPrint", "false")
  2428  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices:applyConfiguration")
  2429  	urls += "?" + c.urlParams_.Encode()
  2430  	req, err := http.NewRequest("POST", urls, body)
  2431  	if err != nil {
  2432  		return nil, err
  2433  	}
  2434  	req.Header = reqHeaders
  2435  	googleapi.Expand(req.URL, map[string]string{
  2436  		"parent": c.parent,
  2437  	})
  2438  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2439  }
  2440  
  2441  // Do executes the "androiddeviceprovisioning.customers.devices.applyConfiguration" call.
  2442  // Any non-2xx status code is an error. Response headers are in either
  2443  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2444  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2445  // whether the returned error was because http.StatusNotModified was returned.
  2446  func (c *CustomersDevicesApplyConfigurationCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2447  	gensupport.SetOptions(c.urlParams_, opts...)
  2448  	res, err := c.doRequest("json")
  2449  	if res != nil && res.StatusCode == http.StatusNotModified {
  2450  		if res.Body != nil {
  2451  			res.Body.Close()
  2452  		}
  2453  		return nil, gensupport.WrapError(&googleapi.Error{
  2454  			Code:   res.StatusCode,
  2455  			Header: res.Header,
  2456  		})
  2457  	}
  2458  	if err != nil {
  2459  		return nil, err
  2460  	}
  2461  	defer googleapi.CloseBody(res)
  2462  	if err := googleapi.CheckResponse(res); err != nil {
  2463  		return nil, gensupport.WrapError(err)
  2464  	}
  2465  	ret := &Empty{
  2466  		ServerResponse: googleapi.ServerResponse{
  2467  			Header:         res.Header,
  2468  			HTTPStatusCode: res.StatusCode,
  2469  		},
  2470  	}
  2471  	target := &ret
  2472  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2473  		return nil, err
  2474  	}
  2475  	return ret, nil
  2476  }
  2477  
  2478  type CustomersDevicesGetCall struct {
  2479  	s            *Service
  2480  	name         string
  2481  	urlParams_   gensupport.URLParams
  2482  	ifNoneMatch_ string
  2483  	ctx_         context.Context
  2484  	header_      http.Header
  2485  }
  2486  
  2487  // Get: Gets the details of a device.
  2488  //
  2489  //   - name: The device to get. An API resource name in the format
  2490  //     `customers/[CUSTOMER_ID]/devices/[DEVICE_ID]`.
  2491  func (r *CustomersDevicesService) Get(name string) *CustomersDevicesGetCall {
  2492  	c := &CustomersDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2493  	c.name = name
  2494  	return c
  2495  }
  2496  
  2497  // Fields allows partial responses to be retrieved. See
  2498  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2499  // details.
  2500  func (c *CustomersDevicesGetCall) Fields(s ...googleapi.Field) *CustomersDevicesGetCall {
  2501  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2502  	return c
  2503  }
  2504  
  2505  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2506  // object's ETag matches the given value. This is useful for getting updates
  2507  // only after the object has changed since the last request.
  2508  func (c *CustomersDevicesGetCall) IfNoneMatch(entityTag string) *CustomersDevicesGetCall {
  2509  	c.ifNoneMatch_ = entityTag
  2510  	return c
  2511  }
  2512  
  2513  // Context sets the context to be used in this call's Do method.
  2514  func (c *CustomersDevicesGetCall) Context(ctx context.Context) *CustomersDevicesGetCall {
  2515  	c.ctx_ = ctx
  2516  	return c
  2517  }
  2518  
  2519  // Header returns a http.Header that can be modified by the caller to add
  2520  // headers to the request.
  2521  func (c *CustomersDevicesGetCall) Header() http.Header {
  2522  	if c.header_ == nil {
  2523  		c.header_ = make(http.Header)
  2524  	}
  2525  	return c.header_
  2526  }
  2527  
  2528  func (c *CustomersDevicesGetCall) doRequest(alt string) (*http.Response, error) {
  2529  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2530  	if c.ifNoneMatch_ != "" {
  2531  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2532  	}
  2533  	var body io.Reader = nil
  2534  	c.urlParams_.Set("alt", alt)
  2535  	c.urlParams_.Set("prettyPrint", "false")
  2536  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2537  	urls += "?" + c.urlParams_.Encode()
  2538  	req, err := http.NewRequest("GET", urls, body)
  2539  	if err != nil {
  2540  		return nil, err
  2541  	}
  2542  	req.Header = reqHeaders
  2543  	googleapi.Expand(req.URL, map[string]string{
  2544  		"name": c.name,
  2545  	})
  2546  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2547  }
  2548  
  2549  // Do executes the "androiddeviceprovisioning.customers.devices.get" call.
  2550  // Any non-2xx status code is an error. Response headers are in either
  2551  // *Device.ServerResponse.Header or (if a response was returned at all) in
  2552  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2553  // whether the returned error was because http.StatusNotModified was returned.
  2554  func (c *CustomersDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) {
  2555  	gensupport.SetOptions(c.urlParams_, opts...)
  2556  	res, err := c.doRequest("json")
  2557  	if res != nil && res.StatusCode == http.StatusNotModified {
  2558  		if res.Body != nil {
  2559  			res.Body.Close()
  2560  		}
  2561  		return nil, gensupport.WrapError(&googleapi.Error{
  2562  			Code:   res.StatusCode,
  2563  			Header: res.Header,
  2564  		})
  2565  	}
  2566  	if err != nil {
  2567  		return nil, err
  2568  	}
  2569  	defer googleapi.CloseBody(res)
  2570  	if err := googleapi.CheckResponse(res); err != nil {
  2571  		return nil, gensupport.WrapError(err)
  2572  	}
  2573  	ret := &Device{
  2574  		ServerResponse: googleapi.ServerResponse{
  2575  			Header:         res.Header,
  2576  			HTTPStatusCode: res.StatusCode,
  2577  		},
  2578  	}
  2579  	target := &ret
  2580  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2581  		return nil, err
  2582  	}
  2583  	return ret, nil
  2584  }
  2585  
  2586  type CustomersDevicesListCall struct {
  2587  	s            *Service
  2588  	parent       string
  2589  	urlParams_   gensupport.URLParams
  2590  	ifNoneMatch_ string
  2591  	ctx_         context.Context
  2592  	header_      http.Header
  2593  }
  2594  
  2595  // List: Lists a customer's devices.
  2596  //
  2597  //   - parent: The customer managing the devices. An API resource name in the
  2598  //     format `customers/[CUSTOMER_ID]`.
  2599  func (r *CustomersDevicesService) List(parent string) *CustomersDevicesListCall {
  2600  	c := &CustomersDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2601  	c.parent = parent
  2602  	return c
  2603  }
  2604  
  2605  // PageSize sets the optional parameter "pageSize": The maximum number of
  2606  // devices to show in a page of results. Must be between 1 and 100 inclusive.
  2607  func (c *CustomersDevicesListCall) PageSize(pageSize int64) *CustomersDevicesListCall {
  2608  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2609  	return c
  2610  }
  2611  
  2612  // PageToken sets the optional parameter "pageToken": A token specifying which
  2613  // result page to return.
  2614  func (c *CustomersDevicesListCall) PageToken(pageToken string) *CustomersDevicesListCall {
  2615  	c.urlParams_.Set("pageToken", pageToken)
  2616  	return c
  2617  }
  2618  
  2619  // Fields allows partial responses to be retrieved. See
  2620  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2621  // details.
  2622  func (c *CustomersDevicesListCall) Fields(s ...googleapi.Field) *CustomersDevicesListCall {
  2623  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2624  	return c
  2625  }
  2626  
  2627  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2628  // object's ETag matches the given value. This is useful for getting updates
  2629  // only after the object has changed since the last request.
  2630  func (c *CustomersDevicesListCall) IfNoneMatch(entityTag string) *CustomersDevicesListCall {
  2631  	c.ifNoneMatch_ = entityTag
  2632  	return c
  2633  }
  2634  
  2635  // Context sets the context to be used in this call's Do method.
  2636  func (c *CustomersDevicesListCall) Context(ctx context.Context) *CustomersDevicesListCall {
  2637  	c.ctx_ = ctx
  2638  	return c
  2639  }
  2640  
  2641  // Header returns a http.Header that can be modified by the caller to add
  2642  // headers to the request.
  2643  func (c *CustomersDevicesListCall) Header() http.Header {
  2644  	if c.header_ == nil {
  2645  		c.header_ = make(http.Header)
  2646  	}
  2647  	return c.header_
  2648  }
  2649  
  2650  func (c *CustomersDevicesListCall) doRequest(alt string) (*http.Response, error) {
  2651  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2652  	if c.ifNoneMatch_ != "" {
  2653  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2654  	}
  2655  	var body io.Reader = nil
  2656  	c.urlParams_.Set("alt", alt)
  2657  	c.urlParams_.Set("prettyPrint", "false")
  2658  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices")
  2659  	urls += "?" + c.urlParams_.Encode()
  2660  	req, err := http.NewRequest("GET", urls, body)
  2661  	if err != nil {
  2662  		return nil, err
  2663  	}
  2664  	req.Header = reqHeaders
  2665  	googleapi.Expand(req.URL, map[string]string{
  2666  		"parent": c.parent,
  2667  	})
  2668  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2669  }
  2670  
  2671  // Do executes the "androiddeviceprovisioning.customers.devices.list" call.
  2672  // Any non-2xx status code is an error. Response headers are in either
  2673  // *CustomerListDevicesResponse.ServerResponse.Header or (if a response was
  2674  // returned at all) in error.(*googleapi.Error).Header. Use
  2675  // googleapi.IsNotModified to check whether the returned error was because
  2676  // http.StatusNotModified was returned.
  2677  func (c *CustomersDevicesListCall) Do(opts ...googleapi.CallOption) (*CustomerListDevicesResponse, error) {
  2678  	gensupport.SetOptions(c.urlParams_, opts...)
  2679  	res, err := c.doRequest("json")
  2680  	if res != nil && res.StatusCode == http.StatusNotModified {
  2681  		if res.Body != nil {
  2682  			res.Body.Close()
  2683  		}
  2684  		return nil, gensupport.WrapError(&googleapi.Error{
  2685  			Code:   res.StatusCode,
  2686  			Header: res.Header,
  2687  		})
  2688  	}
  2689  	if err != nil {
  2690  		return nil, err
  2691  	}
  2692  	defer googleapi.CloseBody(res)
  2693  	if err := googleapi.CheckResponse(res); err != nil {
  2694  		return nil, gensupport.WrapError(err)
  2695  	}
  2696  	ret := &CustomerListDevicesResponse{
  2697  		ServerResponse: googleapi.ServerResponse{
  2698  			Header:         res.Header,
  2699  			HTTPStatusCode: res.StatusCode,
  2700  		},
  2701  	}
  2702  	target := &ret
  2703  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2704  		return nil, err
  2705  	}
  2706  	return ret, nil
  2707  }
  2708  
  2709  // Pages invokes f for each page of results.
  2710  // A non-nil error returned from f will halt the iteration.
  2711  // The provided context supersedes any context provided to the Context method.
  2712  func (c *CustomersDevicesListCall) Pages(ctx context.Context, f func(*CustomerListDevicesResponse) error) error {
  2713  	c.ctx_ = ctx
  2714  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2715  	for {
  2716  		x, err := c.Do()
  2717  		if err != nil {
  2718  			return err
  2719  		}
  2720  		if err := f(x); err != nil {
  2721  			return err
  2722  		}
  2723  		if x.NextPageToken == "" {
  2724  			return nil
  2725  		}
  2726  		c.PageToken(x.NextPageToken)
  2727  	}
  2728  }
  2729  
  2730  type CustomersDevicesRemoveConfigurationCall struct {
  2731  	s                                  *Service
  2732  	parent                             string
  2733  	customerremoveconfigurationrequest *CustomerRemoveConfigurationRequest
  2734  	urlParams_                         gensupport.URLParams
  2735  	ctx_                               context.Context
  2736  	header_                            http.Header
  2737  }
  2738  
  2739  // RemoveConfiguration: Removes a configuration from device.
  2740  //
  2741  //   - parent: The customer managing the device in the format
  2742  //     `customers/[CUSTOMER_ID]`.
  2743  func (r *CustomersDevicesService) RemoveConfiguration(parent string, customerremoveconfigurationrequest *CustomerRemoveConfigurationRequest) *CustomersDevicesRemoveConfigurationCall {
  2744  	c := &CustomersDevicesRemoveConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2745  	c.parent = parent
  2746  	c.customerremoveconfigurationrequest = customerremoveconfigurationrequest
  2747  	return c
  2748  }
  2749  
  2750  // Fields allows partial responses to be retrieved. See
  2751  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2752  // details.
  2753  func (c *CustomersDevicesRemoveConfigurationCall) Fields(s ...googleapi.Field) *CustomersDevicesRemoveConfigurationCall {
  2754  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2755  	return c
  2756  }
  2757  
  2758  // Context sets the context to be used in this call's Do method.
  2759  func (c *CustomersDevicesRemoveConfigurationCall) Context(ctx context.Context) *CustomersDevicesRemoveConfigurationCall {
  2760  	c.ctx_ = ctx
  2761  	return c
  2762  }
  2763  
  2764  // Header returns a http.Header that can be modified by the caller to add
  2765  // headers to the request.
  2766  func (c *CustomersDevicesRemoveConfigurationCall) Header() http.Header {
  2767  	if c.header_ == nil {
  2768  		c.header_ = make(http.Header)
  2769  	}
  2770  	return c.header_
  2771  }
  2772  
  2773  func (c *CustomersDevicesRemoveConfigurationCall) doRequest(alt string) (*http.Response, error) {
  2774  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2775  	var body io.Reader = nil
  2776  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customerremoveconfigurationrequest)
  2777  	if err != nil {
  2778  		return nil, err
  2779  	}
  2780  	c.urlParams_.Set("alt", alt)
  2781  	c.urlParams_.Set("prettyPrint", "false")
  2782  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices:removeConfiguration")
  2783  	urls += "?" + c.urlParams_.Encode()
  2784  	req, err := http.NewRequest("POST", urls, body)
  2785  	if err != nil {
  2786  		return nil, err
  2787  	}
  2788  	req.Header = reqHeaders
  2789  	googleapi.Expand(req.URL, map[string]string{
  2790  		"parent": c.parent,
  2791  	})
  2792  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2793  }
  2794  
  2795  // Do executes the "androiddeviceprovisioning.customers.devices.removeConfiguration" call.
  2796  // Any non-2xx status code is an error. Response headers are in either
  2797  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2798  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2799  // whether the returned error was because http.StatusNotModified was returned.
  2800  func (c *CustomersDevicesRemoveConfigurationCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2801  	gensupport.SetOptions(c.urlParams_, opts...)
  2802  	res, err := c.doRequest("json")
  2803  	if res != nil && res.StatusCode == http.StatusNotModified {
  2804  		if res.Body != nil {
  2805  			res.Body.Close()
  2806  		}
  2807  		return nil, gensupport.WrapError(&googleapi.Error{
  2808  			Code:   res.StatusCode,
  2809  			Header: res.Header,
  2810  		})
  2811  	}
  2812  	if err != nil {
  2813  		return nil, err
  2814  	}
  2815  	defer googleapi.CloseBody(res)
  2816  	if err := googleapi.CheckResponse(res); err != nil {
  2817  		return nil, gensupport.WrapError(err)
  2818  	}
  2819  	ret := &Empty{
  2820  		ServerResponse: googleapi.ServerResponse{
  2821  			Header:         res.Header,
  2822  			HTTPStatusCode: res.StatusCode,
  2823  		},
  2824  	}
  2825  	target := &ret
  2826  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2827  		return nil, err
  2828  	}
  2829  	return ret, nil
  2830  }
  2831  
  2832  type CustomersDevicesUnclaimCall struct {
  2833  	s                            *Service
  2834  	parent                       string
  2835  	customerunclaimdevicerequest *CustomerUnclaimDeviceRequest
  2836  	urlParams_                   gensupport.URLParams
  2837  	ctx_                         context.Context
  2838  	header_                      http.Header
  2839  }
  2840  
  2841  // Unclaim: Unclaims a device from a customer and removes it from zero-touch
  2842  // enrollment. After removing a device, a customer must contact their reseller
  2843  // to register the device into zero-touch enrollment again.
  2844  //
  2845  //   - parent: The customer managing the device. An API resource name in the
  2846  //     format `customers/[CUSTOMER_ID]`.
  2847  func (r *CustomersDevicesService) Unclaim(parent string, customerunclaimdevicerequest *CustomerUnclaimDeviceRequest) *CustomersDevicesUnclaimCall {
  2848  	c := &CustomersDevicesUnclaimCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2849  	c.parent = parent
  2850  	c.customerunclaimdevicerequest = customerunclaimdevicerequest
  2851  	return c
  2852  }
  2853  
  2854  // Fields allows partial responses to be retrieved. See
  2855  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2856  // details.
  2857  func (c *CustomersDevicesUnclaimCall) Fields(s ...googleapi.Field) *CustomersDevicesUnclaimCall {
  2858  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2859  	return c
  2860  }
  2861  
  2862  // Context sets the context to be used in this call's Do method.
  2863  func (c *CustomersDevicesUnclaimCall) Context(ctx context.Context) *CustomersDevicesUnclaimCall {
  2864  	c.ctx_ = ctx
  2865  	return c
  2866  }
  2867  
  2868  // Header returns a http.Header that can be modified by the caller to add
  2869  // headers to the request.
  2870  func (c *CustomersDevicesUnclaimCall) Header() http.Header {
  2871  	if c.header_ == nil {
  2872  		c.header_ = make(http.Header)
  2873  	}
  2874  	return c.header_
  2875  }
  2876  
  2877  func (c *CustomersDevicesUnclaimCall) doRequest(alt string) (*http.Response, error) {
  2878  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2879  	var body io.Reader = nil
  2880  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customerunclaimdevicerequest)
  2881  	if err != nil {
  2882  		return nil, err
  2883  	}
  2884  	c.urlParams_.Set("alt", alt)
  2885  	c.urlParams_.Set("prettyPrint", "false")
  2886  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices:unclaim")
  2887  	urls += "?" + c.urlParams_.Encode()
  2888  	req, err := http.NewRequest("POST", urls, body)
  2889  	if err != nil {
  2890  		return nil, err
  2891  	}
  2892  	req.Header = reqHeaders
  2893  	googleapi.Expand(req.URL, map[string]string{
  2894  		"parent": c.parent,
  2895  	})
  2896  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2897  }
  2898  
  2899  // Do executes the "androiddeviceprovisioning.customers.devices.unclaim" call.
  2900  // Any non-2xx status code is an error. Response headers are in either
  2901  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2902  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2903  // whether the returned error was because http.StatusNotModified was returned.
  2904  func (c *CustomersDevicesUnclaimCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2905  	gensupport.SetOptions(c.urlParams_, opts...)
  2906  	res, err := c.doRequest("json")
  2907  	if res != nil && res.StatusCode == http.StatusNotModified {
  2908  		if res.Body != nil {
  2909  			res.Body.Close()
  2910  		}
  2911  		return nil, gensupport.WrapError(&googleapi.Error{
  2912  			Code:   res.StatusCode,
  2913  			Header: res.Header,
  2914  		})
  2915  	}
  2916  	if err != nil {
  2917  		return nil, err
  2918  	}
  2919  	defer googleapi.CloseBody(res)
  2920  	if err := googleapi.CheckResponse(res); err != nil {
  2921  		return nil, gensupport.WrapError(err)
  2922  	}
  2923  	ret := &Empty{
  2924  		ServerResponse: googleapi.ServerResponse{
  2925  			Header:         res.Header,
  2926  			HTTPStatusCode: res.StatusCode,
  2927  		},
  2928  	}
  2929  	target := &ret
  2930  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2931  		return nil, err
  2932  	}
  2933  	return ret, nil
  2934  }
  2935  
  2936  type CustomersDpcsListCall struct {
  2937  	s            *Service
  2938  	parent       string
  2939  	urlParams_   gensupport.URLParams
  2940  	ifNoneMatch_ string
  2941  	ctx_         context.Context
  2942  	header_      http.Header
  2943  }
  2944  
  2945  // List: Lists the DPCs (device policy controllers) that support zero-touch
  2946  // enrollment.
  2947  //
  2948  //   - parent: The customer that can use the DPCs in configurations. An API
  2949  //     resource name in the format `customers/[CUSTOMER_ID]`.
  2950  func (r *CustomersDpcsService) List(parent string) *CustomersDpcsListCall {
  2951  	c := &CustomersDpcsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2952  	c.parent = parent
  2953  	return c
  2954  }
  2955  
  2956  // Fields allows partial responses to be retrieved. See
  2957  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2958  // details.
  2959  func (c *CustomersDpcsListCall) Fields(s ...googleapi.Field) *CustomersDpcsListCall {
  2960  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2961  	return c
  2962  }
  2963  
  2964  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2965  // object's ETag matches the given value. This is useful for getting updates
  2966  // only after the object has changed since the last request.
  2967  func (c *CustomersDpcsListCall) IfNoneMatch(entityTag string) *CustomersDpcsListCall {
  2968  	c.ifNoneMatch_ = entityTag
  2969  	return c
  2970  }
  2971  
  2972  // Context sets the context to be used in this call's Do method.
  2973  func (c *CustomersDpcsListCall) Context(ctx context.Context) *CustomersDpcsListCall {
  2974  	c.ctx_ = ctx
  2975  	return c
  2976  }
  2977  
  2978  // Header returns a http.Header that can be modified by the caller to add
  2979  // headers to the request.
  2980  func (c *CustomersDpcsListCall) Header() http.Header {
  2981  	if c.header_ == nil {
  2982  		c.header_ = make(http.Header)
  2983  	}
  2984  	return c.header_
  2985  }
  2986  
  2987  func (c *CustomersDpcsListCall) doRequest(alt string) (*http.Response, error) {
  2988  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2989  	if c.ifNoneMatch_ != "" {
  2990  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2991  	}
  2992  	var body io.Reader = nil
  2993  	c.urlParams_.Set("alt", alt)
  2994  	c.urlParams_.Set("prettyPrint", "false")
  2995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dpcs")
  2996  	urls += "?" + c.urlParams_.Encode()
  2997  	req, err := http.NewRequest("GET", urls, body)
  2998  	if err != nil {
  2999  		return nil, err
  3000  	}
  3001  	req.Header = reqHeaders
  3002  	googleapi.Expand(req.URL, map[string]string{
  3003  		"parent": c.parent,
  3004  	})
  3005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3006  }
  3007  
  3008  // Do executes the "androiddeviceprovisioning.customers.dpcs.list" call.
  3009  // Any non-2xx status code is an error. Response headers are in either
  3010  // *CustomerListDpcsResponse.ServerResponse.Header or (if a response was
  3011  // returned at all) in error.(*googleapi.Error).Header. Use
  3012  // googleapi.IsNotModified to check whether the returned error was because
  3013  // http.StatusNotModified was returned.
  3014  func (c *CustomersDpcsListCall) Do(opts ...googleapi.CallOption) (*CustomerListDpcsResponse, error) {
  3015  	gensupport.SetOptions(c.urlParams_, opts...)
  3016  	res, err := c.doRequest("json")
  3017  	if res != nil && res.StatusCode == http.StatusNotModified {
  3018  		if res.Body != nil {
  3019  			res.Body.Close()
  3020  		}
  3021  		return nil, gensupport.WrapError(&googleapi.Error{
  3022  			Code:   res.StatusCode,
  3023  			Header: res.Header,
  3024  		})
  3025  	}
  3026  	if err != nil {
  3027  		return nil, err
  3028  	}
  3029  	defer googleapi.CloseBody(res)
  3030  	if err := googleapi.CheckResponse(res); err != nil {
  3031  		return nil, gensupport.WrapError(err)
  3032  	}
  3033  	ret := &CustomerListDpcsResponse{
  3034  		ServerResponse: googleapi.ServerResponse{
  3035  			Header:         res.Header,
  3036  			HTTPStatusCode: res.StatusCode,
  3037  		},
  3038  	}
  3039  	target := &ret
  3040  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3041  		return nil, err
  3042  	}
  3043  	return ret, nil
  3044  }
  3045  
  3046  type OperationsGetCall struct {
  3047  	s            *Service
  3048  	name         string
  3049  	urlParams_   gensupport.URLParams
  3050  	ifNoneMatch_ string
  3051  	ctx_         context.Context
  3052  	header_      http.Header
  3053  }
  3054  
  3055  // Get: Gets the latest state of a long-running operation. Clients can use this
  3056  // method to poll the operation result at intervals as recommended by the API
  3057  // service.
  3058  //
  3059  // - name: The name of the operation resource.
  3060  func (r *OperationsService) Get(name string) *OperationsGetCall {
  3061  	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3062  	c.name = name
  3063  	return c
  3064  }
  3065  
  3066  // Fields allows partial responses to be retrieved. See
  3067  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3068  // details.
  3069  func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  3070  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3071  	return c
  3072  }
  3073  
  3074  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3075  // object's ETag matches the given value. This is useful for getting updates
  3076  // only after the object has changed since the last request.
  3077  func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  3078  	c.ifNoneMatch_ = entityTag
  3079  	return c
  3080  }
  3081  
  3082  // Context sets the context to be used in this call's Do method.
  3083  func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  3084  	c.ctx_ = ctx
  3085  	return c
  3086  }
  3087  
  3088  // Header returns a http.Header that can be modified by the caller to add
  3089  // headers to the request.
  3090  func (c *OperationsGetCall) Header() http.Header {
  3091  	if c.header_ == nil {
  3092  		c.header_ = make(http.Header)
  3093  	}
  3094  	return c.header_
  3095  }
  3096  
  3097  func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3098  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3099  	if c.ifNoneMatch_ != "" {
  3100  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3101  	}
  3102  	var body io.Reader = nil
  3103  	c.urlParams_.Set("alt", alt)
  3104  	c.urlParams_.Set("prettyPrint", "false")
  3105  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3106  	urls += "?" + c.urlParams_.Encode()
  3107  	req, err := http.NewRequest("GET", urls, body)
  3108  	if err != nil {
  3109  		return nil, err
  3110  	}
  3111  	req.Header = reqHeaders
  3112  	googleapi.Expand(req.URL, map[string]string{
  3113  		"name": c.name,
  3114  	})
  3115  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3116  }
  3117  
  3118  // Do executes the "androiddeviceprovisioning.operations.get" call.
  3119  // Any non-2xx status code is an error. Response headers are in either
  3120  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3121  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3122  // whether the returned error was because http.StatusNotModified was returned.
  3123  func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3124  	gensupport.SetOptions(c.urlParams_, opts...)
  3125  	res, err := c.doRequest("json")
  3126  	if res != nil && res.StatusCode == http.StatusNotModified {
  3127  		if res.Body != nil {
  3128  			res.Body.Close()
  3129  		}
  3130  		return nil, gensupport.WrapError(&googleapi.Error{
  3131  			Code:   res.StatusCode,
  3132  			Header: res.Header,
  3133  		})
  3134  	}
  3135  	if err != nil {
  3136  		return nil, err
  3137  	}
  3138  	defer googleapi.CloseBody(res)
  3139  	if err := googleapi.CheckResponse(res); err != nil {
  3140  		return nil, gensupport.WrapError(err)
  3141  	}
  3142  	ret := &Operation{
  3143  		ServerResponse: googleapi.ServerResponse{
  3144  			Header:         res.Header,
  3145  			HTTPStatusCode: res.StatusCode,
  3146  		},
  3147  	}
  3148  	target := &ret
  3149  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3150  		return nil, err
  3151  	}
  3152  	return ret, nil
  3153  }
  3154  
  3155  type PartnersCustomersCreateCall struct {
  3156  	s                     *Service
  3157  	parent                string
  3158  	createcustomerrequest *CreateCustomerRequest
  3159  	urlParams_            gensupport.URLParams
  3160  	ctx_                  context.Context
  3161  	header_               http.Header
  3162  }
  3163  
  3164  // Create: Creates a customer for zero-touch enrollment. After the method
  3165  // returns successfully, admin and owner roles can manage devices and EMM
  3166  // configs by calling API methods or using their zero-touch enrollment portal.
  3167  // The customer receives an email that welcomes them to zero-touch enrollment
  3168  // and explains how to sign into the portal.
  3169  //
  3170  //   - parent: The parent resource ID in the format `partners/[PARTNER_ID]` that
  3171  //     identifies the reseller.
  3172  func (r *PartnersCustomersService) Create(parent string, createcustomerrequest *CreateCustomerRequest) *PartnersCustomersCreateCall {
  3173  	c := &PartnersCustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3174  	c.parent = parent
  3175  	c.createcustomerrequest = createcustomerrequest
  3176  	return c
  3177  }
  3178  
  3179  // Fields allows partial responses to be retrieved. See
  3180  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3181  // details.
  3182  func (c *PartnersCustomersCreateCall) Fields(s ...googleapi.Field) *PartnersCustomersCreateCall {
  3183  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3184  	return c
  3185  }
  3186  
  3187  // Context sets the context to be used in this call's Do method.
  3188  func (c *PartnersCustomersCreateCall) Context(ctx context.Context) *PartnersCustomersCreateCall {
  3189  	c.ctx_ = ctx
  3190  	return c
  3191  }
  3192  
  3193  // Header returns a http.Header that can be modified by the caller to add
  3194  // headers to the request.
  3195  func (c *PartnersCustomersCreateCall) Header() http.Header {
  3196  	if c.header_ == nil {
  3197  		c.header_ = make(http.Header)
  3198  	}
  3199  	return c.header_
  3200  }
  3201  
  3202  func (c *PartnersCustomersCreateCall) doRequest(alt string) (*http.Response, error) {
  3203  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3204  	var body io.Reader = nil
  3205  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createcustomerrequest)
  3206  	if err != nil {
  3207  		return nil, err
  3208  	}
  3209  	c.urlParams_.Set("alt", alt)
  3210  	c.urlParams_.Set("prettyPrint", "false")
  3211  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers")
  3212  	urls += "?" + c.urlParams_.Encode()
  3213  	req, err := http.NewRequest("POST", urls, body)
  3214  	if err != nil {
  3215  		return nil, err
  3216  	}
  3217  	req.Header = reqHeaders
  3218  	googleapi.Expand(req.URL, map[string]string{
  3219  		"parent": c.parent,
  3220  	})
  3221  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3222  }
  3223  
  3224  // Do executes the "androiddeviceprovisioning.partners.customers.create" call.
  3225  // Any non-2xx status code is an error. Response headers are in either
  3226  // *Company.ServerResponse.Header or (if a response was returned at all) in
  3227  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3228  // whether the returned error was because http.StatusNotModified was returned.
  3229  func (c *PartnersCustomersCreateCall) Do(opts ...googleapi.CallOption) (*Company, error) {
  3230  	gensupport.SetOptions(c.urlParams_, opts...)
  3231  	res, err := c.doRequest("json")
  3232  	if res != nil && res.StatusCode == http.StatusNotModified {
  3233  		if res.Body != nil {
  3234  			res.Body.Close()
  3235  		}
  3236  		return nil, gensupport.WrapError(&googleapi.Error{
  3237  			Code:   res.StatusCode,
  3238  			Header: res.Header,
  3239  		})
  3240  	}
  3241  	if err != nil {
  3242  		return nil, err
  3243  	}
  3244  	defer googleapi.CloseBody(res)
  3245  	if err := googleapi.CheckResponse(res); err != nil {
  3246  		return nil, gensupport.WrapError(err)
  3247  	}
  3248  	ret := &Company{
  3249  		ServerResponse: googleapi.ServerResponse{
  3250  			Header:         res.Header,
  3251  			HTTPStatusCode: res.StatusCode,
  3252  		},
  3253  	}
  3254  	target := &ret
  3255  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3256  		return nil, err
  3257  	}
  3258  	return ret, nil
  3259  }
  3260  
  3261  type PartnersCustomersListCall struct {
  3262  	s            *Service
  3263  	partnerId    int64
  3264  	urlParams_   gensupport.URLParams
  3265  	ifNoneMatch_ string
  3266  	ctx_         context.Context
  3267  	header_      http.Header
  3268  }
  3269  
  3270  // List: Lists the customers that are enrolled to the reseller identified by
  3271  // the `partnerId` argument. This list includes customers that the reseller
  3272  // created and customers that enrolled themselves using the portal.
  3273  //
  3274  // - partnerId: The ID of the reseller partner.
  3275  func (r *PartnersCustomersService) List(partnerId int64) *PartnersCustomersListCall {
  3276  	c := &PartnersCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3277  	c.partnerId = partnerId
  3278  	return c
  3279  }
  3280  
  3281  // PageSize sets the optional parameter "pageSize": The maximum number of
  3282  // results to be returned. If not specified or 0, all the records are returned.
  3283  func (c *PartnersCustomersListCall) PageSize(pageSize int64) *PartnersCustomersListCall {
  3284  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3285  	return c
  3286  }
  3287  
  3288  // PageToken sets the optional parameter "pageToken": A token identifying a
  3289  // page of results returned by the server.
  3290  func (c *PartnersCustomersListCall) PageToken(pageToken string) *PartnersCustomersListCall {
  3291  	c.urlParams_.Set("pageToken", pageToken)
  3292  	return c
  3293  }
  3294  
  3295  // Fields allows partial responses to be retrieved. See
  3296  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3297  // details.
  3298  func (c *PartnersCustomersListCall) Fields(s ...googleapi.Field) *PartnersCustomersListCall {
  3299  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3300  	return c
  3301  }
  3302  
  3303  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3304  // object's ETag matches the given value. This is useful for getting updates
  3305  // only after the object has changed since the last request.
  3306  func (c *PartnersCustomersListCall) IfNoneMatch(entityTag string) *PartnersCustomersListCall {
  3307  	c.ifNoneMatch_ = entityTag
  3308  	return c
  3309  }
  3310  
  3311  // Context sets the context to be used in this call's Do method.
  3312  func (c *PartnersCustomersListCall) Context(ctx context.Context) *PartnersCustomersListCall {
  3313  	c.ctx_ = ctx
  3314  	return c
  3315  }
  3316  
  3317  // Header returns a http.Header that can be modified by the caller to add
  3318  // headers to the request.
  3319  func (c *PartnersCustomersListCall) Header() http.Header {
  3320  	if c.header_ == nil {
  3321  		c.header_ = make(http.Header)
  3322  	}
  3323  	return c.header_
  3324  }
  3325  
  3326  func (c *PartnersCustomersListCall) doRequest(alt string) (*http.Response, error) {
  3327  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3328  	if c.ifNoneMatch_ != "" {
  3329  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3330  	}
  3331  	var body io.Reader = nil
  3332  	c.urlParams_.Set("alt", alt)
  3333  	c.urlParams_.Set("prettyPrint", "false")
  3334  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/customers")
  3335  	urls += "?" + c.urlParams_.Encode()
  3336  	req, err := http.NewRequest("GET", urls, body)
  3337  	if err != nil {
  3338  		return nil, err
  3339  	}
  3340  	req.Header = reqHeaders
  3341  	googleapi.Expand(req.URL, map[string]string{
  3342  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  3343  	})
  3344  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3345  }
  3346  
  3347  // Do executes the "androiddeviceprovisioning.partners.customers.list" call.
  3348  // Any non-2xx status code is an error. Response headers are in either
  3349  // *ListCustomersResponse.ServerResponse.Header or (if a response was returned
  3350  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3351  // check whether the returned error was because http.StatusNotModified was
  3352  // returned.
  3353  func (c *PartnersCustomersListCall) Do(opts ...googleapi.CallOption) (*ListCustomersResponse, error) {
  3354  	gensupport.SetOptions(c.urlParams_, opts...)
  3355  	res, err := c.doRequest("json")
  3356  	if res != nil && res.StatusCode == http.StatusNotModified {
  3357  		if res.Body != nil {
  3358  			res.Body.Close()
  3359  		}
  3360  		return nil, gensupport.WrapError(&googleapi.Error{
  3361  			Code:   res.StatusCode,
  3362  			Header: res.Header,
  3363  		})
  3364  	}
  3365  	if err != nil {
  3366  		return nil, err
  3367  	}
  3368  	defer googleapi.CloseBody(res)
  3369  	if err := googleapi.CheckResponse(res); err != nil {
  3370  		return nil, gensupport.WrapError(err)
  3371  	}
  3372  	ret := &ListCustomersResponse{
  3373  		ServerResponse: googleapi.ServerResponse{
  3374  			Header:         res.Header,
  3375  			HTTPStatusCode: res.StatusCode,
  3376  		},
  3377  	}
  3378  	target := &ret
  3379  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3380  		return nil, err
  3381  	}
  3382  	return ret, nil
  3383  }
  3384  
  3385  // Pages invokes f for each page of results.
  3386  // A non-nil error returned from f will halt the iteration.
  3387  // The provided context supersedes any context provided to the Context method.
  3388  func (c *PartnersCustomersListCall) Pages(ctx context.Context, f func(*ListCustomersResponse) error) error {
  3389  	c.ctx_ = ctx
  3390  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3391  	for {
  3392  		x, err := c.Do()
  3393  		if err != nil {
  3394  			return err
  3395  		}
  3396  		if err := f(x); err != nil {
  3397  			return err
  3398  		}
  3399  		if x.NextPageToken == "" {
  3400  			return nil
  3401  		}
  3402  		c.PageToken(x.NextPageToken)
  3403  	}
  3404  }
  3405  
  3406  type PartnersDevicesClaimCall struct {
  3407  	s                  *Service
  3408  	partnerId          int64
  3409  	claimdevicerequest *ClaimDeviceRequest
  3410  	urlParams_         gensupport.URLParams
  3411  	ctx_               context.Context
  3412  	header_            http.Header
  3413  }
  3414  
  3415  // Claim: Claims a device for a customer and adds it to zero-touch enrollment.
  3416  // If the device is already claimed by another customer, the call returns an
  3417  // error.
  3418  //
  3419  // - partnerId: The ID of the reseller partner.
  3420  func (r *PartnersDevicesService) Claim(partnerId int64, claimdevicerequest *ClaimDeviceRequest) *PartnersDevicesClaimCall {
  3421  	c := &PartnersDevicesClaimCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3422  	c.partnerId = partnerId
  3423  	c.claimdevicerequest = claimdevicerequest
  3424  	return c
  3425  }
  3426  
  3427  // Fields allows partial responses to be retrieved. See
  3428  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3429  // details.
  3430  func (c *PartnersDevicesClaimCall) Fields(s ...googleapi.Field) *PartnersDevicesClaimCall {
  3431  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3432  	return c
  3433  }
  3434  
  3435  // Context sets the context to be used in this call's Do method.
  3436  func (c *PartnersDevicesClaimCall) Context(ctx context.Context) *PartnersDevicesClaimCall {
  3437  	c.ctx_ = ctx
  3438  	return c
  3439  }
  3440  
  3441  // Header returns a http.Header that can be modified by the caller to add
  3442  // headers to the request.
  3443  func (c *PartnersDevicesClaimCall) Header() http.Header {
  3444  	if c.header_ == nil {
  3445  		c.header_ = make(http.Header)
  3446  	}
  3447  	return c.header_
  3448  }
  3449  
  3450  func (c *PartnersDevicesClaimCall) doRequest(alt string) (*http.Response, error) {
  3451  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3452  	var body io.Reader = nil
  3453  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.claimdevicerequest)
  3454  	if err != nil {
  3455  		return nil, err
  3456  	}
  3457  	c.urlParams_.Set("alt", alt)
  3458  	c.urlParams_.Set("prettyPrint", "false")
  3459  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:claim")
  3460  	urls += "?" + c.urlParams_.Encode()
  3461  	req, err := http.NewRequest("POST", urls, body)
  3462  	if err != nil {
  3463  		return nil, err
  3464  	}
  3465  	req.Header = reqHeaders
  3466  	googleapi.Expand(req.URL, map[string]string{
  3467  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  3468  	})
  3469  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3470  }
  3471  
  3472  // Do executes the "androiddeviceprovisioning.partners.devices.claim" call.
  3473  // Any non-2xx status code is an error. Response headers are in either
  3474  // *ClaimDeviceResponse.ServerResponse.Header or (if a response was returned at
  3475  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3476  // check whether the returned error was because http.StatusNotModified was
  3477  // returned.
  3478  func (c *PartnersDevicesClaimCall) Do(opts ...googleapi.CallOption) (*ClaimDeviceResponse, error) {
  3479  	gensupport.SetOptions(c.urlParams_, opts...)
  3480  	res, err := c.doRequest("json")
  3481  	if res != nil && res.StatusCode == http.StatusNotModified {
  3482  		if res.Body != nil {
  3483  			res.Body.Close()
  3484  		}
  3485  		return nil, gensupport.WrapError(&googleapi.Error{
  3486  			Code:   res.StatusCode,
  3487  			Header: res.Header,
  3488  		})
  3489  	}
  3490  	if err != nil {
  3491  		return nil, err
  3492  	}
  3493  	defer googleapi.CloseBody(res)
  3494  	if err := googleapi.CheckResponse(res); err != nil {
  3495  		return nil, gensupport.WrapError(err)
  3496  	}
  3497  	ret := &ClaimDeviceResponse{
  3498  		ServerResponse: googleapi.ServerResponse{
  3499  			Header:         res.Header,
  3500  			HTTPStatusCode: res.StatusCode,
  3501  		},
  3502  	}
  3503  	target := &ret
  3504  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3505  		return nil, err
  3506  	}
  3507  	return ret, nil
  3508  }
  3509  
  3510  type PartnersDevicesClaimAsyncCall struct {
  3511  	s                   *Service
  3512  	partnerId           int64
  3513  	claimdevicesrequest *ClaimDevicesRequest
  3514  	urlParams_          gensupport.URLParams
  3515  	ctx_                context.Context
  3516  	header_             http.Header
  3517  }
  3518  
  3519  // ClaimAsync: Claims a batch of devices for a customer asynchronously. Adds
  3520  // the devices to zero-touch enrollment. To learn more, read Long‑running
  3521  // batch operations (/zero-touch/guides/how-it-works#operations).
  3522  //
  3523  // - partnerId: The ID of the reseller partner.
  3524  func (r *PartnersDevicesService) ClaimAsync(partnerId int64, claimdevicesrequest *ClaimDevicesRequest) *PartnersDevicesClaimAsyncCall {
  3525  	c := &PartnersDevicesClaimAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3526  	c.partnerId = partnerId
  3527  	c.claimdevicesrequest = claimdevicesrequest
  3528  	return c
  3529  }
  3530  
  3531  // Fields allows partial responses to be retrieved. See
  3532  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3533  // details.
  3534  func (c *PartnersDevicesClaimAsyncCall) Fields(s ...googleapi.Field) *PartnersDevicesClaimAsyncCall {
  3535  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3536  	return c
  3537  }
  3538  
  3539  // Context sets the context to be used in this call's Do method.
  3540  func (c *PartnersDevicesClaimAsyncCall) Context(ctx context.Context) *PartnersDevicesClaimAsyncCall {
  3541  	c.ctx_ = ctx
  3542  	return c
  3543  }
  3544  
  3545  // Header returns a http.Header that can be modified by the caller to add
  3546  // headers to the request.
  3547  func (c *PartnersDevicesClaimAsyncCall) Header() http.Header {
  3548  	if c.header_ == nil {
  3549  		c.header_ = make(http.Header)
  3550  	}
  3551  	return c.header_
  3552  }
  3553  
  3554  func (c *PartnersDevicesClaimAsyncCall) doRequest(alt string) (*http.Response, error) {
  3555  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3556  	var body io.Reader = nil
  3557  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.claimdevicesrequest)
  3558  	if err != nil {
  3559  		return nil, err
  3560  	}
  3561  	c.urlParams_.Set("alt", alt)
  3562  	c.urlParams_.Set("prettyPrint", "false")
  3563  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:claimAsync")
  3564  	urls += "?" + c.urlParams_.Encode()
  3565  	req, err := http.NewRequest("POST", urls, body)
  3566  	if err != nil {
  3567  		return nil, err
  3568  	}
  3569  	req.Header = reqHeaders
  3570  	googleapi.Expand(req.URL, map[string]string{
  3571  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  3572  	})
  3573  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3574  }
  3575  
  3576  // Do executes the "androiddeviceprovisioning.partners.devices.claimAsync" call.
  3577  // Any non-2xx status code is an error. Response headers are in either
  3578  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3579  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3580  // whether the returned error was because http.StatusNotModified was returned.
  3581  func (c *PartnersDevicesClaimAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3582  	gensupport.SetOptions(c.urlParams_, opts...)
  3583  	res, err := c.doRequest("json")
  3584  	if res != nil && res.StatusCode == http.StatusNotModified {
  3585  		if res.Body != nil {
  3586  			res.Body.Close()
  3587  		}
  3588  		return nil, gensupport.WrapError(&googleapi.Error{
  3589  			Code:   res.StatusCode,
  3590  			Header: res.Header,
  3591  		})
  3592  	}
  3593  	if err != nil {
  3594  		return nil, err
  3595  	}
  3596  	defer googleapi.CloseBody(res)
  3597  	if err := googleapi.CheckResponse(res); err != nil {
  3598  		return nil, gensupport.WrapError(err)
  3599  	}
  3600  	ret := &Operation{
  3601  		ServerResponse: googleapi.ServerResponse{
  3602  			Header:         res.Header,
  3603  			HTTPStatusCode: res.StatusCode,
  3604  		},
  3605  	}
  3606  	target := &ret
  3607  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3608  		return nil, err
  3609  	}
  3610  	return ret, nil
  3611  }
  3612  
  3613  type PartnersDevicesFindByIdentifierCall struct {
  3614  	s                                    *Service
  3615  	partnerId                            int64
  3616  	finddevicesbydeviceidentifierrequest *FindDevicesByDeviceIdentifierRequest
  3617  	urlParams_                           gensupport.URLParams
  3618  	ctx_                                 context.Context
  3619  	header_                              http.Header
  3620  }
  3621  
  3622  // FindByIdentifier: Finds devices by hardware identifiers, such as IMEI.
  3623  //
  3624  // - partnerId: The ID of the reseller partner.
  3625  func (r *PartnersDevicesService) FindByIdentifier(partnerId int64, finddevicesbydeviceidentifierrequest *FindDevicesByDeviceIdentifierRequest) *PartnersDevicesFindByIdentifierCall {
  3626  	c := &PartnersDevicesFindByIdentifierCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3627  	c.partnerId = partnerId
  3628  	c.finddevicesbydeviceidentifierrequest = finddevicesbydeviceidentifierrequest
  3629  	return c
  3630  }
  3631  
  3632  // Fields allows partial responses to be retrieved. See
  3633  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3634  // details.
  3635  func (c *PartnersDevicesFindByIdentifierCall) Fields(s ...googleapi.Field) *PartnersDevicesFindByIdentifierCall {
  3636  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3637  	return c
  3638  }
  3639  
  3640  // Context sets the context to be used in this call's Do method.
  3641  func (c *PartnersDevicesFindByIdentifierCall) Context(ctx context.Context) *PartnersDevicesFindByIdentifierCall {
  3642  	c.ctx_ = ctx
  3643  	return c
  3644  }
  3645  
  3646  // Header returns a http.Header that can be modified by the caller to add
  3647  // headers to the request.
  3648  func (c *PartnersDevicesFindByIdentifierCall) Header() http.Header {
  3649  	if c.header_ == nil {
  3650  		c.header_ = make(http.Header)
  3651  	}
  3652  	return c.header_
  3653  }
  3654  
  3655  func (c *PartnersDevicesFindByIdentifierCall) doRequest(alt string) (*http.Response, error) {
  3656  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3657  	var body io.Reader = nil
  3658  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.finddevicesbydeviceidentifierrequest)
  3659  	if err != nil {
  3660  		return nil, err
  3661  	}
  3662  	c.urlParams_.Set("alt", alt)
  3663  	c.urlParams_.Set("prettyPrint", "false")
  3664  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:findByIdentifier")
  3665  	urls += "?" + c.urlParams_.Encode()
  3666  	req, err := http.NewRequest("POST", urls, body)
  3667  	if err != nil {
  3668  		return nil, err
  3669  	}
  3670  	req.Header = reqHeaders
  3671  	googleapi.Expand(req.URL, map[string]string{
  3672  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  3673  	})
  3674  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3675  }
  3676  
  3677  // Do executes the "androiddeviceprovisioning.partners.devices.findByIdentifier" call.
  3678  // Any non-2xx status code is an error. Response headers are in either
  3679  // *FindDevicesByDeviceIdentifierResponse.ServerResponse.Header or (if a
  3680  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3681  // googleapi.IsNotModified to check whether the returned error was because
  3682  // http.StatusNotModified was returned.
  3683  func (c *PartnersDevicesFindByIdentifierCall) Do(opts ...googleapi.CallOption) (*FindDevicesByDeviceIdentifierResponse, error) {
  3684  	gensupport.SetOptions(c.urlParams_, opts...)
  3685  	res, err := c.doRequest("json")
  3686  	if res != nil && res.StatusCode == http.StatusNotModified {
  3687  		if res.Body != nil {
  3688  			res.Body.Close()
  3689  		}
  3690  		return nil, gensupport.WrapError(&googleapi.Error{
  3691  			Code:   res.StatusCode,
  3692  			Header: res.Header,
  3693  		})
  3694  	}
  3695  	if err != nil {
  3696  		return nil, err
  3697  	}
  3698  	defer googleapi.CloseBody(res)
  3699  	if err := googleapi.CheckResponse(res); err != nil {
  3700  		return nil, gensupport.WrapError(err)
  3701  	}
  3702  	ret := &FindDevicesByDeviceIdentifierResponse{
  3703  		ServerResponse: googleapi.ServerResponse{
  3704  			Header:         res.Header,
  3705  			HTTPStatusCode: res.StatusCode,
  3706  		},
  3707  	}
  3708  	target := &ret
  3709  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3710  		return nil, err
  3711  	}
  3712  	return ret, nil
  3713  }
  3714  
  3715  // Pages invokes f for each page of results.
  3716  // A non-nil error returned from f will halt the iteration.
  3717  // The provided context supersedes any context provided to the Context method.
  3718  func (c *PartnersDevicesFindByIdentifierCall) Pages(ctx context.Context, f func(*FindDevicesByDeviceIdentifierResponse) error) error {
  3719  	c.ctx_ = ctx
  3720  	defer func(pt string) { c.finddevicesbydeviceidentifierrequest.PageToken = pt }(c.finddevicesbydeviceidentifierrequest.PageToken)
  3721  	for {
  3722  		x, err := c.Do()
  3723  		if err != nil {
  3724  			return err
  3725  		}
  3726  		if err := f(x); err != nil {
  3727  			return err
  3728  		}
  3729  		if x.NextPageToken == "" {
  3730  			return nil
  3731  		}
  3732  		c.finddevicesbydeviceidentifierrequest.PageToken = x.NextPageToken
  3733  	}
  3734  }
  3735  
  3736  type PartnersDevicesFindByOwnerCall struct {
  3737  	s                         *Service
  3738  	partnerId                 int64
  3739  	finddevicesbyownerrequest *FindDevicesByOwnerRequest
  3740  	urlParams_                gensupport.URLParams
  3741  	ctx_                      context.Context
  3742  	header_                   http.Header
  3743  }
  3744  
  3745  // FindByOwner: Finds devices claimed for customers. The results only contain
  3746  // devices registered to the reseller that's identified by the `partnerId`
  3747  // argument. The customer's devices purchased from other resellers don't appear
  3748  // in the results.
  3749  //
  3750  // - partnerId: The ID of the reseller partner.
  3751  func (r *PartnersDevicesService) FindByOwner(partnerId int64, finddevicesbyownerrequest *FindDevicesByOwnerRequest) *PartnersDevicesFindByOwnerCall {
  3752  	c := &PartnersDevicesFindByOwnerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3753  	c.partnerId = partnerId
  3754  	c.finddevicesbyownerrequest = finddevicesbyownerrequest
  3755  	return c
  3756  }
  3757  
  3758  // Fields allows partial responses to be retrieved. See
  3759  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3760  // details.
  3761  func (c *PartnersDevicesFindByOwnerCall) Fields(s ...googleapi.Field) *PartnersDevicesFindByOwnerCall {
  3762  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3763  	return c
  3764  }
  3765  
  3766  // Context sets the context to be used in this call's Do method.
  3767  func (c *PartnersDevicesFindByOwnerCall) Context(ctx context.Context) *PartnersDevicesFindByOwnerCall {
  3768  	c.ctx_ = ctx
  3769  	return c
  3770  }
  3771  
  3772  // Header returns a http.Header that can be modified by the caller to add
  3773  // headers to the request.
  3774  func (c *PartnersDevicesFindByOwnerCall) Header() http.Header {
  3775  	if c.header_ == nil {
  3776  		c.header_ = make(http.Header)
  3777  	}
  3778  	return c.header_
  3779  }
  3780  
  3781  func (c *PartnersDevicesFindByOwnerCall) doRequest(alt string) (*http.Response, error) {
  3782  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3783  	var body io.Reader = nil
  3784  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.finddevicesbyownerrequest)
  3785  	if err != nil {
  3786  		return nil, err
  3787  	}
  3788  	c.urlParams_.Set("alt", alt)
  3789  	c.urlParams_.Set("prettyPrint", "false")
  3790  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:findByOwner")
  3791  	urls += "?" + c.urlParams_.Encode()
  3792  	req, err := http.NewRequest("POST", urls, body)
  3793  	if err != nil {
  3794  		return nil, err
  3795  	}
  3796  	req.Header = reqHeaders
  3797  	googleapi.Expand(req.URL, map[string]string{
  3798  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  3799  	})
  3800  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3801  }
  3802  
  3803  // Do executes the "androiddeviceprovisioning.partners.devices.findByOwner" call.
  3804  // Any non-2xx status code is an error. Response headers are in either
  3805  // *FindDevicesByOwnerResponse.ServerResponse.Header or (if a response was
  3806  // returned at all) in error.(*googleapi.Error).Header. Use
  3807  // googleapi.IsNotModified to check whether the returned error was because
  3808  // http.StatusNotModified was returned.
  3809  func (c *PartnersDevicesFindByOwnerCall) Do(opts ...googleapi.CallOption) (*FindDevicesByOwnerResponse, error) {
  3810  	gensupport.SetOptions(c.urlParams_, opts...)
  3811  	res, err := c.doRequest("json")
  3812  	if res != nil && res.StatusCode == http.StatusNotModified {
  3813  		if res.Body != nil {
  3814  			res.Body.Close()
  3815  		}
  3816  		return nil, gensupport.WrapError(&googleapi.Error{
  3817  			Code:   res.StatusCode,
  3818  			Header: res.Header,
  3819  		})
  3820  	}
  3821  	if err != nil {
  3822  		return nil, err
  3823  	}
  3824  	defer googleapi.CloseBody(res)
  3825  	if err := googleapi.CheckResponse(res); err != nil {
  3826  		return nil, gensupport.WrapError(err)
  3827  	}
  3828  	ret := &FindDevicesByOwnerResponse{
  3829  		ServerResponse: googleapi.ServerResponse{
  3830  			Header:         res.Header,
  3831  			HTTPStatusCode: res.StatusCode,
  3832  		},
  3833  	}
  3834  	target := &ret
  3835  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3836  		return nil, err
  3837  	}
  3838  	return ret, nil
  3839  }
  3840  
  3841  // Pages invokes f for each page of results.
  3842  // A non-nil error returned from f will halt the iteration.
  3843  // The provided context supersedes any context provided to the Context method.
  3844  func (c *PartnersDevicesFindByOwnerCall) Pages(ctx context.Context, f func(*FindDevicesByOwnerResponse) error) error {
  3845  	c.ctx_ = ctx
  3846  	defer func(pt string) { c.finddevicesbyownerrequest.PageToken = pt }(c.finddevicesbyownerrequest.PageToken)
  3847  	for {
  3848  		x, err := c.Do()
  3849  		if err != nil {
  3850  			return err
  3851  		}
  3852  		if err := f(x); err != nil {
  3853  			return err
  3854  		}
  3855  		if x.NextPageToken == "" {
  3856  			return nil
  3857  		}
  3858  		c.finddevicesbyownerrequest.PageToken = x.NextPageToken
  3859  	}
  3860  }
  3861  
  3862  type PartnersDevicesGetCall struct {
  3863  	s            *Service
  3864  	name         string
  3865  	urlParams_   gensupport.URLParams
  3866  	ifNoneMatch_ string
  3867  	ctx_         context.Context
  3868  	header_      http.Header
  3869  }
  3870  
  3871  // Get: Gets a device.
  3872  //
  3873  //   - name: The device API resource name in the format
  3874  //     `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.
  3875  func (r *PartnersDevicesService) Get(name string) *PartnersDevicesGetCall {
  3876  	c := &PartnersDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3877  	c.name = name
  3878  	return c
  3879  }
  3880  
  3881  // Fields allows partial responses to be retrieved. See
  3882  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3883  // details.
  3884  func (c *PartnersDevicesGetCall) Fields(s ...googleapi.Field) *PartnersDevicesGetCall {
  3885  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3886  	return c
  3887  }
  3888  
  3889  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3890  // object's ETag matches the given value. This is useful for getting updates
  3891  // only after the object has changed since the last request.
  3892  func (c *PartnersDevicesGetCall) IfNoneMatch(entityTag string) *PartnersDevicesGetCall {
  3893  	c.ifNoneMatch_ = entityTag
  3894  	return c
  3895  }
  3896  
  3897  // Context sets the context to be used in this call's Do method.
  3898  func (c *PartnersDevicesGetCall) Context(ctx context.Context) *PartnersDevicesGetCall {
  3899  	c.ctx_ = ctx
  3900  	return c
  3901  }
  3902  
  3903  // Header returns a http.Header that can be modified by the caller to add
  3904  // headers to the request.
  3905  func (c *PartnersDevicesGetCall) Header() http.Header {
  3906  	if c.header_ == nil {
  3907  		c.header_ = make(http.Header)
  3908  	}
  3909  	return c.header_
  3910  }
  3911  
  3912  func (c *PartnersDevicesGetCall) doRequest(alt string) (*http.Response, error) {
  3913  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3914  	if c.ifNoneMatch_ != "" {
  3915  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3916  	}
  3917  	var body io.Reader = nil
  3918  	c.urlParams_.Set("alt", alt)
  3919  	c.urlParams_.Set("prettyPrint", "false")
  3920  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3921  	urls += "?" + c.urlParams_.Encode()
  3922  	req, err := http.NewRequest("GET", urls, body)
  3923  	if err != nil {
  3924  		return nil, err
  3925  	}
  3926  	req.Header = reqHeaders
  3927  	googleapi.Expand(req.URL, map[string]string{
  3928  		"name": c.name,
  3929  	})
  3930  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3931  }
  3932  
  3933  // Do executes the "androiddeviceprovisioning.partners.devices.get" call.
  3934  // Any non-2xx status code is an error. Response headers are in either
  3935  // *Device.ServerResponse.Header or (if a response was returned at all) in
  3936  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3937  // whether the returned error was because http.StatusNotModified was returned.
  3938  func (c *PartnersDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) {
  3939  	gensupport.SetOptions(c.urlParams_, opts...)
  3940  	res, err := c.doRequest("json")
  3941  	if res != nil && res.StatusCode == http.StatusNotModified {
  3942  		if res.Body != nil {
  3943  			res.Body.Close()
  3944  		}
  3945  		return nil, gensupport.WrapError(&googleapi.Error{
  3946  			Code:   res.StatusCode,
  3947  			Header: res.Header,
  3948  		})
  3949  	}
  3950  	if err != nil {
  3951  		return nil, err
  3952  	}
  3953  	defer googleapi.CloseBody(res)
  3954  	if err := googleapi.CheckResponse(res); err != nil {
  3955  		return nil, gensupport.WrapError(err)
  3956  	}
  3957  	ret := &Device{
  3958  		ServerResponse: googleapi.ServerResponse{
  3959  			Header:         res.Header,
  3960  			HTTPStatusCode: res.StatusCode,
  3961  		},
  3962  	}
  3963  	target := &ret
  3964  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3965  		return nil, err
  3966  	}
  3967  	return ret, nil
  3968  }
  3969  
  3970  type PartnersDevicesGetSimLockStateCall struct {
  3971  	s                            *Service
  3972  	partnerId                    int64
  3973  	getdevicesimlockstaterequest *GetDeviceSimLockStateRequest
  3974  	urlParams_                   gensupport.URLParams
  3975  	ctx_                         context.Context
  3976  	header_                      http.Header
  3977  }
  3978  
  3979  // GetSimLockState: Gets a device's SIM lock state.
  3980  //
  3981  // - partnerId: The ID of the partner.
  3982  func (r *PartnersDevicesService) GetSimLockState(partnerId int64, getdevicesimlockstaterequest *GetDeviceSimLockStateRequest) *PartnersDevicesGetSimLockStateCall {
  3983  	c := &PartnersDevicesGetSimLockStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3984  	c.partnerId = partnerId
  3985  	c.getdevicesimlockstaterequest = getdevicesimlockstaterequest
  3986  	return c
  3987  }
  3988  
  3989  // Fields allows partial responses to be retrieved. See
  3990  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3991  // details.
  3992  func (c *PartnersDevicesGetSimLockStateCall) Fields(s ...googleapi.Field) *PartnersDevicesGetSimLockStateCall {
  3993  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3994  	return c
  3995  }
  3996  
  3997  // Context sets the context to be used in this call's Do method.
  3998  func (c *PartnersDevicesGetSimLockStateCall) Context(ctx context.Context) *PartnersDevicesGetSimLockStateCall {
  3999  	c.ctx_ = ctx
  4000  	return c
  4001  }
  4002  
  4003  // Header returns a http.Header that can be modified by the caller to add
  4004  // headers to the request.
  4005  func (c *PartnersDevicesGetSimLockStateCall) Header() http.Header {
  4006  	if c.header_ == nil {
  4007  		c.header_ = make(http.Header)
  4008  	}
  4009  	return c.header_
  4010  }
  4011  
  4012  func (c *PartnersDevicesGetSimLockStateCall) doRequest(alt string) (*http.Response, error) {
  4013  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4014  	var body io.Reader = nil
  4015  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdevicesimlockstaterequest)
  4016  	if err != nil {
  4017  		return nil, err
  4018  	}
  4019  	c.urlParams_.Set("alt", alt)
  4020  	c.urlParams_.Set("prettyPrint", "false")
  4021  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:getSimLockState")
  4022  	urls += "?" + c.urlParams_.Encode()
  4023  	req, err := http.NewRequest("POST", urls, body)
  4024  	if err != nil {
  4025  		return nil, err
  4026  	}
  4027  	req.Header = reqHeaders
  4028  	googleapi.Expand(req.URL, map[string]string{
  4029  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  4030  	})
  4031  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4032  }
  4033  
  4034  // Do executes the "androiddeviceprovisioning.partners.devices.getSimLockState" call.
  4035  // Any non-2xx status code is an error. Response headers are in either
  4036  // *GetDeviceSimLockStateResponse.ServerResponse.Header or (if a response was
  4037  // returned at all) in error.(*googleapi.Error).Header. Use
  4038  // googleapi.IsNotModified to check whether the returned error was because
  4039  // http.StatusNotModified was returned.
  4040  func (c *PartnersDevicesGetSimLockStateCall) Do(opts ...googleapi.CallOption) (*GetDeviceSimLockStateResponse, error) {
  4041  	gensupport.SetOptions(c.urlParams_, opts...)
  4042  	res, err := c.doRequest("json")
  4043  	if res != nil && res.StatusCode == http.StatusNotModified {
  4044  		if res.Body != nil {
  4045  			res.Body.Close()
  4046  		}
  4047  		return nil, gensupport.WrapError(&googleapi.Error{
  4048  			Code:   res.StatusCode,
  4049  			Header: res.Header,
  4050  		})
  4051  	}
  4052  	if err != nil {
  4053  		return nil, err
  4054  	}
  4055  	defer googleapi.CloseBody(res)
  4056  	if err := googleapi.CheckResponse(res); err != nil {
  4057  		return nil, gensupport.WrapError(err)
  4058  	}
  4059  	ret := &GetDeviceSimLockStateResponse{
  4060  		ServerResponse: googleapi.ServerResponse{
  4061  			Header:         res.Header,
  4062  			HTTPStatusCode: res.StatusCode,
  4063  		},
  4064  	}
  4065  	target := &ret
  4066  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4067  		return nil, err
  4068  	}
  4069  	return ret, nil
  4070  }
  4071  
  4072  type PartnersDevicesMetadataCall struct {
  4073  	s                           *Service
  4074  	metadataOwnerId             int64
  4075  	deviceId                    int64
  4076  	updatedevicemetadatarequest *UpdateDeviceMetadataRequest
  4077  	urlParams_                  gensupport.URLParams
  4078  	ctx_                        context.Context
  4079  	header_                     http.Header
  4080  }
  4081  
  4082  // Metadata: Updates reseller metadata associated with the device. Android
  4083  // devices only.
  4084  //
  4085  //   - deviceId: The ID of the device.
  4086  //   - metadataOwnerId: The owner of the newly set metadata. Set this to the
  4087  //     partner ID.
  4088  func (r *PartnersDevicesService) Metadata(metadataOwnerId int64, deviceId int64, updatedevicemetadatarequest *UpdateDeviceMetadataRequest) *PartnersDevicesMetadataCall {
  4089  	c := &PartnersDevicesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4090  	c.metadataOwnerId = metadataOwnerId
  4091  	c.deviceId = deviceId
  4092  	c.updatedevicemetadatarequest = updatedevicemetadatarequest
  4093  	return c
  4094  }
  4095  
  4096  // Fields allows partial responses to be retrieved. See
  4097  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4098  // details.
  4099  func (c *PartnersDevicesMetadataCall) Fields(s ...googleapi.Field) *PartnersDevicesMetadataCall {
  4100  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4101  	return c
  4102  }
  4103  
  4104  // Context sets the context to be used in this call's Do method.
  4105  func (c *PartnersDevicesMetadataCall) Context(ctx context.Context) *PartnersDevicesMetadataCall {
  4106  	c.ctx_ = ctx
  4107  	return c
  4108  }
  4109  
  4110  // Header returns a http.Header that can be modified by the caller to add
  4111  // headers to the request.
  4112  func (c *PartnersDevicesMetadataCall) Header() http.Header {
  4113  	if c.header_ == nil {
  4114  		c.header_ = make(http.Header)
  4115  	}
  4116  	return c.header_
  4117  }
  4118  
  4119  func (c *PartnersDevicesMetadataCall) doRequest(alt string) (*http.Response, error) {
  4120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4121  	var body io.Reader = nil
  4122  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatedevicemetadatarequest)
  4123  	if err != nil {
  4124  		return nil, err
  4125  	}
  4126  	c.urlParams_.Set("alt", alt)
  4127  	c.urlParams_.Set("prettyPrint", "false")
  4128  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+metadataOwnerId}/devices/{+deviceId}/metadata")
  4129  	urls += "?" + c.urlParams_.Encode()
  4130  	req, err := http.NewRequest("POST", urls, body)
  4131  	if err != nil {
  4132  		return nil, err
  4133  	}
  4134  	req.Header = reqHeaders
  4135  	googleapi.Expand(req.URL, map[string]string{
  4136  		"metadataOwnerId": strconv.FormatInt(c.metadataOwnerId, 10),
  4137  		"deviceId":        strconv.FormatInt(c.deviceId, 10),
  4138  	})
  4139  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4140  }
  4141  
  4142  // Do executes the "androiddeviceprovisioning.partners.devices.metadata" call.
  4143  // Any non-2xx status code is an error. Response headers are in either
  4144  // *DeviceMetadata.ServerResponse.Header or (if a response was returned at all)
  4145  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4146  // whether the returned error was because http.StatusNotModified was returned.
  4147  func (c *PartnersDevicesMetadataCall) Do(opts ...googleapi.CallOption) (*DeviceMetadata, error) {
  4148  	gensupport.SetOptions(c.urlParams_, opts...)
  4149  	res, err := c.doRequest("json")
  4150  	if res != nil && res.StatusCode == http.StatusNotModified {
  4151  		if res.Body != nil {
  4152  			res.Body.Close()
  4153  		}
  4154  		return nil, gensupport.WrapError(&googleapi.Error{
  4155  			Code:   res.StatusCode,
  4156  			Header: res.Header,
  4157  		})
  4158  	}
  4159  	if err != nil {
  4160  		return nil, err
  4161  	}
  4162  	defer googleapi.CloseBody(res)
  4163  	if err := googleapi.CheckResponse(res); err != nil {
  4164  		return nil, gensupport.WrapError(err)
  4165  	}
  4166  	ret := &DeviceMetadata{
  4167  		ServerResponse: googleapi.ServerResponse{
  4168  			Header:         res.Header,
  4169  			HTTPStatusCode: res.StatusCode,
  4170  		},
  4171  	}
  4172  	target := &ret
  4173  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4174  		return nil, err
  4175  	}
  4176  	return ret, nil
  4177  }
  4178  
  4179  type PartnersDevicesUnclaimCall struct {
  4180  	s                    *Service
  4181  	partnerId            int64
  4182  	unclaimdevicerequest *UnclaimDeviceRequest
  4183  	urlParams_           gensupport.URLParams
  4184  	ctx_                 context.Context
  4185  	header_              http.Header
  4186  }
  4187  
  4188  // Unclaim: Unclaims a device from a customer and removes it from zero-touch
  4189  // enrollment.
  4190  //
  4191  // - partnerId: The ID of the reseller partner.
  4192  func (r *PartnersDevicesService) Unclaim(partnerId int64, unclaimdevicerequest *UnclaimDeviceRequest) *PartnersDevicesUnclaimCall {
  4193  	c := &PartnersDevicesUnclaimCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4194  	c.partnerId = partnerId
  4195  	c.unclaimdevicerequest = unclaimdevicerequest
  4196  	return c
  4197  }
  4198  
  4199  // Fields allows partial responses to be retrieved. See
  4200  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4201  // details.
  4202  func (c *PartnersDevicesUnclaimCall) Fields(s ...googleapi.Field) *PartnersDevicesUnclaimCall {
  4203  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4204  	return c
  4205  }
  4206  
  4207  // Context sets the context to be used in this call's Do method.
  4208  func (c *PartnersDevicesUnclaimCall) Context(ctx context.Context) *PartnersDevicesUnclaimCall {
  4209  	c.ctx_ = ctx
  4210  	return c
  4211  }
  4212  
  4213  // Header returns a http.Header that can be modified by the caller to add
  4214  // headers to the request.
  4215  func (c *PartnersDevicesUnclaimCall) Header() http.Header {
  4216  	if c.header_ == nil {
  4217  		c.header_ = make(http.Header)
  4218  	}
  4219  	return c.header_
  4220  }
  4221  
  4222  func (c *PartnersDevicesUnclaimCall) doRequest(alt string) (*http.Response, error) {
  4223  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4224  	var body io.Reader = nil
  4225  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unclaimdevicerequest)
  4226  	if err != nil {
  4227  		return nil, err
  4228  	}
  4229  	c.urlParams_.Set("alt", alt)
  4230  	c.urlParams_.Set("prettyPrint", "false")
  4231  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:unclaim")
  4232  	urls += "?" + c.urlParams_.Encode()
  4233  	req, err := http.NewRequest("POST", urls, body)
  4234  	if err != nil {
  4235  		return nil, err
  4236  	}
  4237  	req.Header = reqHeaders
  4238  	googleapi.Expand(req.URL, map[string]string{
  4239  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  4240  	})
  4241  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4242  }
  4243  
  4244  // Do executes the "androiddeviceprovisioning.partners.devices.unclaim" call.
  4245  // Any non-2xx status code is an error. Response headers are in either
  4246  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4247  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4248  // whether the returned error was because http.StatusNotModified was returned.
  4249  func (c *PartnersDevicesUnclaimCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4250  	gensupport.SetOptions(c.urlParams_, opts...)
  4251  	res, err := c.doRequest("json")
  4252  	if res != nil && res.StatusCode == http.StatusNotModified {
  4253  		if res.Body != nil {
  4254  			res.Body.Close()
  4255  		}
  4256  		return nil, gensupport.WrapError(&googleapi.Error{
  4257  			Code:   res.StatusCode,
  4258  			Header: res.Header,
  4259  		})
  4260  	}
  4261  	if err != nil {
  4262  		return nil, err
  4263  	}
  4264  	defer googleapi.CloseBody(res)
  4265  	if err := googleapi.CheckResponse(res); err != nil {
  4266  		return nil, gensupport.WrapError(err)
  4267  	}
  4268  	ret := &Empty{
  4269  		ServerResponse: googleapi.ServerResponse{
  4270  			Header:         res.Header,
  4271  			HTTPStatusCode: res.StatusCode,
  4272  		},
  4273  	}
  4274  	target := &ret
  4275  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4276  		return nil, err
  4277  	}
  4278  	return ret, nil
  4279  }
  4280  
  4281  type PartnersDevicesUnclaimAsyncCall struct {
  4282  	s                     *Service
  4283  	partnerId             int64
  4284  	unclaimdevicesrequest *UnclaimDevicesRequest
  4285  	urlParams_            gensupport.URLParams
  4286  	ctx_                  context.Context
  4287  	header_               http.Header
  4288  }
  4289  
  4290  // UnclaimAsync: Unclaims a batch of devices for a customer asynchronously.
  4291  // Removes the devices from zero-touch enrollment. To learn more, read
  4292  // Long‑running batch operations
  4293  // (/zero-touch/guides/how-it-works#operations).
  4294  //
  4295  // - partnerId: The reseller partner ID.
  4296  func (r *PartnersDevicesService) UnclaimAsync(partnerId int64, unclaimdevicesrequest *UnclaimDevicesRequest) *PartnersDevicesUnclaimAsyncCall {
  4297  	c := &PartnersDevicesUnclaimAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4298  	c.partnerId = partnerId
  4299  	c.unclaimdevicesrequest = unclaimdevicesrequest
  4300  	return c
  4301  }
  4302  
  4303  // Fields allows partial responses to be retrieved. See
  4304  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4305  // details.
  4306  func (c *PartnersDevicesUnclaimAsyncCall) Fields(s ...googleapi.Field) *PartnersDevicesUnclaimAsyncCall {
  4307  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4308  	return c
  4309  }
  4310  
  4311  // Context sets the context to be used in this call's Do method.
  4312  func (c *PartnersDevicesUnclaimAsyncCall) Context(ctx context.Context) *PartnersDevicesUnclaimAsyncCall {
  4313  	c.ctx_ = ctx
  4314  	return c
  4315  }
  4316  
  4317  // Header returns a http.Header that can be modified by the caller to add
  4318  // headers to the request.
  4319  func (c *PartnersDevicesUnclaimAsyncCall) Header() http.Header {
  4320  	if c.header_ == nil {
  4321  		c.header_ = make(http.Header)
  4322  	}
  4323  	return c.header_
  4324  }
  4325  
  4326  func (c *PartnersDevicesUnclaimAsyncCall) doRequest(alt string) (*http.Response, error) {
  4327  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4328  	var body io.Reader = nil
  4329  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unclaimdevicesrequest)
  4330  	if err != nil {
  4331  		return nil, err
  4332  	}
  4333  	c.urlParams_.Set("alt", alt)
  4334  	c.urlParams_.Set("prettyPrint", "false")
  4335  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:unclaimAsync")
  4336  	urls += "?" + c.urlParams_.Encode()
  4337  	req, err := http.NewRequest("POST", urls, body)
  4338  	if err != nil {
  4339  		return nil, err
  4340  	}
  4341  	req.Header = reqHeaders
  4342  	googleapi.Expand(req.URL, map[string]string{
  4343  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  4344  	})
  4345  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4346  }
  4347  
  4348  // Do executes the "androiddeviceprovisioning.partners.devices.unclaimAsync" call.
  4349  // Any non-2xx status code is an error. Response headers are in either
  4350  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4351  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4352  // whether the returned error was because http.StatusNotModified was returned.
  4353  func (c *PartnersDevicesUnclaimAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4354  	gensupport.SetOptions(c.urlParams_, opts...)
  4355  	res, err := c.doRequest("json")
  4356  	if res != nil && res.StatusCode == http.StatusNotModified {
  4357  		if res.Body != nil {
  4358  			res.Body.Close()
  4359  		}
  4360  		return nil, gensupport.WrapError(&googleapi.Error{
  4361  			Code:   res.StatusCode,
  4362  			Header: res.Header,
  4363  		})
  4364  	}
  4365  	if err != nil {
  4366  		return nil, err
  4367  	}
  4368  	defer googleapi.CloseBody(res)
  4369  	if err := googleapi.CheckResponse(res); err != nil {
  4370  		return nil, gensupport.WrapError(err)
  4371  	}
  4372  	ret := &Operation{
  4373  		ServerResponse: googleapi.ServerResponse{
  4374  			Header:         res.Header,
  4375  			HTTPStatusCode: res.StatusCode,
  4376  		},
  4377  	}
  4378  	target := &ret
  4379  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4380  		return nil, err
  4381  	}
  4382  	return ret, nil
  4383  }
  4384  
  4385  type PartnersDevicesUpdateMetadataAsyncCall struct {
  4386  	s                                  *Service
  4387  	partnerId                          int64
  4388  	updatedevicemetadatainbatchrequest *UpdateDeviceMetadataInBatchRequest
  4389  	urlParams_                         gensupport.URLParams
  4390  	ctx_                               context.Context
  4391  	header_                            http.Header
  4392  }
  4393  
  4394  // UpdateMetadataAsync: Updates the reseller metadata attached to a batch of
  4395  // devices. This method updates devices asynchronously and returns an
  4396  // `Operation` that can be used to track progress. Read Long‑running batch
  4397  // operations (/zero-touch/guides/how-it-works#operations). Android Devices
  4398  // only.
  4399  //
  4400  // - partnerId: The reseller partner ID.
  4401  func (r *PartnersDevicesService) UpdateMetadataAsync(partnerId int64, updatedevicemetadatainbatchrequest *UpdateDeviceMetadataInBatchRequest) *PartnersDevicesUpdateMetadataAsyncCall {
  4402  	c := &PartnersDevicesUpdateMetadataAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4403  	c.partnerId = partnerId
  4404  	c.updatedevicemetadatainbatchrequest = updatedevicemetadatainbatchrequest
  4405  	return c
  4406  }
  4407  
  4408  // Fields allows partial responses to be retrieved. See
  4409  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4410  // details.
  4411  func (c *PartnersDevicesUpdateMetadataAsyncCall) Fields(s ...googleapi.Field) *PartnersDevicesUpdateMetadataAsyncCall {
  4412  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4413  	return c
  4414  }
  4415  
  4416  // Context sets the context to be used in this call's Do method.
  4417  func (c *PartnersDevicesUpdateMetadataAsyncCall) Context(ctx context.Context) *PartnersDevicesUpdateMetadataAsyncCall {
  4418  	c.ctx_ = ctx
  4419  	return c
  4420  }
  4421  
  4422  // Header returns a http.Header that can be modified by the caller to add
  4423  // headers to the request.
  4424  func (c *PartnersDevicesUpdateMetadataAsyncCall) Header() http.Header {
  4425  	if c.header_ == nil {
  4426  		c.header_ = make(http.Header)
  4427  	}
  4428  	return c.header_
  4429  }
  4430  
  4431  func (c *PartnersDevicesUpdateMetadataAsyncCall) doRequest(alt string) (*http.Response, error) {
  4432  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4433  	var body io.Reader = nil
  4434  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatedevicemetadatainbatchrequest)
  4435  	if err != nil {
  4436  		return nil, err
  4437  	}
  4438  	c.urlParams_.Set("alt", alt)
  4439  	c.urlParams_.Set("prettyPrint", "false")
  4440  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:updateMetadataAsync")
  4441  	urls += "?" + c.urlParams_.Encode()
  4442  	req, err := http.NewRequest("POST", urls, body)
  4443  	if err != nil {
  4444  		return nil, err
  4445  	}
  4446  	req.Header = reqHeaders
  4447  	googleapi.Expand(req.URL, map[string]string{
  4448  		"partnerId": strconv.FormatInt(c.partnerId, 10),
  4449  	})
  4450  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4451  }
  4452  
  4453  // Do executes the "androiddeviceprovisioning.partners.devices.updateMetadataAsync" call.
  4454  // Any non-2xx status code is an error. Response headers are in either
  4455  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4456  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4457  // whether the returned error was because http.StatusNotModified was returned.
  4458  func (c *PartnersDevicesUpdateMetadataAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4459  	gensupport.SetOptions(c.urlParams_, opts...)
  4460  	res, err := c.doRequest("json")
  4461  	if res != nil && res.StatusCode == http.StatusNotModified {
  4462  		if res.Body != nil {
  4463  			res.Body.Close()
  4464  		}
  4465  		return nil, gensupport.WrapError(&googleapi.Error{
  4466  			Code:   res.StatusCode,
  4467  			Header: res.Header,
  4468  		})
  4469  	}
  4470  	if err != nil {
  4471  		return nil, err
  4472  	}
  4473  	defer googleapi.CloseBody(res)
  4474  	if err := googleapi.CheckResponse(res); err != nil {
  4475  		return nil, gensupport.WrapError(err)
  4476  	}
  4477  	ret := &Operation{
  4478  		ServerResponse: googleapi.ServerResponse{
  4479  			Header:         res.Header,
  4480  			HTTPStatusCode: res.StatusCode,
  4481  		},
  4482  	}
  4483  	target := &ret
  4484  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4485  		return nil, err
  4486  	}
  4487  	return ret, nil
  4488  }
  4489  
  4490  type PartnersVendorsListCall struct {
  4491  	s            *Service
  4492  	parent       string
  4493  	urlParams_   gensupport.URLParams
  4494  	ifNoneMatch_ string
  4495  	ctx_         context.Context
  4496  	header_      http.Header
  4497  }
  4498  
  4499  // List: Lists the vendors of the partner.
  4500  //
  4501  // - parent: The resource name in the format `partners/[PARTNER_ID]`.
  4502  func (r *PartnersVendorsService) List(parent string) *PartnersVendorsListCall {
  4503  	c := &PartnersVendorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4504  	c.parent = parent
  4505  	return c
  4506  }
  4507  
  4508  // PageSize sets the optional parameter "pageSize": The maximum number of
  4509  // results to be returned.
  4510  func (c *PartnersVendorsListCall) PageSize(pageSize int64) *PartnersVendorsListCall {
  4511  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4512  	return c
  4513  }
  4514  
  4515  // PageToken sets the optional parameter "pageToken": A token identifying a
  4516  // page of results returned by the server.
  4517  func (c *PartnersVendorsListCall) PageToken(pageToken string) *PartnersVendorsListCall {
  4518  	c.urlParams_.Set("pageToken", pageToken)
  4519  	return c
  4520  }
  4521  
  4522  // Fields allows partial responses to be retrieved. See
  4523  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4524  // details.
  4525  func (c *PartnersVendorsListCall) Fields(s ...googleapi.Field) *PartnersVendorsListCall {
  4526  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4527  	return c
  4528  }
  4529  
  4530  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4531  // object's ETag matches the given value. This is useful for getting updates
  4532  // only after the object has changed since the last request.
  4533  func (c *PartnersVendorsListCall) IfNoneMatch(entityTag string) *PartnersVendorsListCall {
  4534  	c.ifNoneMatch_ = entityTag
  4535  	return c
  4536  }
  4537  
  4538  // Context sets the context to be used in this call's Do method.
  4539  func (c *PartnersVendorsListCall) Context(ctx context.Context) *PartnersVendorsListCall {
  4540  	c.ctx_ = ctx
  4541  	return c
  4542  }
  4543  
  4544  // Header returns a http.Header that can be modified by the caller to add
  4545  // headers to the request.
  4546  func (c *PartnersVendorsListCall) Header() http.Header {
  4547  	if c.header_ == nil {
  4548  		c.header_ = make(http.Header)
  4549  	}
  4550  	return c.header_
  4551  }
  4552  
  4553  func (c *PartnersVendorsListCall) doRequest(alt string) (*http.Response, error) {
  4554  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4555  	if c.ifNoneMatch_ != "" {
  4556  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4557  	}
  4558  	var body io.Reader = nil
  4559  	c.urlParams_.Set("alt", alt)
  4560  	c.urlParams_.Set("prettyPrint", "false")
  4561  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vendors")
  4562  	urls += "?" + c.urlParams_.Encode()
  4563  	req, err := http.NewRequest("GET", urls, body)
  4564  	if err != nil {
  4565  		return nil, err
  4566  	}
  4567  	req.Header = reqHeaders
  4568  	googleapi.Expand(req.URL, map[string]string{
  4569  		"parent": c.parent,
  4570  	})
  4571  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4572  }
  4573  
  4574  // Do executes the "androiddeviceprovisioning.partners.vendors.list" call.
  4575  // Any non-2xx status code is an error. Response headers are in either
  4576  // *ListVendorsResponse.ServerResponse.Header or (if a response was returned at
  4577  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4578  // check whether the returned error was because http.StatusNotModified was
  4579  // returned.
  4580  func (c *PartnersVendorsListCall) Do(opts ...googleapi.CallOption) (*ListVendorsResponse, error) {
  4581  	gensupport.SetOptions(c.urlParams_, opts...)
  4582  	res, err := c.doRequest("json")
  4583  	if res != nil && res.StatusCode == http.StatusNotModified {
  4584  		if res.Body != nil {
  4585  			res.Body.Close()
  4586  		}
  4587  		return nil, gensupport.WrapError(&googleapi.Error{
  4588  			Code:   res.StatusCode,
  4589  			Header: res.Header,
  4590  		})
  4591  	}
  4592  	if err != nil {
  4593  		return nil, err
  4594  	}
  4595  	defer googleapi.CloseBody(res)
  4596  	if err := googleapi.CheckResponse(res); err != nil {
  4597  		return nil, gensupport.WrapError(err)
  4598  	}
  4599  	ret := &ListVendorsResponse{
  4600  		ServerResponse: googleapi.ServerResponse{
  4601  			Header:         res.Header,
  4602  			HTTPStatusCode: res.StatusCode,
  4603  		},
  4604  	}
  4605  	target := &ret
  4606  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4607  		return nil, err
  4608  	}
  4609  	return ret, nil
  4610  }
  4611  
  4612  // Pages invokes f for each page of results.
  4613  // A non-nil error returned from f will halt the iteration.
  4614  // The provided context supersedes any context provided to the Context method.
  4615  func (c *PartnersVendorsListCall) Pages(ctx context.Context, f func(*ListVendorsResponse) error) error {
  4616  	c.ctx_ = ctx
  4617  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4618  	for {
  4619  		x, err := c.Do()
  4620  		if err != nil {
  4621  			return err
  4622  		}
  4623  		if err := f(x); err != nil {
  4624  			return err
  4625  		}
  4626  		if x.NextPageToken == "" {
  4627  			return nil
  4628  		}
  4629  		c.PageToken(x.NextPageToken)
  4630  	}
  4631  }
  4632  
  4633  type PartnersVendorsCustomersListCall struct {
  4634  	s            *Service
  4635  	parent       string
  4636  	urlParams_   gensupport.URLParams
  4637  	ifNoneMatch_ string
  4638  	ctx_         context.Context
  4639  	header_      http.Header
  4640  }
  4641  
  4642  // List: Lists the customers of the vendor.
  4643  //
  4644  //   - parent: The resource name in the format
  4645  //     `partners/[PARTNER_ID]/vendors/[VENDOR_ID]`.
  4646  func (r *PartnersVendorsCustomersService) List(parent string) *PartnersVendorsCustomersListCall {
  4647  	c := &PartnersVendorsCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4648  	c.parent = parent
  4649  	return c
  4650  }
  4651  
  4652  // PageSize sets the optional parameter "pageSize": The maximum number of
  4653  // results to be returned.
  4654  func (c *PartnersVendorsCustomersListCall) PageSize(pageSize int64) *PartnersVendorsCustomersListCall {
  4655  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4656  	return c
  4657  }
  4658  
  4659  // PageToken sets the optional parameter "pageToken": A token identifying a
  4660  // page of results returned by the server.
  4661  func (c *PartnersVendorsCustomersListCall) PageToken(pageToken string) *PartnersVendorsCustomersListCall {
  4662  	c.urlParams_.Set("pageToken", pageToken)
  4663  	return c
  4664  }
  4665  
  4666  // Fields allows partial responses to be retrieved. See
  4667  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4668  // details.
  4669  func (c *PartnersVendorsCustomersListCall) Fields(s ...googleapi.Field) *PartnersVendorsCustomersListCall {
  4670  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4671  	return c
  4672  }
  4673  
  4674  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4675  // object's ETag matches the given value. This is useful for getting updates
  4676  // only after the object has changed since the last request.
  4677  func (c *PartnersVendorsCustomersListCall) IfNoneMatch(entityTag string) *PartnersVendorsCustomersListCall {
  4678  	c.ifNoneMatch_ = entityTag
  4679  	return c
  4680  }
  4681  
  4682  // Context sets the context to be used in this call's Do method.
  4683  func (c *PartnersVendorsCustomersListCall) Context(ctx context.Context) *PartnersVendorsCustomersListCall {
  4684  	c.ctx_ = ctx
  4685  	return c
  4686  }
  4687  
  4688  // Header returns a http.Header that can be modified by the caller to add
  4689  // headers to the request.
  4690  func (c *PartnersVendorsCustomersListCall) Header() http.Header {
  4691  	if c.header_ == nil {
  4692  		c.header_ = make(http.Header)
  4693  	}
  4694  	return c.header_
  4695  }
  4696  
  4697  func (c *PartnersVendorsCustomersListCall) doRequest(alt string) (*http.Response, error) {
  4698  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4699  	if c.ifNoneMatch_ != "" {
  4700  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4701  	}
  4702  	var body io.Reader = nil
  4703  	c.urlParams_.Set("alt", alt)
  4704  	c.urlParams_.Set("prettyPrint", "false")
  4705  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers")
  4706  	urls += "?" + c.urlParams_.Encode()
  4707  	req, err := http.NewRequest("GET", urls, body)
  4708  	if err != nil {
  4709  		return nil, err
  4710  	}
  4711  	req.Header = reqHeaders
  4712  	googleapi.Expand(req.URL, map[string]string{
  4713  		"parent": c.parent,
  4714  	})
  4715  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4716  }
  4717  
  4718  // Do executes the "androiddeviceprovisioning.partners.vendors.customers.list" call.
  4719  // Any non-2xx status code is an error. Response headers are in either
  4720  // *ListVendorCustomersResponse.ServerResponse.Header or (if a response was
  4721  // returned at all) in error.(*googleapi.Error).Header. Use
  4722  // googleapi.IsNotModified to check whether the returned error was because
  4723  // http.StatusNotModified was returned.
  4724  func (c *PartnersVendorsCustomersListCall) Do(opts ...googleapi.CallOption) (*ListVendorCustomersResponse, error) {
  4725  	gensupport.SetOptions(c.urlParams_, opts...)
  4726  	res, err := c.doRequest("json")
  4727  	if res != nil && res.StatusCode == http.StatusNotModified {
  4728  		if res.Body != nil {
  4729  			res.Body.Close()
  4730  		}
  4731  		return nil, gensupport.WrapError(&googleapi.Error{
  4732  			Code:   res.StatusCode,
  4733  			Header: res.Header,
  4734  		})
  4735  	}
  4736  	if err != nil {
  4737  		return nil, err
  4738  	}
  4739  	defer googleapi.CloseBody(res)
  4740  	if err := googleapi.CheckResponse(res); err != nil {
  4741  		return nil, gensupport.WrapError(err)
  4742  	}
  4743  	ret := &ListVendorCustomersResponse{
  4744  		ServerResponse: googleapi.ServerResponse{
  4745  			Header:         res.Header,
  4746  			HTTPStatusCode: res.StatusCode,
  4747  		},
  4748  	}
  4749  	target := &ret
  4750  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4751  		return nil, err
  4752  	}
  4753  	return ret, nil
  4754  }
  4755  
  4756  // Pages invokes f for each page of results.
  4757  // A non-nil error returned from f will halt the iteration.
  4758  // The provided context supersedes any context provided to the Context method.
  4759  func (c *PartnersVendorsCustomersListCall) Pages(ctx context.Context, f func(*ListVendorCustomersResponse) error) error {
  4760  	c.ctx_ = ctx
  4761  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4762  	for {
  4763  		x, err := c.Do()
  4764  		if err != nil {
  4765  			return err
  4766  		}
  4767  		if err := f(x); err != nil {
  4768  			return err
  4769  		}
  4770  		if x.NextPageToken == "" {
  4771  			return nil
  4772  		}
  4773  		c.PageToken(x.NextPageToken)
  4774  	}
  4775  }
  4776  

View as plain text