From 9b3cabe475c5f11a6cff03e08e4f43d4262593df Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 26 Apr 2022 09:27:31 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1523) --- api-list.json | 4 +- apigee/v1/apigee-api.json | 4 +- apigee/v1/apigee-gen.go | 2 +- .../v2/baremetalsolution-api.json | 59 +- baremetalsolution/v2/baremetalsolution-gen.go | 164 +- cloudchannel/v1/cloudchannel-api.json | 493 +- cloudchannel/v1/cloudchannel-gen.go | 4423 ++++++++++++----- container/v1/container-api.json | 40 +- container/v1/container-gen.go | 72 + documentai/v1/documentai-api.json | 24 +- documentai/v1/documentai-gen.go | 37 + documentai/v1beta2/documentai-api.json | 24 +- documentai/v1beta2/documentai-gen.go | 37 + documentai/v1beta3/documentai-api.json | 24 +- documentai/v1beta3/documentai-gen.go | 37 + .../v2/doubleclicksearch-api.json | 43 +- doubleclicksearch/v2/doubleclicksearch-gen.go | 188 + .../v1alpha1/prod_tt_sasportal-api.json | 396 +- .../v1alpha1/prod_tt_sasportal-gen.go | 396 +- sasportal/v1alpha1/sasportal-api.json | 396 +- sasportal/v1alpha1/sasportal-gen.go | 396 +- 21 files changed, 5824 insertions(+), 1435 deletions(-) diff --git a/api-list.json b/api-list.json index 0446f6be8f5..667dabaa720 100644 --- a/api-list.json +++ b/api-list.json @@ -2397,7 +2397,7 @@ "name": "eventarc", "version": "v1beta1", "title": "Eventarc API", - "description": "", + "description": "Build event-driven applications on Google Cloud Platform.", "discoveryRestUrl": "https://eventarc.googleapis.com/$discovery/rest?version=v1beta1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -2412,7 +2412,7 @@ "name": "eventarc", "version": "v1", "title": "Eventarc API", - "description": "", + "description": "Build event-driven applications on Google Cloud Platform.", "discoveryRestUrl": "https://eventarc.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index ed98989bc3f..9f8c7e8bbdf 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -7588,7 +7588,7 @@ } } }, - "revision": "20220407", + "revision": "20220421", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -8009,7 +8009,7 @@ "type": "boolean" }, "revision": { - "description": "Output only. List of revisons defined for the API proxy.", + "description": "Output only. List of revisions defined for the API proxy.", "items": { "type": "string" }, diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index dbf201f6d24..4642fe0a921 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -1746,7 +1746,7 @@ type GoogleCloudApigeeV1ApiProxy struct { // an archive. ReadOnly bool `json:"readOnly,omitempty"` - // Revision: Output only. List of revisons defined for the API proxy. + // Revision: Output only. List of revisions defined for the API proxy. Revision []string `json:"revision,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index 806f1a46461..ab60d3d43af 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -290,7 +290,7 @@ "type": "string" }, "updateMask": { - "description": "The list of fields to update. The only currently supported fields are: `labels`", + "description": "The list of fields to update. The only currently supported fields are: `labels` `hyperthreading_enabled`", "format": "google-fieldmask", "location": "query", "type": "string" @@ -362,6 +362,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "stop": { + "description": "Stop a running server.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:stop", + "httpMethod": "POST", + "id": "baremetalsolution.projects.locations.instances.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:stop", + "request": { + "$ref": "StopInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1251,7 +1279,7 @@ } } }, - "revision": "20220405", + "revision": "20220418", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "AllowedClient": { @@ -1371,6 +1399,10 @@ }, "type": "array" }, + "osImage": { + "description": "The OS image currently installed on the server.", + "type": "string" + }, "state": { "description": "The state of the server.", "enum": [ @@ -2269,12 +2301,20 @@ "enum": [ "STATE_UNSPECIFIED", "DRAFT", - "SUBMITTED" + "SUBMITTED", + "PROVISIONING", + "PROVISIONED", + "VALIDATED", + "CANCELLED" ], "enumDescriptions": [ "State wasn't specified.", "ProvisioningConfig is a draft and can be freely modified.", - "ProvisioningConfig was already submitted and cannot be modified." + "ProvisioningConfig was already submitted and cannot be modified.", + "ProvisioningConfig was in the provisioning state. Initially this state comes from the work order table in big query when SNOW is used. Later this field can be set by the work order API.", + "ProvisioningConfig was provisioned, meaning the resources exist.", + "ProvisioningConfig was validated. A validation tool will be run to set this state.", + "ProvisioningConfig was canceled." ], "readOnly": true, "type": "string" @@ -2535,6 +2575,12 @@ }, "type": "object" }, + "StopInstanceRequest": { + "description": "Message requesting to stop a server.", + "id": "StopInstanceRequest", + "properties": {}, + "type": "object" + }, "SubmitProvisioningConfigRequest": { "description": "Request for SubmitProvisioningConfig.", "id": "SubmitProvisioningConfigRequest", @@ -2631,6 +2677,11 @@ "format": "int64", "type": "string" }, + "emergencySizeGib": { + "description": "Additional emergency size that was requested for this Volume, in GiB. current_size_gib includes this value.", + "format": "int64", + "type": "string" + }, "id": { "description": "An identifier for the `Volume`, generated by the backend.", "type": "string" diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index 2beb95ecb52..dae58cf1181 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -413,6 +413,9 @@ type Instance struct { // Networks: List of networks associated with this server. Networks []*Network `json:"networks,omitempty"` + // OsImage: The OS image currently installed on the server. + OsImage string `json:"osImage,omitempty"` + // State: The state of the server. // // Possible values: @@ -1633,6 +1636,14 @@ type ProvisioningConfig struct { // "DRAFT" - ProvisioningConfig is a draft and can be freely modified. // "SUBMITTED" - ProvisioningConfig was already submitted and cannot // be modified. + // "PROVISIONING" - ProvisioningConfig was in the provisioning state. + // Initially this state comes from the work order table in big query + // when SNOW is used. Later this field can be set by the work order API. + // "PROVISIONED" - ProvisioningConfig was provisioned, meaning the + // resources exist. + // "VALIDATED" - ProvisioningConfig was validated. A validation tool + // will be run to set this state. + // "CANCELLED" - ProvisioningConfig was canceled. State string `json:"state,omitempty"` // TicketId: A generated buganizer id to track provisioning request. @@ -2003,6 +2014,10 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StopInstanceRequest: Message requesting to stop a server. +type StopInstanceRequest struct { +} + // SubmitProvisioningConfigRequest: Request for // SubmitProvisioningConfig. type SubmitProvisioningConfigRequest struct { @@ -2159,6 +2174,10 @@ type Volume struct { // with auto grow or auto shrink. CurrentSizeGib int64 `json:"currentSizeGib,omitempty,string"` + // EmergencySizeGib: Additional emergency size that was requested for + // this Volume, in GiB. current_size_gib includes this value. + EmergencySizeGib int64 `json:"emergencySizeGib,omitempty,string"` + // Id: An identifier for the `Volume`, generated by the backend. Id string `json:"id,omitempty"` @@ -3250,6 +3269,7 @@ func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instanc // UpdateMask sets the optional parameter "updateMask": The list of // fields to update. The only currently supported fields are: `labels` +// `hyperthreading_enabled` func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -3362,7 +3382,7 @@ func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "updateMask": { - // "description": "The list of fields to update. The only currently supported fields are: `labels`", + // "description": "The list of fields to update. The only currently supported fields are: `labels` `hyperthreading_enabled`", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -3667,6 +3687,148 @@ func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) ( } +// method id "baremetalsolution.projects.locations.instances.stop": + +type ProjectsLocationsInstancesStopCall struct { + s *Service + name string + stopinstancerequest *StopInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stop a running server. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Stop(name string, stopinstancerequest *StopInstanceRequest) *ProjectsLocationsInstancesStopCall { + c := &ProjectsLocationsInstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopinstancerequest = stopinstancerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInstancesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsInstancesStopCall) Context(ctx context.Context) *ProjectsLocationsInstancesStopCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsInstancesStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopinstancerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:stop") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "baremetalsolution.projects.locations.instances.stop" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Stop a running server.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:stop", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.instances.stop", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:stop", + // "request": { + // "$ref": "StopInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "baremetalsolution.projects.locations.networks.get": type ProjectsLocationsNetworksGetCall struct { diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index ab33b073c9c..a0a5647980f 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -436,6 +436,157 @@ } }, "resources": { + "channelPartnerRepricingConfigs": { + "methods": { + "create": { + "description": "Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions. When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month. The following restrictions are for creating configs in the current month. * This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any ChannelPartner or RepricingConfig.effective_invoice_month. * The contained ChannelPartnerRepricingConfig.repricing_config vaule must be different from the value used in the current config for a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs", + "httpMethod": "POST", + "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the ChannelPartner that will receive the repricing config. Parent uses the format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/channelPartnerRepricingConfigs", + "request": { + "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" + }, + "response": { + "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "delete": { + "description": "Deletes the given ChannelPartnerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or in the past. * NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the request.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs/{channelPartnerRepricingConfigsId}", + "httpMethod": "DELETE", + "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the channel partner repricing config rule to delete.", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "get": { + "description": "Gets information about how a Distributor modifies their bill before sending it to a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The ChannelPartnerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the ChannelPartnerRepricingConfig resource, otherwise returns an error.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs/{channelPartnerRepricingConfigsId}", + "httpMethod": "GET", + "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the ChannelPartnerRepricingConfig Format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "list": { + "description": "Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the ChannelPartnerRepricingConfig resources. The data for each resource is displayed in the ascending order of: * channel partner ID * RepricingConfig.effective_invoice_month * ChannelPartnerRepricingConfig.update_time If unsuccessful, returns an error.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs", + "httpMethod": "GET", + "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter for [CloudChannelService.ListChannelPartnerRepricingConfigs] results (channel_partner_link only). You can use this filter when you support a BatchGet-like query. To use the filter, you must set `parent=accounts/{account_id}/channelPartnerLinks/-`. Example: `channel_partner_link = accounts/account_id/channelPartnerLinks/c1` OR `channel_partner_link = accounts/account_id/channelPartnerLinks/c2`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of repricing configs to return. The service may return fewer than this value. If unspecified, returns a maximum of 50 rules. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results beyond the first page. Obtained through ListChannelPartnerRepricingConfigsResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerRepricingConfigs call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the account's ChannelPartnerLink. Parent uses the format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. Supports accounts/{account_id}/channelPartnerLinks/- to retrieve configs for all channel partners.", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/channelPartnerRepricingConfigs", + "response": { + "$ref": "GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "patch": { + "description": "Updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. This method overwrites the existing CustomerRepricingConfig. You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateChannelPartnerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month. When updating a config in the future: * This config must already exist. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs/{channelPartnerRepricingConfigsId}", + "httpMethod": "PATCH", + "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of the ChannelPartnerRepricingConfig. Format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" + }, + "response": { + "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + } + } + }, "customers": { "methods": { "create": { @@ -1014,6 +1165,157 @@ } }, "resources": { + "customerRepricingConfigs": { + "methods": { + "create": { + "description": "Creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions. When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month. The following restrictions are for creating configs in the current month. * This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any RepricingConfig.EntitlementGranularity.entitlement or RepricingConfig.effective_invoice_month. * The contained CustomerRepricingConfig.repricing_config vaule must be different from the value used in the current config for a RepricingConfig.EntitlementGranularity.entitlement. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", + "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", + "httpMethod": "POST", + "id": "cloudchannel.accounts.customers.customerRepricingConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the customer that will receive this repricing config. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + "location": "path", + "pattern": "^accounts/[^/]+/customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customerRepricingConfigs", + "request": { + "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + }, + "response": { + "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "delete": { + "description": "Deletes the given CustomerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the past. * NOT_FOUND: No CustomerRepricingConfig found for the name in the request.", + "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + "httpMethod": "DELETE", + "id": "cloudchannel.accounts.customers.customerRepricingConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the customer repricing config rule to delete. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", + "location": "path", + "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "get": { + "description": "Gets information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resource, otherwise returns an error.", + "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + "httpMethod": "GET", + "id": "cloudchannel.accounts.customers.customerRepricingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", + "location": "path", + "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "list": { + "description": "Lists information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resources. The data for each resource is displayed in the ascending order of: * customer ID * RepricingConfig.EntitlementGranularity.entitlement * RepricingConfig.effective_invoice_month * CustomerRepricingConfig.update_time If unsuccessful, returns an error.", + "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", + "httpMethod": "GET", + "id": "cloudchannel.accounts.customers.customerRepricingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter for [CloudChannelService.ListCustomerRepricingConfigs] results (customer only). You can use this filter when you support a BatchGet-like query. To use the filter, you must set `parent=accounts/{account_id}/customers/-`. Example: customer = accounts/account_id/customers/c1 OR customer = accounts/account_id/customers/c2.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of repricing configs to return. The service may return fewer than this value. If unspecified, returns a maximum of 50 rules. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results beyond the first page. Obtained through ListCustomerRepricingConfigsResponse.next_page_token of the previous CloudChannelService.ListCustomerRepricingConfigs call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the customer. Parent uses the format: accounts/{account_id}/customers/{customer_id}. Supports accounts/{account_id}/customers/- to retrieve configs for all customers.", + "location": "path", + "pattern": "^accounts/[^/]+/customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customerRepricingConfigs", + "response": { + "$ref": "GoogleCloudChannelV1ListCustomerRepricingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "patch": { + "description": "Updates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. This method overwrites the existing CustomerRepricingConfig. You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateCustomerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month. When updating a config in the future: * This config must already exist. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", + "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + "httpMethod": "PATCH", + "id": "cloudchannel.accounts.customers.customerRepricingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", + "location": "path", + "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + }, + "response": { + "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + } + } + }, "entitlements": { "methods": { "activate": { @@ -1599,7 +1901,7 @@ } } }, - "revision": "20220324", + "revision": "20220422", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -1778,6 +2080,28 @@ }, "type": "object" }, + "GoogleCloudChannelV1ChannelPartnerRepricingConfig": { + "description": "Configuration for how a distributor will rebill a channel partner (also known as a distributor-authorized reseller).", + "id": "GoogleCloudChannelV1ChannelPartnerRepricingConfig", + "properties": { + "name": { + "description": "Output only. Resource name of the ChannelPartnerRepricingConfig. Format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.", + "readOnly": true, + "type": "string" + }, + "repricingConfig": { + "$ref": "GoogleCloudChannelV1RepricingConfig", + "description": "Required. The configuration for bill modifications made by a reseller before sending it to ChannelPartner." + }, + "updateTime": { + "description": "Output only. Timestamp of an update to the repricing rule. If `update_time` is after RepricingConfig.effective_invoice_month then it indicates this was set mid-month.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest": { "description": "Request message for CloudChannelService.CheckCloudIdentityAccountsExist.", "id": "GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest", @@ -2096,6 +2420,28 @@ }, "type": "object" }, + "GoogleCloudChannelV1CustomerRepricingConfig": { + "description": "Configuration for how a reseller will reprice a Customer.", + "id": "GoogleCloudChannelV1CustomerRepricingConfig", + "properties": { + "name": { + "description": "Output only. Resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", + "readOnly": true, + "type": "string" + }, + "repricingConfig": { + "$ref": "GoogleCloudChannelV1RepricingConfig", + "description": "Required. The configuration for bill modifications made by a reseller before sending it to customers." + }, + "updateTime": { + "description": "Output only. Timestamp of an update to the repricing rule. If `update_time` is after RepricingConfig.effective_invoice_month then it indicates this was set mid-month.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1EduData": { "description": "Required Edu Attributes", "id": "GoogleCloudChannelV1EduData", @@ -2335,6 +2681,42 @@ }, "type": "object" }, + "GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse": { + "description": "Response message for CloudChannelService.ListChannelPartnerRepricingConfigs.", + "id": "GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse", + "properties": { + "channelPartnerRepricingConfigs": { + "description": "The repricing configs for this channel partner.", + "items": { + "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results. Pass to ListChannelPartnerRepricingConfigsRequest.page_token to obtain that page.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1ListCustomerRepricingConfigsResponse": { + "description": "Response message for CloudChannelService.ListCustomerRepricingConfigs.", + "id": "GoogleCloudChannelV1ListCustomerRepricingConfigsResponse", + "properties": { + "customerRepricingConfigs": { + "description": "The repricing configs for this channel partner.", + "items": { + "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results. Pass to ListCustomerRepricingConfigsRequest.page_token to obtain that page.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1ListCustomersResponse": { "description": "Response message for CloudChannelService.ListCustomers.", "id": "GoogleCloudChannelV1ListCustomersResponse", @@ -2786,6 +3168,17 @@ }, "type": "object" }, + "GoogleCloudChannelV1PercentageAdjustment": { + "description": "An adjustment that applies a flat markup or markdown to an entire bill.", + "id": "GoogleCloudChannelV1PercentageAdjustment", + "properties": { + "percentage": { + "$ref": "GoogleTypeDecimal", + "description": "The percentage of the bill to adjust. For example: Mark down by 1% =\u003e \"-1.00\" Mark up by 1% =\u003e \"1.00\" Pass-Through =\u003e \"0.00\"" + } + }, + "type": "object" + }, "GoogleCloudChannelV1Period": { "description": "Represents period in days/months/years.", "id": "GoogleCloudChannelV1Period", @@ -3137,6 +3530,71 @@ }, "type": "object" }, + "GoogleCloudChannelV1RepricingAdjustment": { + "description": "A type that represents the various adjustments you can apply to a bill.", + "id": "GoogleCloudChannelV1RepricingAdjustment", + "properties": { + "percentageAdjustment": { + "$ref": "GoogleCloudChannelV1PercentageAdjustment", + "description": "Flat markup or markdown on an entire bill." + } + }, + "type": "object" + }, + "GoogleCloudChannelV1RepricingConfig": { + "description": "Configuration for repricing a Google bill over a period of time.", + "id": "GoogleCloudChannelV1RepricingConfig", + "properties": { + "adjustment": { + "$ref": "GoogleCloudChannelV1RepricingAdjustment", + "description": "Required. Information about the adjustment." + }, + "channelPartnerGranularity": { + "$ref": "GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity", + "description": "Applies the repricing configuration at the channel partner level. This is the only supported value for ChannelPartnerRepricingConfig." + }, + "effectiveInvoiceMonth": { + "$ref": "GoogleTypeDate", + "description": "Required. The YearMonth when these adjustments activate. The Day field needs to be \"0\" since we only accept YearMonth repricing boundaries." + }, + "entitlementGranularity": { + "$ref": "GoogleCloudChannelV1RepricingConfigEntitlementGranularity", + "description": "Applies the repricing configuration at the entitlement level. This is the only supported value for CustomerRepricingConfig." + }, + "rebillingBasis": { + "description": "Required. The RebillingBasis to use for this bill. Specifies the relative cost based on repricing costs you will apply.", + "enum": [ + "REBILLING_BASIS_UNSPECIFIED", + "COST_AT_LIST", + "DIRECT_CUSTOMER_COST" + ], + "enumDescriptions": [ + "Not used.", + "Use the list cost, also known as the MSRP.", + "Pass through all discounts except the Reseller Program Discount. If this is the default cost base and no adjustments are specified, the output cost will be exactly what the customer would see if they viewed the bill in the Google Cloud Console." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity": { + "description": "Applies the repricing configuration at the channel partner level. The channel partner value is derived from the resource name. Takes an empty json object.", + "id": "GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity", + "properties": {}, + "type": "object" + }, + "GoogleCloudChannelV1RepricingConfigEntitlementGranularity": { + "description": "Applies the repricing configuration at the entitlement level.", + "id": "GoogleCloudChannelV1RepricingConfigEntitlementGranularity", + "properties": { + "entitlement": { + "description": "Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1Sku": { "description": "Represents a product's purchasable Stock Keeping Unit (SKU). SKUs represent the different variations of the product. For example, Google Workspace Business Standard and Google Workspace Business Plus are Google Workspace product SKUs.", "id": "GoogleCloudChannelV1Sku", @@ -3962,6 +4420,39 @@ }, "type": "object" }, + "GoogleTypeDate": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "GoogleTypeDate", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleTypeDecimal": { + "description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", + "id": "GoogleTypeDecimal", + "properties": { + "value": { + "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -\u003e `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", + "type": "string" + } + }, + "type": "object" + }, "GoogleTypeMoney": { "description": "Represents an amount of money with its currency type.", "id": "GoogleTypeMoney", diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 23e6e2d98d3..b3584aacb65 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -162,6 +162,7 @@ type AccountsService struct { func NewAccountsChannelPartnerLinksService(s *Service) *AccountsChannelPartnerLinksService { rs := &AccountsChannelPartnerLinksService{s: s} + rs.ChannelPartnerRepricingConfigs = NewAccountsChannelPartnerLinksChannelPartnerRepricingConfigsService(s) rs.Customers = NewAccountsChannelPartnerLinksCustomersService(s) return rs } @@ -169,9 +170,20 @@ func NewAccountsChannelPartnerLinksService(s *Service) *AccountsChannelPartnerLi type AccountsChannelPartnerLinksService struct { s *Service + ChannelPartnerRepricingConfigs *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService + Customers *AccountsChannelPartnerLinksCustomersService } +func NewAccountsChannelPartnerLinksChannelPartnerRepricingConfigsService(s *Service) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService { + rs := &AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService{s: s} + return rs +} + +type AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService struct { + s *Service +} + func NewAccountsChannelPartnerLinksCustomersService(s *Service) *AccountsChannelPartnerLinksCustomersService { rs := &AccountsChannelPartnerLinksCustomersService{s: s} return rs @@ -183,6 +195,7 @@ type AccountsChannelPartnerLinksCustomersService struct { func NewAccountsCustomersService(s *Service) *AccountsCustomersService { rs := &AccountsCustomersService{s: s} + rs.CustomerRepricingConfigs = NewAccountsCustomersCustomerRepricingConfigsService(s) rs.Entitlements = NewAccountsCustomersEntitlementsService(s) return rs } @@ -190,9 +203,20 @@ func NewAccountsCustomersService(s *Service) *AccountsCustomersService { type AccountsCustomersService struct { s *Service + CustomerRepricingConfigs *AccountsCustomersCustomerRepricingConfigsService + Entitlements *AccountsCustomersEntitlementsService } +func NewAccountsCustomersCustomerRepricingConfigsService(s *Service) *AccountsCustomersCustomerRepricingConfigsService { + rs := &AccountsCustomersCustomerRepricingConfigsService{s: s} + return rs +} + +type AccountsCustomersCustomerRepricingConfigsService struct { + s *Service +} + func NewAccountsCustomersEntitlementsService(s *Service) *AccountsCustomersEntitlementsService { rs := &AccountsCustomersEntitlementsService{s: s} return rs @@ -594,6 +618,53 @@ func (s *GoogleCloudChannelV1ChannelPartnerLink) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1ChannelPartnerRepricingConfig: Configuration for +// how a distributor will rebill a channel partner (also known as a +// distributor-authorized reseller). +type GoogleCloudChannelV1ChannelPartnerRepricingConfig struct { + // Name: Output only. Resource name of the + // ChannelPartnerRepricingConfig. Format: + // accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channel + // PartnerRepricingConfigs/{id}. + Name string `json:"name,omitempty"` + + // RepricingConfig: Required. The configuration for bill modifications + // made by a reseller before sending it to ChannelPartner. + RepricingConfig *GoogleCloudChannelV1RepricingConfig `json:"repricingConfig,omitempty"` + + // UpdateTime: Output only. Timestamp of an update to the repricing + // rule. If `update_time` is after + // RepricingConfig.effective_invoice_month then it indicates this was + // set mid-month. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1ChannelPartnerRepricingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ChannelPartnerRepricingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest: Request // message for CloudChannelService.CheckCloudIdentityAccountsExist. type GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest struct { @@ -1105,6 +1176,52 @@ func (s *GoogleCloudChannelV1CustomerEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1CustomerRepricingConfig: Configuration for how a +// reseller will reprice a Customer. +type GoogleCloudChannelV1CustomerRepricingConfig struct { + // Name: Output only. Resource name of the CustomerRepricingConfig. + // Format: + // accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs + // /{id}. + Name string `json:"name,omitempty"` + + // RepricingConfig: Required. The configuration for bill modifications + // made by a reseller before sending it to customers. + RepricingConfig *GoogleCloudChannelV1RepricingConfig `json:"repricingConfig,omitempty"` + + // UpdateTime: Output only. Timestamp of an update to the repricing + // rule. If `update_time` is after + // RepricingConfig.effective_invoice_month then it indicates this was + // set mid-month. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1CustomerRepricingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1CustomerRepricingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1EduData: Required Edu Attributes type GoogleCloudChannelV1EduData struct { // InstituteSize: Size of the institute. @@ -1408,6 +1525,88 @@ func (s *GoogleCloudChannelV1ListChannelPartnerLinksResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse: +// Response message for +// CloudChannelService.ListChannelPartnerRepricingConfigs. +type GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse struct { + // ChannelPartnerRepricingConfigs: The repricing configs for this + // channel partner. + ChannelPartnerRepricingConfigs []*GoogleCloudChannelV1ChannelPartnerRepricingConfig `json:"channelPartnerRepricingConfigs,omitempty"` + + // NextPageToken: A token to retrieve the next page of results. Pass to + // ListChannelPartnerRepricingConfigsRequest.page_token to obtain that + // page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ChannelPartnerRepricingConfigs") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "ChannelPartnerRepricingConfigs") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1ListCustomerRepricingConfigsResponse: Response +// message for CloudChannelService.ListCustomerRepricingConfigs. +type GoogleCloudChannelV1ListCustomerRepricingConfigsResponse struct { + // CustomerRepricingConfigs: The repricing configs for this channel + // partner. + CustomerRepricingConfigs []*GoogleCloudChannelV1CustomerRepricingConfig `json:"customerRepricingConfigs,omitempty"` + + // NextPageToken: A token to retrieve the next page of results. Pass to + // ListCustomerRepricingConfigsRequest.page_token to obtain that page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "CustomerRepricingConfigs") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomerRepricingConfigs") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1ListCustomerRepricingConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ListCustomerRepricingConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1ListCustomersResponse: Response message for // CloudChannelService.ListCustomers. type GoogleCloudChannelV1ListCustomersResponse struct { @@ -2172,6 +2371,36 @@ func (s *GoogleCloudChannelV1ParameterDefinition) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1PercentageAdjustment: An adjustment that applies +// a flat markup or markdown to an entire bill. +type GoogleCloudChannelV1PercentageAdjustment struct { + // Percentage: The percentage of the bill to adjust. For example: Mark + // down by 1% => "-1.00" Mark up by 1% => "1.00" Pass-Through => "0.00" + Percentage *GoogleTypeDecimal `json:"percentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Percentage") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Percentage") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1PercentageAdjustment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1PercentageAdjustment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1Period: Represents period in days/months/years. type GoogleCloudChannelV1Period struct { // Duration: Total duration of Period Type defined. @@ -2743,6 +2972,132 @@ func (s *GoogleCloudChannelV1RenewalSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1RepricingAdjustment: A type that represents the +// various adjustments you can apply to a bill. +type GoogleCloudChannelV1RepricingAdjustment struct { + // PercentageAdjustment: Flat markup or markdown on an entire bill. + PercentageAdjustment *GoogleCloudChannelV1PercentageAdjustment `json:"percentageAdjustment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PercentageAdjustment") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PercentageAdjustment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1RepricingAdjustment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RepricingAdjustment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1RepricingConfig: Configuration for repricing a +// Google bill over a period of time. +type GoogleCloudChannelV1RepricingConfig struct { + // Adjustment: Required. Information about the adjustment. + Adjustment *GoogleCloudChannelV1RepricingAdjustment `json:"adjustment,omitempty"` + + // ChannelPartnerGranularity: Applies the repricing configuration at the + // channel partner level. This is the only supported value for + // ChannelPartnerRepricingConfig. + ChannelPartnerGranularity *GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity `json:"channelPartnerGranularity,omitempty"` + + // EffectiveInvoiceMonth: Required. The YearMonth when these adjustments + // activate. The Day field needs to be "0" since we only accept + // YearMonth repricing boundaries. + EffectiveInvoiceMonth *GoogleTypeDate `json:"effectiveInvoiceMonth,omitempty"` + + // EntitlementGranularity: Applies the repricing configuration at the + // entitlement level. This is the only supported value for + // CustomerRepricingConfig. + EntitlementGranularity *GoogleCloudChannelV1RepricingConfigEntitlementGranularity `json:"entitlementGranularity,omitempty"` + + // RebillingBasis: Required. The RebillingBasis to use for this bill. + // Specifies the relative cost based on repricing costs you will apply. + // + // Possible values: + // "REBILLING_BASIS_UNSPECIFIED" - Not used. + // "COST_AT_LIST" - Use the list cost, also known as the MSRP. + // "DIRECT_CUSTOMER_COST" - Pass through all discounts except the + // Reseller Program Discount. If this is the default cost base and no + // adjustments are specified, the output cost will be exactly what the + // customer would see if they viewed the bill in the Google Cloud + // Console. + RebillingBasis string `json:"rebillingBasis,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Adjustment") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Adjustment") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1RepricingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RepricingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity: Applies +// the repricing configuration at the channel partner level. The channel +// partner value is derived from the resource name. Takes an empty json +// object. +type GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity struct { +} + +// GoogleCloudChannelV1RepricingConfigEntitlementGranularity: Applies +// the repricing configuration at the entitlement level. +type GoogleCloudChannelV1RepricingConfigEntitlementGranularity struct { + // Entitlement: Resource name of the entitlement. Format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen + // t_id} + Entitlement string `json:"entitlement,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entitlement") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Entitlement") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1RepricingConfigEntitlementGranularity) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RepricingConfigEntitlementGranularity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1Sku: Represents a product's purchasable Stock // Keeping Unit (SKU). SKUs represent the different variations of the // product. For example, Google Workspace Business Standard and Google @@ -4156,25 +4511,31 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeMoney: Represents an amount of money with its currency -// type. -type GoogleTypeMoney struct { - // CurrencyCode: The three-letter currency code defined in ISO 4217. - CurrencyCode string `json:"currencyCode,omitempty"` - - // Nanos: Number of nano (10^-9) units of the amount. The value must be - // between -999,999,999 and +999,999,999 inclusive. If `units` is - // positive, `nanos` must be positive or zero. If `units` is zero, - // `nanos` can be positive, zero, or negative. If `units` is negative, - // `nanos` must be negative or zero. For example $-1.75 is represented - // as `units`=-1 and `nanos`=-750,000,000. - Nanos int64 `json:"nanos,omitempty"` - - // Units: The whole units of the amount. For example if `currencyCode` - // is "USD", then 1 unit is one US dollar. - Units int64 `json:"units,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "CurrencyCode") to +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4182,28 +4543,139 @@ type GoogleTypeMoney struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrencyCode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeMoney +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypePostalAddress: Represents a postal address, e.g. for postal -// delivery or payments addresses. Given a postal address, a postal -// service can deliver items to a premise, P.O. Box or similar. It is -// not intended to model geographical locations (roads, towns, -// mountains). In typical usage an address would be created via user -// input or from importing existing data, depending on the type of -// process. Advice on address input / editing: - Use an i18n-ready +// GoogleTypeDecimal: A representation of a decimal value, such as 2.5. +// Clients may convert values into language-native decimal formats, such +// as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: +// https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html +// [decimal.Decimal]: https://docs.python.org/3/library/decimal.html +type GoogleTypeDecimal struct { + // Value: The decimal value, as a string. The string representation + // consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), + // followed by a sequence of zero or more decimal digits ("the + // integer"), optionally followed by a fraction, optionally followed by + // an exponent. The fraction consists of a decimal point followed by + // zero or more decimal digits. The string must contain at least one + // digit in either the integer or the fraction. The number formed by the + // sign, the integer and the fraction is referred to as the significand. + // The exponent consists of the character `e` (`U+0065`) or `E` + // (`U+0045`) followed by one or more decimal digits. Services + // **should** normalize decimal values before storing them by: - + // Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - + // Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - + // Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - + // Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + // Services **may** perform additional normalization based on its own + // needs and the internal decimal implementation selected, such as + // shifting the decimal point and exponent value together (example: + // `2.5e-1` <-> `0.25`). Additionally, services **may** preserve + // trailing zeroes in the fraction to indicate increased precision, but + // are not required to do so. Note that only the `.` character is + // supported to divide the integer and the fraction; `,` **should not** + // be supported regardless of locale. Additionally, thousand separators + // **should not** be supported. If a service does support them, values + // **must** be normalized. The ENBF grammar is: DecimalString = [Sign] + // Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | + // [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { + // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services + // **should** clearly document the range of supported values, the + // maximum supported precision (total number of digits), and, if + // applicable, the scale (number of digits after the decimal point), as + // well as how it behaves when receiving out-of-bounds values. Services + // **may** choose to accept values passed as input even when the value + // has a higher precision or scale than the service supports, and + // **should** round the value to fit the supported scale. Alternatively, + // the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` + // in gRPC) if precision would be lost. Services **should** error with + // `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service + // receives a value outside of the supported range. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDecimal) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDecimal + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeMoney: Represents an amount of money with its currency +// type. +type GoogleTypeMoney struct { + // CurrencyCode: The three-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + + // Nanos: Number of nano (10^-9) units of the amount. The value must be + // between -999,999,999 and +999,999,999 inclusive. If `units` is + // positive, `nanos` must be positive or zero. If `units` is zero, + // `nanos` can be positive, zero, or negative. If `units` is negative, + // `nanos` must be negative or zero. For example $-1.75 is represented + // as `units`=-1 and `nanos`=-750,000,000. + Nanos int64 `json:"nanos,omitempty"` + + // Units: The whole units of the amount. For example if `currencyCode` + // is "USD", then 1 unit is one US dollar. + Units int64 `json:"units,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrencyCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeMoney + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypePostalAddress: Represents a postal address, e.g. for postal +// delivery or payments addresses. Given a postal address, a postal +// service can deliver items to a premise, P.O. Box or similar. It is +// not intended to model geographical locations (roads, towns, +// mountains). In typical usage an address would be created via user +// input or from importing existing data, depending on the type of +// process. Advice on address input / editing: - Use an i18n-ready // address widget such as https://github.com/google/libaddressinput) - // Users should not be presented with UI elements for input or editing // of fields outside countries where that field is used. For more @@ -6083,38 +6555,58 @@ func (c *AccountsChannelPartnerLinksPatchCall) Do(opts ...googleapi.CallOption) } -// method id "cloudchannel.accounts.channelPartnerLinks.customers.create": +// method id "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.create": -type AccountsChannelPartnerLinksCustomersCreateCall struct { - s *Service - parent string - googlecloudchannelv1customer *GoogleCloudChannelV1Customer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall struct { + s *Service + parent string + googlecloudchannelv1channelpartnerrepricingconfig *GoogleCloudChannelV1ChannelPartnerRepricingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Customer resource under the reseller or -// distributor account. Possible error codes: * PERMISSION_DENIED: The -// reseller account making the request is different from the reseller -// account in the API request. * INVALID_ARGUMENT: * Required request -// parameters are missing or invalid. * Domain field value doesn't match -// the primary email domain. Return value: The newly created Customer -// resource. +// Create: Creates a ChannelPartnerRepricingConfig. Call this method to +// set modifications for a specific ChannelPartner's bill. You can only +// create configs if the RepricingConfig.effective_invoice_month is a +// future month. If needed, you can create a config for the current +// month, with some restrictions. When creating a config for a future +// month, make sure there are no existing configs for that +// RepricingConfig.effective_invoice_month. The following restrictions +// are for creating configs in the current month. * This functionality +// is reserved for recovering from an erroneous config, and should not +// be used for regular business cases. * The new config will not modify +// exports used with other configs. Changes to the config may be +// immediate, but may take up to 24 hours. * There is a limit of ten +// configs for any ChannelPartner or +// RepricingConfig.effective_invoice_month. * The contained +// ChannelPartnerRepricingConfig.repricing_config vaule must be +// different from the value used in the current config for a +// ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the +// account making the request and the account being queried are +// different. * INVALID_ARGUMENT: Missing or invalid required parameters +// in the request. Also displays if the updated config is for the +// current month or past months. * NOT_FOUND: The +// ChannelPartnerRepricingConfig specified does not exist or is not +// associated with the given account. * INTERNAL: Any non-user error +// related to technical issues in the backend. In this case, contact +// Cloud Channel support. Return Value: If successful, the updated +// ChannelPartnerRepricingConfig resource, otherwise returns an error. // -// - parent: The resource name of reseller account in which to create -// the customer. Parent uses the format: accounts/{account_id}. -func (r *AccountsChannelPartnerLinksCustomersService) Create(parent string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsChannelPartnerLinksCustomersCreateCall { - c := &AccountsChannelPartnerLinksCustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the ChannelPartner that will receive +// the repricing config. Parent uses the format: +// accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. +func (r *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService) Create(parent string, googlecloudchannelv1channelpartnerrepricingconfig *GoogleCloudChannelV1ChannelPartnerRepricingConfig) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall { + c := &AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudchannelv1customer = googlecloudchannelv1customer + c.googlecloudchannelv1channelpartnerrepricingconfig = googlecloudchannelv1channelpartnerrepricingconfig return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsChannelPartnerLinksCustomersCreateCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersCreateCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6122,21 +6614,21 @@ func (c *AccountsChannelPartnerLinksCustomersCreateCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsChannelPartnerLinksCustomersCreateCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersCreateCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall) Context(ctx context.Context) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsChannelPartnerLinksCustomersCreateCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsChannelPartnerLinksCustomersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6144,14 +6636,14 @@ func (c *AccountsChannelPartnerLinksCustomersCreateCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customer) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1channelpartnerrepricingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/channelPartnerRepricingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6164,14 +6656,16 @@ func (c *AccountsChannelPartnerLinksCustomersCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.create" call. -// Exactly one of *GoogleCloudChannelV1Customer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsChannelPartnerLinksCustomersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +// Do executes the "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.create" call. +// Exactly one of *GoogleCloudChannelV1ChannelPartnerRepricingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ChannelPartnerRepricingConfig.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ChannelPartnerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6190,7 +6684,7 @@ func (c *AccountsChannelPartnerLinksCustomersCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudChannelV1Customer{ + ret := &GoogleCloudChannelV1ChannelPartnerRepricingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6202,28 +6696,28 @@ func (c *AccountsChannelPartnerLinksCustomersCreateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource.", - // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers", + // "description": "Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions. When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month. The following restrictions are for creating configs in the current month. * This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any ChannelPartner or RepricingConfig.effective_invoice_month. * The contained ChannelPartnerRepricingConfig.repricing_config vaule must be different from the value used in the current config for a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.channelPartnerLinks.customers.create", + // "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id}", + // "description": "Required. The resource name of the ChannelPartner that will receive the repricing config. Parent uses the format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}", // "location": "path", // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customers", + // "path": "v1/{+parent}/channelPartnerRepricingConfigs", // "request": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" // }, // "response": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -6232,9 +6726,9 @@ func (c *AccountsChannelPartnerLinksCustomersCreateCall) Do(opts ...googleapi.Ca } -// method id "cloudchannel.accounts.channelPartnerLinks.customers.delete": +// method id "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.delete": -type AccountsChannelPartnerLinksCustomersDeleteCall struct { +type AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -6242,16 +6736,20 @@ type AccountsChannelPartnerLinksCustomersDeleteCall struct { header_ http.Header } -// Delete: Deletes the given Customer permanently. Possible error codes: -// * PERMISSION_DENIED: The account making the request does not own this -// customer. * INVALID_ARGUMENT: Required request parameters are missing -// or invalid. * FAILED_PRECONDITION: The customer has existing -// entitlements. * NOT_FOUND: No Customer resource found for the name in -// the request. +// Delete: Deletes the given ChannelPartnerRepricingConfig permanently. +// You can only delete configs if their +// RepricingConfig.effective_invoice_month is set to a date after the +// current month. Possible error codes: * PERMISSION_DENIED: The account +// making the request does not own this customer. * INVALID_ARGUMENT: +// Required request parameters are missing or invalid. * +// FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or +// in the past. * NOT_FOUND: No ChannelPartnerRepricingConfig found for +// the name in the request. // -// - name: The resource name of the customer to delete. -func (r *AccountsChannelPartnerLinksCustomersService) Delete(name string) *AccountsChannelPartnerLinksCustomersDeleteCall { - c := &AccountsChannelPartnerLinksCustomersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the channel partner repricing config +// rule to delete. +func (r *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService) Delete(name string) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall { + c := &AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -6259,7 +6757,7 @@ func (r *AccountsChannelPartnerLinksCustomersService) Delete(name string) *Accou // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersDeleteCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6267,21 +6765,21 @@ func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersDeleteCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall) Context(ctx context.Context) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsChannelPartnerLinksCustomersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6304,14 +6802,14 @@ func (c *AccountsChannelPartnerLinksCustomersDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.delete" call. +// Do executes the "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6342,18 +6840,18 @@ func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Deletes the given Customer permanently. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name in the request.", - // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", + // "description": "Deletes the given ChannelPartnerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or in the past. * NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the request.", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs/{channelPartnerRepricingConfigsId}", // "httpMethod": "DELETE", - // "id": "cloudchannel.accounts.channelPartnerLinks.customers.delete", + // "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the customer to delete.", + // "description": "Required. The resource name of the channel partner repricing config rule to delete.", // "location": "path", - // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" // } @@ -6369,9 +6867,9 @@ func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Do(opts ...googleapi.Ca } -// method id "cloudchannel.accounts.channelPartnerLinks.customers.get": +// method id "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.get": -type AccountsChannelPartnerLinksCustomersGetCall struct { +type AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -6380,17 +6878,21 @@ type AccountsChannelPartnerLinksCustomersGetCall struct { header_ http.Header } -// Get: Returns the requested Customer resource. Possible error codes: * -// PERMISSION_DENIED: The reseller account making the request is -// different from the reseller account in the API request. * -// INVALID_ARGUMENT: Required request parameters are missing or invalid. -// * NOT_FOUND: The customer resource doesn't exist. Usually the result -// of an invalid name parameter. Return value: The Customer resource. +// Get: Gets information about how a Distributor modifies their bill +// before sending it to a ChannelPartner. Possible Error Codes: * +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. * NOT_FOUND: The +// ChannelPartnerRepricingConfig was not found. * INTERNAL: Any non-user +// error related to technical issues in the backend. In this case, +// contact Cloud Channel support. Return Value: If successful, the +// ChannelPartnerRepricingConfig resource, otherwise returns an error. // -// - name: The resource name of the customer to retrieve. Name uses the -// format: accounts/{account_id}/customers/{customer_id}. -func (r *AccountsChannelPartnerLinksCustomersService) Get(name string) *AccountsChannelPartnerLinksCustomersGetCall { - c := &AccountsChannelPartnerLinksCustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ChannelPartnerRepricingConfig +// Format: +// accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/chann +// elPartnerRepricingConfigs/{id}. +func (r *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService) Get(name string) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall { + c := &AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -6398,7 +6900,7 @@ func (r *AccountsChannelPartnerLinksCustomersService) Get(name string) *Accounts // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsChannelPartnerLinksCustomersGetCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersGetCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6408,7 +6910,7 @@ func (c *AccountsChannelPartnerLinksCustomersGetCall) Fields(s ...googleapi.Fiel // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsChannelPartnerLinksCustomersGetCall) IfNoneMatch(entityTag string) *AccountsChannelPartnerLinksCustomersGetCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall) IfNoneMatch(entityTag string) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -6416,21 +6918,21 @@ func (c *AccountsChannelPartnerLinksCustomersGetCall) IfNoneMatch(entityTag stri // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsChannelPartnerLinksCustomersGetCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersGetCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall) Context(ctx context.Context) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsChannelPartnerLinksCustomersGetCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsChannelPartnerLinksCustomersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6456,14 +6958,16 @@ func (c *AccountsChannelPartnerLinksCustomersGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.get" call. -// Exactly one of *GoogleCloudChannelV1Customer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsChannelPartnerLinksCustomersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +// Do executes the "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.get" call. +// Exactly one of *GoogleCloudChannelV1ChannelPartnerRepricingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ChannelPartnerRepricingConfig.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ChannelPartnerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6482,7 +6986,7 @@ func (c *AccountsChannelPartnerLinksCustomersGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudChannelV1Customer{ + ret := &GoogleCloudChannelV1ChannelPartnerRepricingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6494,25 +6998,25 @@ func (c *AccountsChannelPartnerLinksCustomersGetCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns the requested Customer resource. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter. Return value: The Customer resource.", - // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", + // "description": "Gets information about how a Distributor modifies their bill before sending it to a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The ChannelPartnerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the ChannelPartnerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs/{channelPartnerRepricingConfigsId}", // "httpMethod": "GET", - // "id": "cloudchannel.accounts.channelPartnerLinks.customers.get", + // "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}", + // "description": "Required. The resource name of the ChannelPartnerRepricingConfig Format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -6521,82 +7025,124 @@ func (c *AccountsChannelPartnerLinksCustomersGetCall) Do(opts ...googleapi.CallO } -// method id "cloudchannel.accounts.channelPartnerLinks.customers.import": +// method id "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.list": -type AccountsChannelPartnerLinksCustomersImportCall struct { - s *Service - parent string - googlecloudchannelv1importcustomerrequest *GoogleCloudChannelV1ImportCustomerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports a Customer from the Cloud Identity associated with -// the provided Cloud Identity ID or domain before a -// TransferEntitlements call. If a linked Customer already exists and -// overwrite_if_exists is true, it will update that Customer's data. -// Possible error codes: * PERMISSION_DENIED: The reseller account -// making the request is different from the reseller account in the API -// request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * -// INVALID_ARGUMENT: Required parameters are missing, or the auth_token -// is expired or invalid. * ALREADY_EXISTS: A customer already exists -// and has conflicting critical fields. Requires an overwrite. Return -// value: The Customer. +// List: Lists information about how a Reseller modifies their bill +// before sending it to a ChannelPartner. Possible Error Codes: * +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. * NOT_FOUND: The +// ChannelPartnerRepricingConfig specified does not exist or is not +// associated with the given account. * INTERNAL: Any non-user error +// related to technical issues in the backend. In this case, contact +// Cloud Channel support. Return Value: If successful, the +// ChannelPartnerRepricingConfig resources. The data for each resource +// is displayed in the ascending order of: * channel partner ID * +// RepricingConfig.effective_invoice_month * +// ChannelPartnerRepricingConfig.update_time If unsuccessful, returns an +// error. // -// - parent: The resource name of the reseller's account. Parent takes -// the format: accounts/{account_id} or +// - parent: The resource name of the account's ChannelPartnerLink. +// Parent uses the format: // accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. -func (r *AccountsChannelPartnerLinksCustomersService) Import(parent string, googlecloudchannelv1importcustomerrequest *GoogleCloudChannelV1ImportCustomerRequest) *AccountsChannelPartnerLinksCustomersImportCall { - c := &AccountsChannelPartnerLinksCustomersImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Supports accounts/{account_id}/channelPartnerLinks/- to retrieve +// configs for all channel partners. +func (r *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService) List(parent string) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall { + c := &AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudchannelv1importcustomerrequest = googlecloudchannelv1importcustomerrequest + return c +} + +// Filter sets the optional parameter "filter": A filter for +// [CloudChannelService.ListChannelPartnerRepricingConfigs] results +// (channel_partner_link only). You can use this filter when you support +// a BatchGet-like query. To use the filter, you must set +// `parent=accounts/{account_id}/channelPartnerLinks/-`. Example: +// `channel_partner_link = accounts/account_id/channelPartnerLinks/c1` +// OR `channel_partner_link = +// accounts/account_id/channelPartnerLinks/c2`. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) Filter(filter string) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of repricing configs to return. The service may return fewer than +// this value. If unspecified, returns a maximum of 50 rules. The +// maximum value is 100; values above 100 will be coerced to 100. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) PageSize(pageSize int64) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results beyond the first page. Obtained through +// ListChannelPartnerRepricingConfigsResponse.next_page_token of the +// previous CloudChannelService.ListChannelPartnerRepricingConfigs call. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) PageToken(pageToken string) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsChannelPartnerLinksCustomersImportCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersImportCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) IfNoneMatch(entityTag string) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsChannelPartnerLinksCustomersImportCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersImportCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) Context(ctx context.Context) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsChannelPartnerLinksCustomersImportCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsChannelPartnerLinksCustomersImportCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1importcustomerrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/channelPartnerRepricingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -6607,14 +7153,17 @@ func (c *AccountsChannelPartnerLinksCustomersImportCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.import" call. -// Exactly one of *GoogleCloudChannelV1Customer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsChannelPartnerLinksCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +// Do executes the "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.list" call. +// Exactly one of +// *GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse.Server +// Response.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6633,7 +7182,7 @@ func (c *AccountsChannelPartnerLinksCustomersImportCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudChannelV1Customer{ + ret := &GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6645,28 +7194,41 @@ func (c *AccountsChannelPartnerLinksCustomersImportCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. * ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite. Return value: The Customer.", - // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers:import", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.channelPartnerLinks.customers.import", + // "description": "Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the ChannelPartnerRepricingConfig resources. The data for each resource is displayed in the ascending order of: * channel partner ID * RepricingConfig.effective_invoice_month * ChannelPartnerRepricingConfig.update_time If unsuccessful, returns an error.", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. A filter for [CloudChannelService.ListChannelPartnerRepricingConfigs] results (channel_partner_link only). You can use this filter when you support a BatchGet-like query. To use the filter, you must set `parent=accounts/{account_id}/channelPartnerLinks/-`. Example: `channel_partner_link = accounts/account_id/channelPartnerLinks/c1` OR `channel_partner_link = accounts/account_id/channelPartnerLinks/c2`.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of repricing configs to return. The service may return fewer than this value. If unspecified, returns a maximum of 50 rules. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results beyond the first page. Obtained through ListChannelPartnerRepricingConfigsResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerRepricingConfigs call.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The resource name of the reseller's account. Parent takes the format: accounts/{account_id} or accounts/{account_id}/channelPartnerLinks/{channel_partner_id}", + // "description": "Required. The resource name of the account's ChannelPartnerLink. Parent uses the format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. Supports accounts/{account_id}/channelPartnerLinks/- to retrieve configs for all channel partners.", // "location": "path", // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customers:import", - // "request": { - // "$ref": "GoogleCloudChannelV1ImportCustomerRequest" - // }, + // "path": "v1/{+parent}/channelPartnerRepricingConfigs", // "response": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -6675,129 +7237,131 @@ func (c *AccountsChannelPartnerLinksCustomersImportCall) Do(opts ...googleapi.Ca } -// method id "cloudchannel.accounts.channelPartnerLinks.customers.list": - -type AccountsChannelPartnerLinksCustomersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List Customers. Possible error codes: * PERMISSION_DENIED: The -// reseller account making the request is different from the reseller -// account in the API request. * INVALID_ARGUMENT: Required request -// parameters are missing or invalid. Return value: List of Customers, -// or an empty list if there are no customers. -// -// - parent: The resource name of the reseller account to list customers -// from. Parent uses the format: accounts/{account_id}. -func (r *AccountsChannelPartnerLinksCustomersService) List(parent string) *AccountsChannelPartnerLinksCustomersListCall { - c := &AccountsChannelPartnerLinksCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListChannelPartnerRepricingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Filter sets the optional parameter "filter": Filters applied to the -// [CloudChannelService.ListCustomers] results. See -// https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers -// for more information. -func (c *AccountsChannelPartnerLinksCustomersListCall) Filter(filter string) *AccountsChannelPartnerLinksCustomersListCall { - c.urlParams_.Set("filter", filter) - return c -} +// method id "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.patch": -// PageSize sets the optional parameter "pageSize": The maximum number -// of customers to return. The service may return fewer than this value. -// If unspecified, returns at most 10 customers. The maximum value is -// 50. -func (c *AccountsChannelPartnerLinksCustomersListCall) PageSize(pageSize int64) *AccountsChannelPartnerLinksCustomersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall struct { + s *Service + name string + googlecloudchannelv1channelpartnerrepricingconfig *GoogleCloudChannelV1ChannelPartnerRepricingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results other than the first page. Obtained -// through ListCustomersResponse.next_page_token of the previous -// CloudChannelService.ListCustomers call. -func (c *AccountsChannelPartnerLinksCustomersListCall) PageToken(pageToken string) *AccountsChannelPartnerLinksCustomersListCall { - c.urlParams_.Set("pageToken", pageToken) +// Patch: Updates a ChannelPartnerRepricingConfig. Call this method to +// set modifications for a specific ChannelPartner's bill. This method +// overwrites the existing CustomerRepricingConfig. You can only update +// configs if the RepricingConfig.effective_invoice_month is a future +// month. To make changes to configs for the current month, use +// CreateChannelPartnerRepricingConfig, taking note of its restrictions. +// You cannot update the RepricingConfig.effective_invoice_month. When +// updating a config in the future: * This config must already exist. +// Possible Error Codes: * PERMISSION_DENIED: If the account making the +// request and the account being queried are different. * +// INVALID_ARGUMENT: Missing or invalid required parameters in the +// request. Also displays if the updated config is for the current month +// or past months. * NOT_FOUND: The ChannelPartnerRepricingConfig +// specified does not exist or is not associated with the given account. +// * INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. Return Value: +// If successful, the updated ChannelPartnerRepricingConfig resource, +// otherwise returns an error. +// +// - name: Output only. Resource name of the +// ChannelPartnerRepricingConfig. Format: +// accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/chann +// elPartnerRepricingConfigs/{id}. +func (r *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsService) Patch(name string, googlecloudchannelv1channelpartnerrepricingconfig *GoogleCloudChannelV1ChannelPartnerRepricingConfig) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall { + c := &AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1channelpartnerrepricingconfig = googlecloudchannelv1channelpartnerrepricingconfig return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsChannelPartnerLinksCustomersListCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersListCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsChannelPartnerLinksCustomersListCall) IfNoneMatch(entityTag string) *AccountsChannelPartnerLinksCustomersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsChannelPartnerLinksCustomersListCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersListCall { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall) Context(ctx context.Context) *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsChannelPartnerLinksCustomersListCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsChannelPartnerLinksCustomersListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1channelpartnerrepricingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.list" call. -// Exactly one of *GoogleCloudChannelV1ListCustomersResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.patch" call. +// Exactly one of *GoogleCloudChannelV1ChannelPartnerRepricingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudChannelV1ListCustomersResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudChannelV1ChannelPartnerRepricingConfig.ServerResponse.Head +// er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsChannelPartnerLinksCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomersResponse, error) { +func (c *AccountsChannelPartnerLinksChannelPartnerRepricingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ChannelPartnerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6816,7 +7380,7 @@ func (c *AccountsChannelPartnerLinksCustomersListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudChannelV1ListCustomersResponse{ + ret := &GoogleCloudChannelV1ChannelPartnerRepricingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6828,41 +7392,28 @@ func (c *AccountsChannelPartnerLinksCustomersListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers.", - // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.channelPartnerLinks.customers.list", + // "description": "Updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. This method overwrites the existing CustomerRepricingConfig. You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateChannelPartnerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month. When updating a config in the future: * This config must already exist. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/channelPartnerRepricingConfigs/{channelPartnerRepricingConfigsId}", + // "httpMethod": "PATCH", + // "id": "cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}.", + // "name": { + // "description": "Output only. Resource name of the ChannelPartnerRepricingConfig. Format: accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customers", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" + // }, // "response": { - // "$ref": "GoogleCloudChannelV1ListCustomersResponse" + // "$ref": "GoogleCloudChannelV1ChannelPartnerRepricingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -6871,65 +7422,38 @@ func (c *AccountsChannelPartnerLinksCustomersListCall) Do(opts ...googleapi.Call } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsChannelPartnerLinksCustomersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomersResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudchannel.accounts.channelPartnerLinks.customers.patch": +// method id "cloudchannel.accounts.channelPartnerLinks.customers.create": -type AccountsChannelPartnerLinksCustomersPatchCall struct { +type AccountsChannelPartnerLinksCustomersCreateCall struct { s *Service - name string + parent string googlecloudchannelv1customer *GoogleCloudChannelV1Customer urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates an existing Customer resource for the reseller or -// distributor. Possible error codes: * PERMISSION_DENIED: The reseller -// account making the request is different from the reseller account in -// the API request. * INVALID_ARGUMENT: Required request parameters are -// missing or invalid. * NOT_FOUND: No Customer resource found for the -// name in the request. Return value: The updated Customer resource. +// Create: Creates a new Customer resource under the reseller or +// distributor account. Possible error codes: * PERMISSION_DENIED: The +// reseller account making the request is different from the reseller +// account in the API request. * INVALID_ARGUMENT: * Required request +// parameters are missing or invalid. * Domain field value doesn't match +// the primary email domain. Return value: The newly created Customer +// resource. // -// - name: Output only. Resource name of the customer. Format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsChannelPartnerLinksCustomersService) Patch(name string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsChannelPartnerLinksCustomersPatchCall { - c := &AccountsChannelPartnerLinksCustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of reseller account in which to create +// the customer. Parent uses the format: accounts/{account_id}. +func (r *AccountsChannelPartnerLinksCustomersService) Create(parent string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsChannelPartnerLinksCustomersCreateCall { + c := &AccountsChannelPartnerLinksCustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent c.googlecloudchannelv1customer = googlecloudchannelv1customer return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// that applies to the resource. -func (c *AccountsChannelPartnerLinksCustomersPatchCall) UpdateMask(updateMask string) *AccountsChannelPartnerLinksCustomersPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsChannelPartnerLinksCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersPatchCall { +func (c *AccountsChannelPartnerLinksCustomersCreateCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6937,21 +7461,21 @@ func (c *AccountsChannelPartnerLinksCustomersPatchCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsChannelPartnerLinksCustomersPatchCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersPatchCall { +func (c *AccountsChannelPartnerLinksCustomersCreateCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsChannelPartnerLinksCustomersPatchCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksCustomersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsChannelPartnerLinksCustomersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksCustomersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6966,27 +7490,27 @@ func (c *AccountsChannelPartnerLinksCustomersPatchCall) doRequest(alt string) (* reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.patch" call. +// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.create" call. // Exactly one of *GoogleCloudChannelV1Customer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsChannelPartnerLinksCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +func (c *AccountsChannelPartnerLinksCustomersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7017,173 +7541,18 @@ func (c *AccountsChannelPartnerLinksCustomersPatchCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", - // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", - // "httpMethod": "PATCH", - // "id": "cloudchannel.accounts.channelPartnerLinks.customers.patch", + // "description": "Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource.", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.channelPartnerLinks.customers.create", // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Output only. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", - // "location": "path", - // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "The update mask that applies to the resource. Optional.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudChannelV1Customer" - // }, - // "response": { - // "$ref": "GoogleCloudChannelV1Customer" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/apps.order" - // ] - // } - -} - -// method id "cloudchannel.accounts.customers.create": - -type AccountsCustomersCreateCall struct { - s *Service - parent string - googlecloudchannelv1customer *GoogleCloudChannelV1Customer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new Customer resource under the reseller or -// distributor account. Possible error codes: * PERMISSION_DENIED: The -// reseller account making the request is different from the reseller -// account in the API request. * INVALID_ARGUMENT: * Required request -// parameters are missing or invalid. * Domain field value doesn't match -// the primary email domain. Return value: The newly created Customer -// resource. -// -// - parent: The resource name of reseller account in which to create -// the customer. Parent uses the format: accounts/{account_id}. -func (r *AccountsCustomersService) Create(parent string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsCustomersCreateCall { - c := &AccountsCustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudchannelv1customer = googlecloudchannelv1customer - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AccountsCustomersCreateCall) Fields(s ...googleapi.Field) *AccountsCustomersCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AccountsCustomersCreateCall) Context(ctx context.Context) *AccountsCustomersCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AccountsCustomersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsCustomersCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customer) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudchannel.accounts.customers.create" call. -// Exactly one of *GoogleCloudChannelV1Customer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsCustomersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudChannelV1Customer{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource.", - // "flatPath": "v1/accounts/{accountsId}/customers", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.create", - // "parameterOrder": [ - // "parent" + // "parent" // ], // "parameters": { // "parent": { // "description": "Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id}", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", // "required": true, // "type": "string" // } @@ -7202,9 +7571,9 @@ func (c *AccountsCustomersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleC } -// method id "cloudchannel.accounts.customers.delete": +// method id "cloudchannel.accounts.channelPartnerLinks.customers.delete": -type AccountsCustomersDeleteCall struct { +type AccountsChannelPartnerLinksCustomersDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -7220,8 +7589,8 @@ type AccountsCustomersDeleteCall struct { // the request. // // - name: The resource name of the customer to delete. -func (r *AccountsCustomersService) Delete(name string) *AccountsCustomersDeleteCall { - c := &AccountsCustomersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsChannelPartnerLinksCustomersService) Delete(name string) *AccountsChannelPartnerLinksCustomersDeleteCall { + c := &AccountsChannelPartnerLinksCustomersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -7229,7 +7598,7 @@ func (r *AccountsCustomersService) Delete(name string) *AccountsCustomersDeleteC // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersDeleteCall) Fields(s ...googleapi.Field) *AccountsCustomersDeleteCall { +func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7237,21 +7606,21 @@ func (c *AccountsCustomersDeleteCall) Fields(s ...googleapi.Field) *AccountsCust // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersDeleteCall) Context(ctx context.Context) *AccountsCustomersDeleteCall { +func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersDeleteCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksCustomersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7274,14 +7643,14 @@ func (c *AccountsCustomersDeleteCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.delete" call. +// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsCustomersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *AccountsChannelPartnerLinksCustomersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7313,9 +7682,9 @@ func (c *AccountsCustomersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleP return ret, nil // { // "description": "Deletes the given Customer permanently. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name in the request.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", // "httpMethod": "DELETE", - // "id": "cloudchannel.accounts.customers.delete", + // "id": "cloudchannel.accounts.channelPartnerLinks.customers.delete", // "parameterOrder": [ // "name" // ], @@ -7323,7 +7692,7 @@ func (c *AccountsCustomersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleP // "name": { // "description": "Required. The resource name of the customer to delete.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // } @@ -7339,9 +7708,9 @@ func (c *AccountsCustomersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleP } -// method id "cloudchannel.accounts.customers.get": +// method id "cloudchannel.accounts.channelPartnerLinks.customers.get": -type AccountsCustomersGetCall struct { +type AccountsChannelPartnerLinksCustomersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -7359,8 +7728,8 @@ type AccountsCustomersGetCall struct { // // - name: The resource name of the customer to retrieve. Name uses the // format: accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) Get(name string) *AccountsCustomersGetCall { - c := &AccountsCustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsChannelPartnerLinksCustomersService) Get(name string) *AccountsChannelPartnerLinksCustomersGetCall { + c := &AccountsChannelPartnerLinksCustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -7368,7 +7737,7 @@ func (r *AccountsCustomersService) Get(name string) *AccountsCustomersGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersGetCall) Fields(s ...googleapi.Field) *AccountsCustomersGetCall { +func (c *AccountsChannelPartnerLinksCustomersGetCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7378,7 +7747,7 @@ func (c *AccountsCustomersGetCall) Fields(s ...googleapi.Field) *AccountsCustome // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsCustomersGetCall) IfNoneMatch(entityTag string) *AccountsCustomersGetCall { +func (c *AccountsChannelPartnerLinksCustomersGetCall) IfNoneMatch(entityTag string) *AccountsChannelPartnerLinksCustomersGetCall { c.ifNoneMatch_ = entityTag return c } @@ -7386,21 +7755,21 @@ func (c *AccountsCustomersGetCall) IfNoneMatch(entityTag string) *AccountsCustom // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersGetCall) Context(ctx context.Context) *AccountsCustomersGetCall { +func (c *AccountsChannelPartnerLinksCustomersGetCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersGetCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksCustomersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksCustomersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7426,14 +7795,14 @@ func (c *AccountsCustomersGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.get" call. +// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.get" call. // Exactly one of *GoogleCloudChannelV1Customer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsCustomersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +func (c *AccountsChannelPartnerLinksCustomersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7465,9 +7834,9 @@ func (c *AccountsCustomersGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil // { // "description": "Returns the requested Customer resource. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter. Return value: The Customer resource.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.get", + // "id": "cloudchannel.accounts.channelPartnerLinks.customers.get", // "parameterOrder": [ // "name" // ], @@ -7475,7 +7844,7 @@ func (c *AccountsCustomersGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou // "name": { // "description": "Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // } @@ -7491,9 +7860,9 @@ func (c *AccountsCustomersGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } -// method id "cloudchannel.accounts.customers.import": +// method id "cloudchannel.accounts.channelPartnerLinks.customers.import": -type AccountsCustomersImportCall struct { +type AccountsChannelPartnerLinksCustomersImportCall struct { s *Service parent string googlecloudchannelv1importcustomerrequest *GoogleCloudChannelV1ImportCustomerRequest @@ -7517,8 +7886,8 @@ type AccountsCustomersImportCall struct { // - parent: The resource name of the reseller's account. Parent takes // the format: accounts/{account_id} or // accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. -func (r *AccountsCustomersService) Import(parent string, googlecloudchannelv1importcustomerrequest *GoogleCloudChannelV1ImportCustomerRequest) *AccountsCustomersImportCall { - c := &AccountsCustomersImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsChannelPartnerLinksCustomersService) Import(parent string, googlecloudchannelv1importcustomerrequest *GoogleCloudChannelV1ImportCustomerRequest) *AccountsChannelPartnerLinksCustomersImportCall { + c := &AccountsChannelPartnerLinksCustomersImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.googlecloudchannelv1importcustomerrequest = googlecloudchannelv1importcustomerrequest return c @@ -7527,7 +7896,7 @@ func (r *AccountsCustomersService) Import(parent string, googlecloudchannelv1imp // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersImportCall) Fields(s ...googleapi.Field) *AccountsCustomersImportCall { +func (c *AccountsChannelPartnerLinksCustomersImportCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7535,21 +7904,21 @@ func (c *AccountsCustomersImportCall) Fields(s ...googleapi.Field) *AccountsCust // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersImportCall) Context(ctx context.Context) *AccountsCustomersImportCall { +func (c *AccountsChannelPartnerLinksCustomersImportCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersImportCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksCustomersImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersImportCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksCustomersImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7577,14 +7946,14 @@ func (c *AccountsCustomersImportCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.import" call. +// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.import" call. // Exactly one of *GoogleCloudChannelV1Customer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +func (c *AccountsChannelPartnerLinksCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7616,9 +7985,9 @@ func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleC return ret, nil // { // "description": "Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. * ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite. Return value: The Customer.", - // "flatPath": "v1/accounts/{accountsId}/customers:import", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers:import", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.import", + // "id": "cloudchannel.accounts.channelPartnerLinks.customers.import", // "parameterOrder": [ // "parent" // ], @@ -7626,7 +7995,7 @@ func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleC // "parent": { // "description": "Required. The resource name of the reseller's account. Parent takes the format: accounts/{account_id} or accounts/{account_id}/channelPartnerLinks/{channel_partner_id}", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", // "required": true, // "type": "string" // } @@ -7645,9 +8014,9 @@ func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleC } -// method id "cloudchannel.accounts.customers.list": +// method id "cloudchannel.accounts.channelPartnerLinks.customers.list": -type AccountsCustomersListCall struct { +type AccountsChannelPartnerLinksCustomersListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -7664,8 +8033,8 @@ type AccountsCustomersListCall struct { // // - parent: The resource name of the reseller account to list customers // from. Parent uses the format: accounts/{account_id}. -func (r *AccountsCustomersService) List(parent string) *AccountsCustomersListCall { - c := &AccountsCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsChannelPartnerLinksCustomersService) List(parent string) *AccountsChannelPartnerLinksCustomersListCall { + c := &AccountsChannelPartnerLinksCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -7674,7 +8043,7 @@ func (r *AccountsCustomersService) List(parent string) *AccountsCustomersListCal // [CloudChannelService.ListCustomers] results. See // https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers // for more information. -func (c *AccountsCustomersListCall) Filter(filter string) *AccountsCustomersListCall { +func (c *AccountsChannelPartnerLinksCustomersListCall) Filter(filter string) *AccountsChannelPartnerLinksCustomersListCall { c.urlParams_.Set("filter", filter) return c } @@ -7683,7 +8052,7 @@ func (c *AccountsCustomersListCall) Filter(filter string) *AccountsCustomersList // of customers to return. The service may return fewer than this value. // If unspecified, returns at most 10 customers. The maximum value is // 50. -func (c *AccountsCustomersListCall) PageSize(pageSize int64) *AccountsCustomersListCall { +func (c *AccountsChannelPartnerLinksCustomersListCall) PageSize(pageSize int64) *AccountsChannelPartnerLinksCustomersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -7692,7 +8061,7 @@ func (c *AccountsCustomersListCall) PageSize(pageSize int64) *AccountsCustomersL // identifying a page of results other than the first page. Obtained // through ListCustomersResponse.next_page_token of the previous // CloudChannelService.ListCustomers call. -func (c *AccountsCustomersListCall) PageToken(pageToken string) *AccountsCustomersListCall { +func (c *AccountsChannelPartnerLinksCustomersListCall) PageToken(pageToken string) *AccountsChannelPartnerLinksCustomersListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -7700,7 +8069,7 @@ func (c *AccountsCustomersListCall) PageToken(pageToken string) *AccountsCustome // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersListCall) Fields(s ...googleapi.Field) *AccountsCustomersListCall { +func (c *AccountsChannelPartnerLinksCustomersListCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7710,7 +8079,7 @@ func (c *AccountsCustomersListCall) Fields(s ...googleapi.Field) *AccountsCustom // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsCustomersListCall) IfNoneMatch(entityTag string) *AccountsCustomersListCall { +func (c *AccountsChannelPartnerLinksCustomersListCall) IfNoneMatch(entityTag string) *AccountsChannelPartnerLinksCustomersListCall { c.ifNoneMatch_ = entityTag return c } @@ -7718,21 +8087,21 @@ func (c *AccountsCustomersListCall) IfNoneMatch(entityTag string) *AccountsCusto // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersListCall) Context(ctx context.Context) *AccountsCustomersListCall { +func (c *AccountsChannelPartnerLinksCustomersListCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersListCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksCustomersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksCustomersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7758,7 +8127,7 @@ func (c *AccountsCustomersListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.list" call. +// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.list" call. // Exactly one of *GoogleCloudChannelV1ListCustomersResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -7767,7 +8136,7 @@ func (c *AccountsCustomersListCall) doRequest(alt string) (*http.Response, error // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomersResponse, error) { +func (c *AccountsChannelPartnerLinksCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7799,9 +8168,9 @@ func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleClo return ret, nil // { // "description": "List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers.", - // "flatPath": "v1/accounts/{accountsId}/customers", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers", // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.list", + // "id": "cloudchannel.accounts.channelPartnerLinks.customers.list", // "parameterOrder": [ // "parent" // ], @@ -7825,7 +8194,7 @@ func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleClo // "parent": { // "description": "Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}.", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", // "required": true, // "type": "string" // } @@ -7844,7 +8213,7 @@ func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleClo // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomersResponse) error) error { +func (c *AccountsChannelPartnerLinksCustomersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomersResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -7862,154 +8231,101 @@ func (c *AccountsCustomersListCall) Pages(ctx context.Context, f func(*GoogleClo } } -// method id "cloudchannel.accounts.customers.listPurchasableOffers": +// method id "cloudchannel.accounts.channelPartnerLinks.customers.patch": -type AccountsCustomersListPurchasableOffersCall struct { - s *Service - customer string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsChannelPartnerLinksCustomersPatchCall struct { + s *Service + name string + googlecloudchannelv1customer *GoogleCloudChannelV1Customer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListPurchasableOffers: Lists the following: * Offers that you can -// purchase for a customer. * Offers that you can change for an -// entitlement. Possible error codes: * PERMISSION_DENIED: The customer -// doesn't belong to the reseller * INVALID_ARGUMENT: Required request -// parameters are missing or invalid. +// Patch: Updates an existing Customer resource for the reseller or +// distributor. Possible error codes: * PERMISSION_DENIED: The reseller +// account making the request is different from the reseller account in +// the API request. * INVALID_ARGUMENT: Required request parameters are +// missing or invalid. * NOT_FOUND: No Customer resource found for the +// name in the request. Return value: The updated Customer resource. // -// - customer: The resource name of the customer to list Offers for. -// Format: accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) ListPurchasableOffers(customer string) *AccountsCustomersListPurchasableOffersCall { - c := &AccountsCustomersListPurchasableOffersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.customer = customer - return c -} - -// ChangeOfferPurchaseEntitlement sets the optional parameter -// "changeOfferPurchase.entitlement": Required. Resource name of the -// entitlement. Format: -// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen -// t_id} -func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("changeOfferPurchase.entitlement", changeOfferPurchaseEntitlement) - return c -} - -// ChangeOfferPurchaseNewSku sets the optional parameter -// "changeOfferPurchase.newSku": Resource name of the new target SKU. -// Provide this SKU when upgrading or downgrading an entitlement. -// Format: products/{product_id}/skus/{sku_id} -func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseNewSku(changeOfferPurchaseNewSku string) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("changeOfferPurchase.newSku", changeOfferPurchaseNewSku) - return c -} - -// CreateEntitlementPurchaseSku sets the optional parameter -// "createEntitlementPurchase.sku": Required. SKU that the result should -// be restricted to. Format: products/{product_id}/skus/{sku_id}. -func (c *AccountsCustomersListPurchasableOffersCall) CreateEntitlementPurchaseSku(createEntitlementPurchaseSku string) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("createEntitlementPurchase.sku", createEntitlementPurchaseSku) - return c -} - -// LanguageCode sets the optional parameter "languageCode": The BCP-47 -// language code. For example, "en-US". The response will localize in -// the corresponding language code, if specified. The default value is -// "en-US". -func (c *AccountsCustomersListPurchasableOffersCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("languageCode", languageCode) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server might return fewer results than requested. If unspecified, -// returns at most 100 Offers. The maximum value is 1000; the server -// will coerce values above 1000. -func (c *AccountsCustomersListPurchasableOffersCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: Output only. Resource name of the customer. Format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsChannelPartnerLinksCustomersService) Patch(name string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsChannelPartnerLinksCustomersPatchCall { + c := &AccountsChannelPartnerLinksCustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1customer = googlecloudchannelv1customer return c } -// PageToken sets the optional parameter "pageToken": A token for a page -// of results other than the first page. -func (c *AccountsCustomersListPurchasableOffersCall) PageToken(pageToken string) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": The update mask +// that applies to the resource. +func (c *AccountsChannelPartnerLinksCustomersPatchCall) UpdateMask(updateMask string) *AccountsChannelPartnerLinksCustomersPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersListPurchasableOffersCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsChannelPartnerLinksCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsChannelPartnerLinksCustomersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsCustomersListPurchasableOffersCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableOffersCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersListPurchasableOffersCall) Context(ctx context.Context) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsChannelPartnerLinksCustomersPatchCall) Context(ctx context.Context) *AccountsChannelPartnerLinksCustomersPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersListPurchasableOffersCall) Header() http.Header { +func (c *AccountsChannelPartnerLinksCustomersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersListPurchasableOffersCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsChannelPartnerLinksCustomersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customer) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableOffers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "customer": c.customer, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.listPurchasableOffers" call. -// Exactly one of *GoogleCloudChannelV1ListPurchasableOffersResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudChannelV1ListPurchasableOffersResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableOffersResponse, error) { +// Do executes the "cloudchannel.accounts.channelPartnerLinks.customers.patch" call. +// Exactly one of *GoogleCloudChannelV1Customer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsChannelPartnerLinksCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8028,7 +8344,7 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudChannelV1ListPurchasableOffersResponse{ + ret := &GoogleCloudChannelV1Customer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8040,56 +8356,34 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lists the following: * Offers that you can purchase for a customer. * Offers that you can change for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller * INVALID_ARGUMENT: Required request parameters are missing or invalid.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableOffers", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.listPurchasableOffers", + // "description": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", + // "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", + // "httpMethod": "PATCH", + // "id": "cloudchannel.accounts.channelPartnerLinks.customers.patch", // "parameterOrder": [ - // "customer" + // "name" // ], // "parameters": { - // "changeOfferPurchase.entitlement": { - // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", - // "location": "query", - // "type": "string" - // }, - // "changeOfferPurchase.newSku": { - // "description": "Optional. Resource name of the new target SKU. Provide this SKU when upgrading or downgrading an entitlement. Format: products/{product_id}/skus/{sku_id}", - // "location": "query", - // "type": "string" - // }, - // "createEntitlementPurchase.sku": { - // "description": "Required. SKU that the result should be restricted to. Format: products/{product_id}/skus/{sku_id}.", - // "location": "query", - // "type": "string" - // }, - // "customer": { - // "description": "Required. The resource name of the customer to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.", + // "name": { + // "description": "Output only. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // }, - // "languageCode": { - // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token for a page of results other than the first page.", + // "updateMask": { + // "description": "The update mask that applies to the resource. Optional.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+customer}:listPurchasableOffers", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, // "response": { - // "$ref": "GoogleCloudChannelV1ListPurchasableOffersResponse" + // "$ref": "GoogleCloudChannelV1Customer" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -8098,180 +8392,2097 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersListPurchasableOffersCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableOffersResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudchannel.accounts.customers.listPurchasableSkus": +// method id "cloudchannel.accounts.customers.create": -type AccountsCustomersListPurchasableSkusCall struct { - s *Service - customer string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsCustomersCreateCall struct { + s *Service + parent string + googlecloudchannelv1customer *GoogleCloudChannelV1Customer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListPurchasableSkus: Lists the following: * SKUs that you can -// purchase for a customer * SKUs that you can upgrade or downgrade for -// an entitlement. Possible error codes: * PERMISSION_DENIED: The -// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required -// request parameters are missing or invalid. -// -// - customer: The resource name of the customer to list SKUs for. -// Format: accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) ListPurchasableSkus(customer string) *AccountsCustomersListPurchasableSkusCall { - c := &AccountsCustomersListPurchasableSkusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.customer = customer +// Create: Creates a new Customer resource under the reseller or +// distributor account. Possible error codes: * PERMISSION_DENIED: The +// reseller account making the request is different from the reseller +// account in the API request. * INVALID_ARGUMENT: * Required request +// parameters are missing or invalid. * Domain field value doesn't match +// the primary email domain. Return value: The newly created Customer +// resource. +// +// - parent: The resource name of reseller account in which to create +// the customer. Parent uses the format: accounts/{account_id}. +func (r *AccountsCustomersService) Create(parent string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsCustomersCreateCall { + c := &AccountsCustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1customer = googlecloudchannelv1customer return c } -// ChangeOfferPurchaseChangeType sets the optional parameter -// "changeOfferPurchase.changeType": Required. Change Type for the -// entitlement. -// -// Possible values: -// "CHANGE_TYPE_UNSPECIFIED" - Not used. -// "UPGRADE" - SKU is an upgrade on the current entitlement. -// "DOWNGRADE" - SKU is a downgrade on the current entitlement. -func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseChangeType(changeOfferPurchaseChangeType string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("changeOfferPurchase.changeType", changeOfferPurchaseChangeType) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersCreateCall) Fields(s ...googleapi.Field) *AccountsCustomersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// ChangeOfferPurchaseEntitlement sets the optional parameter -// "changeOfferPurchase.entitlement": Required. Resource name of the -// entitlement. Format: -// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen -// t_id} -func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("changeOfferPurchase.entitlement", changeOfferPurchaseEntitlement) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersCreateCall) Context(ctx context.Context) *AccountsCustomersCreateCall { + c.ctx_ = ctx return c } -// CreateEntitlementPurchaseProduct sets the optional parameter -// "createEntitlementPurchase.product": Required. List SKUs belonging to -// this Product. Format: products/{product_id}. Supports products/- to -// retrieve SKUs for all products. -func (c *AccountsCustomersListPurchasableSkusCall) CreateEntitlementPurchaseProduct(createEntitlementPurchaseProduct string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("createEntitlementPurchase.product", createEntitlementPurchaseProduct) +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customer) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.create" call. +// Exactly one of *GoogleCloudChannelV1Customer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudChannelV1Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource.", + // "flatPath": "v1/accounts/{accountsId}/customers", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/customers", + // "request": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "response": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.delete": + +type AccountsCustomersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the given Customer permanently. Possible error codes: +// * PERMISSION_DENIED: The account making the request does not own this +// customer. * INVALID_ARGUMENT: Required request parameters are missing +// or invalid. * FAILED_PRECONDITION: The customer has existing +// entitlements. * NOT_FOUND: No Customer resource found for the name in +// the request. +// +// - name: The resource name of the customer to delete. +func (r *AccountsCustomersService) Delete(name string) *AccountsCustomersDeleteCall { + c := &AccountsCustomersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// LanguageCode sets the optional parameter "languageCode": The BCP-47 -// language code. For example, "en-US". The response will localize in -// the corresponding language code, if specified. The default value is -// "en-US". -func (c *AccountsCustomersListPurchasableSkusCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("languageCode", languageCode) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersDeleteCall) Fields(s ...googleapi.Field) *AccountsCustomersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server might return fewer results than requested. If unspecified, -// returns at most 100 SKUs. The maximum value is 1000; the server will -// coerce values above 1000. -func (c *AccountsCustomersListPurchasableSkusCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersDeleteCall) Context(ctx context.Context) *AccountsCustomersDeleteCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": A token for a page -// of results other than the first page. -func (c *AccountsCustomersListPurchasableSkusCall) PageToken(pageToken string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("pageToken", pageToken) +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the given Customer permanently. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name in the request.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", + // "httpMethod": "DELETE", + // "id": "cloudchannel.accounts.customers.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the customer to delete.", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.get": + +type AccountsCustomersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the requested Customer resource. Possible error codes: * +// PERMISSION_DENIED: The reseller account making the request is +// different from the reseller account in the API request. * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// * NOT_FOUND: The customer resource doesn't exist. Usually the result +// of an invalid name parameter. Return value: The Customer resource. +// +// - name: The resource name of the customer to retrieve. Name uses the +// format: accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) Get(name string) *AccountsCustomersGetCall { + c := &AccountsCustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersGetCall) Fields(s ...googleapi.Field) *AccountsCustomersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsCustomersGetCall) IfNoneMatch(entityTag string) *AccountsCustomersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersGetCall) Context(ctx context.Context) *AccountsCustomersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.get" call. +// Exactly one of *GoogleCloudChannelV1Customer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudChannelV1Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the requested Customer resource. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter. Return value: The Customer resource.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.import": + +type AccountsCustomersImportCall struct { + s *Service + parent string + googlecloudchannelv1importcustomerrequest *GoogleCloudChannelV1ImportCustomerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports a Customer from the Cloud Identity associated with +// the provided Cloud Identity ID or domain before a +// TransferEntitlements call. If a linked Customer already exists and +// overwrite_if_exists is true, it will update that Customer's data. +// Possible error codes: * PERMISSION_DENIED: The reseller account +// making the request is different from the reseller account in the API +// request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * +// INVALID_ARGUMENT: Required parameters are missing, or the auth_token +// is expired or invalid. * ALREADY_EXISTS: A customer already exists +// and has conflicting critical fields. Requires an overwrite. Return +// value: The Customer. +// +// - parent: The resource name of the reseller's account. Parent takes +// the format: accounts/{account_id} or +// accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. +func (r *AccountsCustomersService) Import(parent string, googlecloudchannelv1importcustomerrequest *GoogleCloudChannelV1ImportCustomerRequest) *AccountsCustomersImportCall { + c := &AccountsCustomersImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1importcustomerrequest = googlecloudchannelv1importcustomerrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersImportCall) Fields(s ...googleapi.Field) *AccountsCustomersImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersImportCall) Context(ctx context.Context) *AccountsCustomersImportCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1importcustomerrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers:import") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.import" call. +// Exactly one of *GoogleCloudChannelV1Customer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudChannelV1Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. * ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite. Return value: The Customer.", + // "flatPath": "v1/accounts/{accountsId}/customers:import", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the reseller's account. Parent takes the format: accounts/{account_id} or accounts/{account_id}/channelPartnerLinks/{channel_partner_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/customers:import", + // "request": { + // "$ref": "GoogleCloudChannelV1ImportCustomerRequest" + // }, + // "response": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.list": + +type AccountsCustomersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List Customers. Possible error codes: * PERMISSION_DENIED: The +// reseller account making the request is different from the reseller +// account in the API request. * INVALID_ARGUMENT: Required request +// parameters are missing or invalid. Return value: List of Customers, +// or an empty list if there are no customers. +// +// - parent: The resource name of the reseller account to list customers +// from. Parent uses the format: accounts/{account_id}. +func (r *AccountsCustomersService) List(parent string) *AccountsCustomersListCall { + c := &AccountsCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filters applied to the +// [CloudChannelService.ListCustomers] results. See +// https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers +// for more information. +func (c *AccountsCustomersListCall) Filter(filter string) *AccountsCustomersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of customers to return. The service may return fewer than this value. +// If unspecified, returns at most 10 customers. The maximum value is +// 50. +func (c *AccountsCustomersListCall) PageSize(pageSize int64) *AccountsCustomersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results other than the first page. Obtained +// through ListCustomersResponse.next_page_token of the previous +// CloudChannelService.ListCustomers call. +func (c *AccountsCustomersListCall) PageToken(pageToken string) *AccountsCustomersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersListCall) Fields(s ...googleapi.Field) *AccountsCustomersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsCustomersListCall) IfNoneMatch(entityTag string) *AccountsCustomersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersListCall) Context(ctx context.Context) *AccountsCustomersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.list" call. +// Exactly one of *GoogleCloudChannelV1ListCustomersResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListCustomersResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudChannelV1ListCustomersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers.", + // "flatPath": "v1/accounts/{accountsId}/customers", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}.", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/customers", + // "response": { + // "$ref": "GoogleCloudChannelV1ListCustomersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsCustomersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudchannel.accounts.customers.listPurchasableOffers": + +type AccountsCustomersListPurchasableOffersCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListPurchasableOffers: Lists the following: * Offers that you can +// purchase for a customer. * Offers that you can change for an +// entitlement. Possible error codes: * PERMISSION_DENIED: The customer +// doesn't belong to the reseller * INVALID_ARGUMENT: Required request +// parameters are missing or invalid. +// +// - customer: The resource name of the customer to list Offers for. +// Format: accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) ListPurchasableOffers(customer string) *AccountsCustomersListPurchasableOffersCall { + c := &AccountsCustomersListPurchasableOffersCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// ChangeOfferPurchaseEntitlement sets the optional parameter +// "changeOfferPurchase.entitlement": Required. Resource name of the +// entitlement. Format: +// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen +// t_id} +func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("changeOfferPurchase.entitlement", changeOfferPurchaseEntitlement) + return c +} + +// ChangeOfferPurchaseNewSku sets the optional parameter +// "changeOfferPurchase.newSku": Resource name of the new target SKU. +// Provide this SKU when upgrading or downgrading an entitlement. +// Format: products/{product_id}/skus/{sku_id} +func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseNewSku(changeOfferPurchaseNewSku string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("changeOfferPurchase.newSku", changeOfferPurchaseNewSku) + return c +} + +// CreateEntitlementPurchaseSku sets the optional parameter +// "createEntitlementPurchase.sku": Required. SKU that the result should +// be restricted to. Format: products/{product_id}/skus/{sku_id}. +func (c *AccountsCustomersListPurchasableOffersCall) CreateEntitlementPurchaseSku(createEntitlementPurchaseSku string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("createEntitlementPurchase.sku", createEntitlementPurchaseSku) + return c +} + +// LanguageCode sets the optional parameter "languageCode": The BCP-47 +// language code. For example, "en-US". The response will localize in +// the corresponding language code, if specified. The default value is +// "en-US". +func (c *AccountsCustomersListPurchasableOffersCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server might return fewer results than requested. If unspecified, +// returns at most 100 Offers. The maximum value is 1000; the server +// will coerce values above 1000. +func (c *AccountsCustomersListPurchasableOffersCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token for a page +// of results other than the first page. +func (c *AccountsCustomersListPurchasableOffersCall) PageToken(pageToken string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersListPurchasableOffersCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsCustomersListPurchasableOffersCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableOffersCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersListPurchasableOffersCall) Context(ctx context.Context) *AccountsCustomersListPurchasableOffersCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersListPurchasableOffersCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersListPurchasableOffersCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableOffers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.listPurchasableOffers" call. +// Exactly one of *GoogleCloudChannelV1ListPurchasableOffersResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListPurchasableOffersResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableOffersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudChannelV1ListPurchasableOffersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the following: * Offers that you can purchase for a customer. * Offers that you can change for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller * INVALID_ARGUMENT: Required request parameters are missing or invalid.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableOffers", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.listPurchasableOffers", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "changeOfferPurchase.entitlement": { + // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "location": "query", + // "type": "string" + // }, + // "changeOfferPurchase.newSku": { + // "description": "Optional. Resource name of the new target SKU. Provide this SKU when upgrading or downgrading an entitlement. Format: products/{product_id}/skus/{sku_id}", + // "location": "query", + // "type": "string" + // }, + // "createEntitlementPurchase.sku": { + // "description": "Required. SKU that the result should be restricted to. Format: products/{product_id}/skus/{sku_id}.", + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "Required. The resource name of the customer to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "languageCode": { + // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token for a page of results other than the first page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+customer}:listPurchasableOffers", + // "response": { + // "$ref": "GoogleCloudChannelV1ListPurchasableOffersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsCustomersListPurchasableOffersCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableOffersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudchannel.accounts.customers.listPurchasableSkus": + +type AccountsCustomersListPurchasableSkusCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListPurchasableSkus: Lists the following: * SKUs that you can +// purchase for a customer * SKUs that you can upgrade or downgrade for +// an entitlement. Possible error codes: * PERMISSION_DENIED: The +// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required +// request parameters are missing or invalid. +// +// - customer: The resource name of the customer to list SKUs for. +// Format: accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) ListPurchasableSkus(customer string) *AccountsCustomersListPurchasableSkusCall { + c := &AccountsCustomersListPurchasableSkusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// ChangeOfferPurchaseChangeType sets the optional parameter +// "changeOfferPurchase.changeType": Required. Change Type for the +// entitlement. +// +// Possible values: +// "CHANGE_TYPE_UNSPECIFIED" - Not used. +// "UPGRADE" - SKU is an upgrade on the current entitlement. +// "DOWNGRADE" - SKU is a downgrade on the current entitlement. +func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseChangeType(changeOfferPurchaseChangeType string) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("changeOfferPurchase.changeType", changeOfferPurchaseChangeType) + return c +} + +// ChangeOfferPurchaseEntitlement sets the optional parameter +// "changeOfferPurchase.entitlement": Required. Resource name of the +// entitlement. Format: +// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen +// t_id} +func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("changeOfferPurchase.entitlement", changeOfferPurchaseEntitlement) + return c +} + +// CreateEntitlementPurchaseProduct sets the optional parameter +// "createEntitlementPurchase.product": Required. List SKUs belonging to +// this Product. Format: products/{product_id}. Supports products/- to +// retrieve SKUs for all products. +func (c *AccountsCustomersListPurchasableSkusCall) CreateEntitlementPurchaseProduct(createEntitlementPurchaseProduct string) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("createEntitlementPurchase.product", createEntitlementPurchaseProduct) + return c +} + +// LanguageCode sets the optional parameter "languageCode": The BCP-47 +// language code. For example, "en-US". The response will localize in +// the corresponding language code, if specified. The default value is +// "en-US". +func (c *AccountsCustomersListPurchasableSkusCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server might return fewer results than requested. If unspecified, +// returns at most 100 SKUs. The maximum value is 1000; the server will +// coerce values above 1000. +func (c *AccountsCustomersListPurchasableSkusCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token for a page +// of results other than the first page. +func (c *AccountsCustomersListPurchasableSkusCall) PageToken(pageToken string) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersListPurchasableSkusCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsCustomersListPurchasableSkusCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableSkusCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersListPurchasableSkusCall) Context(ctx context.Context) *AccountsCustomersListPurchasableSkusCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersListPurchasableSkusCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersListPurchasableSkusCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableSkus") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.listPurchasableSkus" call. +// Exactly one of *GoogleCloudChannelV1ListPurchasableSkusResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListPurchasableSkusResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableSkusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudChannelV1ListPurchasableSkusResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the following: * SKUs that you can purchase for a customer * SKUs that you can upgrade or downgrade for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableSkus", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.listPurchasableSkus", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "changeOfferPurchase.changeType": { + // "description": "Required. Change Type for the entitlement.", + // "enum": [ + // "CHANGE_TYPE_UNSPECIFIED", + // "UPGRADE", + // "DOWNGRADE" + // ], + // "enumDescriptions": [ + // "Not used.", + // "SKU is an upgrade on the current entitlement.", + // "SKU is a downgrade on the current entitlement." + // ], + // "location": "query", + // "type": "string" + // }, + // "changeOfferPurchase.entitlement": { + // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "location": "query", + // "type": "string" + // }, + // "createEntitlementPurchase.product": { + // "description": "Required. List SKUs belonging to this Product. Format: products/{product_id}. Supports products/- to retrieve SKUs for all products.", + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "languageCode": { + // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token for a page of results other than the first page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+customer}:listPurchasableSkus", + // "response": { + // "$ref": "GoogleCloudChannelV1ListPurchasableSkusResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsCustomersListPurchasableSkusCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableSkusResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudchannel.accounts.customers.patch": + +type AccountsCustomersPatchCall struct { + s *Service + name string + googlecloudchannelv1customer *GoogleCloudChannelV1Customer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing Customer resource for the reseller or +// distributor. Possible error codes: * PERMISSION_DENIED: The reseller +// account making the request is different from the reseller account in +// the API request. * INVALID_ARGUMENT: Required request parameters are +// missing or invalid. * NOT_FOUND: No Customer resource found for the +// name in the request. Return value: The updated Customer resource. +// +// - name: Output only. Resource name of the customer. Format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) Patch(name string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsCustomersPatchCall { + c := &AccountsCustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1customer = googlecloudchannelv1customer + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask +// that applies to the resource. +func (c *AccountsCustomersPatchCall) UpdateMask(updateMask string) *AccountsCustomersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsCustomersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersPatchCall) Context(ctx context.Context) *AccountsCustomersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customer) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.patch" call. +// Exactly one of *GoogleCloudChannelV1Customer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudChannelV1Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", + // "httpMethod": "PATCH", + // "id": "cloudchannel.accounts.customers.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The update mask that applies to the resource. Optional.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "response": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.provisionCloudIdentity": + +type AccountsCustomersProvisionCloudIdentityCall struct { + s *Service + customer string + googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ProvisionCloudIdentity: Creates a Cloud Identity for the given +// customer using the customer's information, or the information +// provided here. Possible error codes: * PERMISSION_DENIED: The +// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required +// request parameters are missing or invalid. * NOT_FOUND: The customer +// was not found. * ALREADY_EXISTS: The customer's primary email already +// exists. Retry after changing the customer's primary contact email. * +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error +// related to a technical issue in the backend. Contact Cloud Channel +// support. Return value: The ID of a long-running operation. To get the +// results of the operation, call the GetOperation method of +// CloudChannelOperationsService. The Operation metadata contains an +// instance of OperationMetadata. +// +// - customer: Resource name of the customer. Format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) ProvisionCloudIdentity(customer string, googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest) *AccountsCustomersProvisionCloudIdentityCall { + c := &AccountsCustomersProvisionCloudIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.googlecloudchannelv1provisioncloudidentityrequest = googlecloudchannelv1provisioncloudidentityrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersProvisionCloudIdentityCall) Fields(s ...googleapi.Field) *AccountsCustomersProvisionCloudIdentityCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersProvisionCloudIdentityCall) Context(ctx context.Context) *AccountsCustomersProvisionCloudIdentityCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersProvisionCloudIdentityCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersProvisionCloudIdentityCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1provisioncloudidentityrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:provisionCloudIdentity") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.provisionCloudIdentity" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Cloud Identity for the given customer using the customer's information, or the information provided here. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer was not found. * ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:provisionCloudIdentity", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.provisionCloudIdentity", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Required. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+customer}:provisionCloudIdentity", + // "request": { + // "$ref": "GoogleCloudChannelV1ProvisionCloudIdentityRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.transferEntitlements": + +type AccountsCustomersTransferEntitlementsCall struct { + s *Service + parent string + googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TransferEntitlements: Transfers customer entitlements to new +// reseller. Possible error codes: * PERMISSION_DENIED: The customer +// doesn't belong to the reseller. * INVALID_ARGUMENT: Required request +// parameters are missing or invalid. * NOT_FOUND: The customer or offer +// resource was not found. * ALREADY_EXISTS: The SKU was already +// transferred for the customer. * CONDITION_NOT_MET or +// FAILED_PRECONDITION: * The SKU requires domain verification to +// transfer, but the domain is not verified. * An Add-On SKU (example, +// Vault or Drive) is missing the pre-requisite SKU (example, G Suite +// Basic). * (Developer accounts only) Reseller and resold domain must +// meet the following naming requirements: * Domain names must start +// with goog-test. * Domain names must include the reseller domain. * +// Specify all transferring entitlements. * INTERNAL: Any non-user error +// related to a technical issue in the backend. Contact Cloud Channel +// support. * UNKNOWN: Any non-user error related to a technical issue +// in the backend. Contact Cloud Channel support. Return value: The ID +// of a long-running operation. To get the results of the operation, +// call the GetOperation method of CloudChannelOperationsService. The +// Operation metadata will contain an instance of OperationMetadata. +// +// - parent: The resource name of the reseller's customer account that +// will receive transferred entitlements. Parent uses the format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) TransferEntitlements(parent string, googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest) *AccountsCustomersTransferEntitlementsCall { + c := &AccountsCustomersTransferEntitlementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1transferentitlementsrequest = googlecloudchannelv1transferentitlementsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersTransferEntitlementsCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersTransferEntitlementsCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersTransferEntitlementsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersTransferEntitlementsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlements") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.transferEntitlements" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Transfers customer entitlements to new reseller. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlements", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.transferEntitlements", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:transferEntitlements", + // "request": { + // "$ref": "GoogleCloudChannelV1TransferEntitlementsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.transferEntitlementsToGoogle": + +type AccountsCustomersTransferEntitlementsToGoogleCall struct { + s *Service + parent string + googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TransferEntitlementsToGoogle: Transfers customer entitlements from +// their current reseller to Google. Possible error codes: * +// PERMISSION_DENIED: The customer doesn't belong to the reseller. * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// * NOT_FOUND: The customer or offer resource was not found. * +// ALREADY_EXISTS: The SKU was already transferred for the customer. * +// CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain +// verification to transfer, but the domain is not verified. * An Add-On +// SKU (example, Vault or Drive) is missing the pre-requisite SKU +// (example, G Suite Basic). * (Developer accounts only) Reseller and +// resold domain must meet the following naming requirements: * Domain +// names must start with goog-test. * Domain names must include the +// reseller domain. * INTERNAL: Any non-user error related to a +// technical issue in the backend. Contact Cloud Channel support. * +// UNKNOWN: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. Return value: The ID of a +// long-running operation. To get the results of the operation, call the +// GetOperation method of CloudChannelOperationsService. The response +// will contain google.protobuf.Empty on success. The Operation metadata +// will contain an instance of OperationMetadata. +// +// - parent: The resource name of the reseller's customer account where +// the entitlements transfer from. Parent uses the format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) TransferEntitlementsToGoogle(parent string, googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest) *AccountsCustomersTransferEntitlementsToGoogleCall { + c := &AccountsCustomersTransferEntitlementsToGoogleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1transferentitlementstogooglerequest = googlecloudchannelv1transferentitlementstogooglerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsToGoogleCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsToGoogleCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementstogooglerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlementsToGoogle") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.transferEntitlementsToGoogle" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Transfers customer entitlements from their current reseller to Google. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlementsToGoogle", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.transferEntitlementsToGoogle", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:transferEntitlementsToGoogle", + // "request": { + // "$ref": "GoogleCloudChannelV1TransferEntitlementsToGoogleRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.create": + +type AccountsCustomersCustomerRepricingConfigsCreateCall struct { + s *Service + parent string + googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a CustomerRepricingConfig. Call this method to set +// modifications for a specific customer's bill. You can only create +// configs if the RepricingConfig.effective_invoice_month is a future +// month. If needed, you can create a config for the current month, with +// some restrictions. When creating a config for a future month, make +// sure there are no existing configs for that +// RepricingConfig.effective_invoice_month. The following restrictions +// are for creating configs in the current month. * This functionality +// is reserved for recovering from an erroneous config, and should not +// be used for regular business cases. * The new config will not modify +// exports used with other configs. Changes to the config may be +// immediate, but may take up to 24 hours. * There is a limit of ten +// configs for any RepricingConfig.EntitlementGranularity.entitlement or +// RepricingConfig.effective_invoice_month. * The contained +// CustomerRepricingConfig.repricing_config vaule must be different from +// the value used in the current config for a +// RepricingConfig.EntitlementGranularity.entitlement. Possible Error +// Codes: * PERMISSION_DENIED: If the account making the request and the +// account being queried are different. * INVALID_ARGUMENT: Missing or +// invalid required parameters in the request. Also displays if the +// updated config is for the current month or past months. * NOT_FOUND: +// The CustomerRepricingConfig specified does not exist or is not +// associated with the given account. * INTERNAL: Any non-user error +// related to technical issues in the backend. In this case, contact +// Cloud Channel support. Return Value: If successful, the updated +// CustomerRepricingConfig resource, otherwise returns an error. +// +// - parent: The resource name of the customer that will receive this +// repricing config. Parent uses the format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersCustomerRepricingConfigsService) Create(parent string, googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig) *AccountsCustomersCustomerRepricingConfigsCreateCall { + c := &AccountsCustomersCustomerRepricingConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1customerrepricingconfig = googlecloudchannelv1customerrepricingconfig return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersListPurchasableSkusCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableSkusCall { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsCustomersListPurchasableSkusCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableSkusCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersListPurchasableSkusCall) Context(ctx context.Context) *AccountsCustomersListPurchasableSkusCall { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersListPurchasableSkusCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersListPurchasableSkusCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customerrepricingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableSkus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customerRepricingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "customer": c.customer, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.listPurchasableSkus" call. -// Exactly one of *GoogleCloudChannelV1ListPurchasableSkusResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.create" call. +// Exactly one of *GoogleCloudChannelV1CustomerRepricingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudChannelV1ListPurchasableSkusResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudChannelV1CustomerRepricingConfig.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableSkusResponse, error) { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8290,7 +10501,7 @@ func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudChannelV1ListPurchasableSkusResponse{ + ret := &GoogleCloudChannelV1CustomerRepricingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8302,66 +10513,28 @@ func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists the following: * SKUs that you can purchase for a customer * SKUs that you can upgrade or downgrade for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableSkus", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.listPurchasableSkus", + // "description": "Creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions. When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month. The following restrictions are for creating configs in the current month. * This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any RepricingConfig.EntitlementGranularity.entitlement or RepricingConfig.effective_invoice_month. * The contained CustomerRepricingConfig.repricing_config vaule must be different from the value used in the current config for a RepricingConfig.EntitlementGranularity.entitlement. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.create", // "parameterOrder": [ - // "customer" + // "parent" // ], // "parameters": { - // "changeOfferPurchase.changeType": { - // "description": "Required. Change Type for the entitlement.", - // "enum": [ - // "CHANGE_TYPE_UNSPECIFIED", - // "UPGRADE", - // "DOWNGRADE" - // ], - // "enumDescriptions": [ - // "Not used.", - // "SKU is an upgrade on the current entitlement.", - // "SKU is a downgrade on the current entitlement." - // ], - // "location": "query", - // "type": "string" - // }, - // "changeOfferPurchase.entitlement": { - // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", - // "location": "query", - // "type": "string" - // }, - // "createEntitlementPurchase.product": { - // "description": "Required. List SKUs belonging to this Product. Format: products/{product_id}. Supports products/- to retrieve SKUs for all products.", - // "location": "query", - // "type": "string" - // }, - // "customer": { - // "description": "Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.", + // "parent": { + // "description": "Required. The resource name of the customer that will receive this repricing config. Parent uses the format: accounts/{account_id}/customers/{customer_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" - // }, - // "languageCode": { - // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token for a page of results other than the first page.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+customer}:listPurchasableSkus", + // "path": "v1/{+parent}/customerRepricingConfigs", + // "request": { + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + // }, // "response": { - // "$ref": "GoogleCloudChannelV1ListPurchasableSkusResponse" + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -8370,65 +10543,40 @@ func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOpti } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersListPurchasableSkusCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableSkusResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudchannel.accounts.customers.patch": +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.delete": -type AccountsCustomersPatchCall struct { - s *Service - name string - googlecloudchannelv1customer *GoogleCloudChannelV1Customer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersCustomerRepricingConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing Customer resource for the reseller or -// distributor. Possible error codes: * PERMISSION_DENIED: The reseller -// account making the request is different from the reseller account in -// the API request. * INVALID_ARGUMENT: Required request parameters are -// missing or invalid. * NOT_FOUND: No Customer resource found for the -// name in the request. Return value: The updated Customer resource. +// Delete: Deletes the given CustomerRepricingConfig permanently. You +// can only delete configs if their +// RepricingConfig.effective_invoice_month is set to a date after the +// current month. Possible error codes: * PERMISSION_DENIED: The account +// making the request does not own this customer. * INVALID_ARGUMENT: +// Required request parameters are missing or invalid. * +// FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the +// past. * NOT_FOUND: No CustomerRepricingConfig found for the name in +// the request. // -// - name: Output only. Resource name of the customer. Format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) Patch(name string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsCustomersPatchCall { - c := &AccountsCustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the customer repricing config rule to +// delete. Format: +// accounts/{account_id}/customers/{customer_id}/customerRepricingConfi +// gs/{id}. +func (r *AccountsCustomersCustomerRepricingConfigsService) Delete(name string) *AccountsCustomersCustomerRepricingConfigsDeleteCall { + c := &AccountsCustomersCustomerRepricingConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudchannelv1customer = googlecloudchannelv1customer - return c -} - -// UpdateMask sets the optional parameter "updateMask": The update mask -// that applies to the resource. -func (c *AccountsCustomersPatchCall) UpdateMask(updateMask string) *AccountsCustomersPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsCustomersPatchCall { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8436,21 +10584,21 @@ func (c *AccountsCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsCusto // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersPatchCall) Context(ctx context.Context) *AccountsCustomersPatchCall { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersPatchCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8458,16 +10606,11 @@ func (c *AccountsCustomersPatchCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customer) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -8478,14 +10621,14 @@ func (c *AccountsCustomersPatchCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.patch" call. -// Exactly one of *GoogleCloudChannelV1Customer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8504,7 +10647,7 @@ func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudChannelV1Customer{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8516,34 +10659,25 @@ func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl } return ret, nil // { - // "description": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", - // "httpMethod": "PATCH", - // "id": "cloudchannel.accounts.customers.patch", + // "description": "Deletes the given CustomerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the past. * NOT_FOUND: No CustomerRepricingConfig found for the name in the request.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + // "httpMethod": "DELETE", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + // "description": "Required. The resource name of the customer repricing config rule to delete. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The update mask that applies to the resource. Optional.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudChannelV1Customer" - // }, // "response": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -8552,102 +10686,106 @@ func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl } -// method id "cloudchannel.accounts.customers.provisionCloudIdentity": +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.get": -type AccountsCustomersProvisionCloudIdentityCall struct { - s *Service - customer string - googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersCustomerRepricingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ProvisionCloudIdentity: Creates a Cloud Identity for the given -// customer using the customer's information, or the information -// provided here. Possible error codes: * PERMISSION_DENIED: The -// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required -// request parameters are missing or invalid. * NOT_FOUND: The customer -// was not found. * ALREADY_EXISTS: The customer's primary email already -// exists. Retry after changing the customer's primary contact email. * -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error -// related to a technical issue in the backend. Contact Cloud Channel -// support. Return value: The ID of a long-running operation. To get the -// results of the operation, call the GetOperation method of -// CloudChannelOperationsService. The Operation metadata contains an -// instance of OperationMetadata. +// Get: Gets information about how a Reseller modifies their bill before +// sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: +// If the account making the request and the account being queried are +// different. * NOT_FOUND: The CustomerRepricingConfig was not found. * +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. Return Value: +// If successful, the CustomerRepricingConfig resource, otherwise +// returns an error. // -// - customer: Resource name of the customer. Format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) ProvisionCloudIdentity(customer string, googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest) *AccountsCustomersProvisionCloudIdentityCall { - c := &AccountsCustomersProvisionCloudIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.customer = customer - c.googlecloudchannelv1provisioncloudidentityrequest = googlecloudchannelv1provisioncloudidentityrequest +// - name: The resource name of the CustomerRepricingConfig. Format: +// accounts/{account_id}/customers/{customer_id}/customerRepricingConfi +// gs/{id}. +func (r *AccountsCustomersCustomerRepricingConfigsService) Get(name string) *AccountsCustomersCustomerRepricingConfigsGetCall { + c := &AccountsCustomersCustomerRepricingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersProvisionCloudIdentityCall) Fields(s ...googleapi.Field) *AccountsCustomersProvisionCloudIdentityCall { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) IfNoneMatch(entityTag string) *AccountsCustomersCustomerRepricingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersProvisionCloudIdentityCall) Context(ctx context.Context) *AccountsCustomersProvisionCloudIdentityCall { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersProvisionCloudIdentityCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersProvisionCloudIdentityCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1provisioncloudidentityrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:provisionCloudIdentity") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "customer": c.customer, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.provisionCloudIdentity" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.get" call. +// Exactly one of *GoogleCloudChannelV1CustomerRepricingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1CustomerRepricingConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8666,7 +10804,7 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1CustomerRepricingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8678,28 +10816,25 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates a Cloud Identity for the given customer using the customer's information, or the information provided here. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer was not found. * ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:provisionCloudIdentity", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.provisionCloudIdentity", + // "description": "Gets information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.get", // "parameterOrder": [ - // "customer" + // "name" // ], // "parameters": { - // "customer": { - // "description": "Required. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + // "name": { + // "description": "Required. The resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+customer}:provisionCloudIdentity", - // "request": { - // "$ref": "GoogleCloudChannelV1ProvisionCloudIdentityRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -8708,90 +10843,122 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallO } -// method id "cloudchannel.accounts.customers.transferEntitlements": +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.list": -type AccountsCustomersTransferEntitlementsCall struct { - s *Service - parent string - googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersCustomerRepricingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TransferEntitlements: Transfers customer entitlements to new -// reseller. Possible error codes: * PERMISSION_DENIED: The customer -// doesn't belong to the reseller. * INVALID_ARGUMENT: Required request -// parameters are missing or invalid. * NOT_FOUND: The customer or offer -// resource was not found. * ALREADY_EXISTS: The SKU was already -// transferred for the customer. * CONDITION_NOT_MET or -// FAILED_PRECONDITION: * The SKU requires domain verification to -// transfer, but the domain is not verified. * An Add-On SKU (example, -// Vault or Drive) is missing the pre-requisite SKU (example, G Suite -// Basic). * (Developer accounts only) Reseller and resold domain must -// meet the following naming requirements: * Domain names must start -// with goog-test. * Domain names must include the reseller domain. * -// Specify all transferring entitlements. * INTERNAL: Any non-user error -// related to a technical issue in the backend. Contact Cloud Channel -// support. * UNKNOWN: Any non-user error related to a technical issue -// in the backend. Contact Cloud Channel support. Return value: The ID -// of a long-running operation. To get the results of the operation, -// call the GetOperation method of CloudChannelOperationsService. The -// Operation metadata will contain an instance of OperationMetadata. +// List: Lists information about how a Reseller modifies their bill +// before sending it to a Customer. Possible Error Codes: * +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. * NOT_FOUND: The CustomerRepricingConfig +// specified does not exist or is not associated with the given account. +// * INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. Return Value: +// If successful, the CustomerRepricingConfig resources. The data for +// each resource is displayed in the ascending order of: * customer ID * +// RepricingConfig.EntitlementGranularity.entitlement * +// RepricingConfig.effective_invoice_month * +// CustomerRepricingConfig.update_time If unsuccessful, returns an +// error. // -// - parent: The resource name of the reseller's customer account that -// will receive transferred entitlements. Parent uses the format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) TransferEntitlements(parent string, googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest) *AccountsCustomersTransferEntitlementsCall { - c := &AccountsCustomersTransferEntitlementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the customer. Parent uses the format: +// accounts/{account_id}/customers/{customer_id}. Supports +// accounts/{account_id}/customers/- to retrieve configs for all +// customers. +func (r *AccountsCustomersCustomerRepricingConfigsService) List(parent string) *AccountsCustomersCustomerRepricingConfigsListCall { + c := &AccountsCustomersCustomerRepricingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudchannelv1transferentitlementsrequest = googlecloudchannelv1transferentitlementsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter for +// [CloudChannelService.ListCustomerRepricingConfigs] results (customer +// only). You can use this filter when you support a BatchGet-like +// query. To use the filter, you must set +// `parent=accounts/{account_id}/customers/-`. Example: customer = +// accounts/account_id/customers/c1 OR customer = +// accounts/account_id/customers/c2. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Filter(filter string) *AccountsCustomersCustomerRepricingConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of repricing configs to return. The service may return fewer than +// this value. If unspecified, returns a maximum of 50 rules. The +// maximum value is 100; values above 100 will be coerced to 100. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) PageSize(pageSize int64) *AccountsCustomersCustomerRepricingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results beyond the first page. Obtained through +// ListCustomerRepricingConfigsResponse.next_page_token of the previous +// CloudChannelService.ListCustomerRepricingConfigs call. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) PageToken(pageToken string) *AccountsCustomersCustomerRepricingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersTransferEntitlementsCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsCall { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) IfNoneMatch(entityTag string) *AccountsCustomersCustomerRepricingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersTransferEntitlementsCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsCall { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersTransferEntitlementsCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersTransferEntitlementsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlements") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customerRepricingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -8802,14 +10969,17 @@ func (c *AccountsCustomersTransferEntitlementsCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.transferEntitlements" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.list" call. +// Exactly one of +// *GoogleCloudChannelV1ListCustomerRepricingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListCustomerRepricingConfigsResponse.ServerRespon +// se.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomerRepricingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8828,7 +10998,7 @@ func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1ListCustomerRepricingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8840,28 +11010,41 @@ func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Transfers customer entitlements to new reseller. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlements", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.transferEntitlements", + // "description": "Lists information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resources. The data for each resource is displayed in the ascending order of: * customer ID * RepricingConfig.EntitlementGranularity.entitlement * RepricingConfig.effective_invoice_month * CustomerRepricingConfig.update_time If unsuccessful, returns an error.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. A filter for [CloudChannelService.ListCustomerRepricingConfigs] results (customer only). You can use this filter when you support a BatchGet-like query. To use the filter, you must set `parent=accounts/{account_id}/customers/-`. Example: customer = accounts/account_id/customers/c1 OR customer = accounts/account_id/customers/c2.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of repricing configs to return. The service may return fewer than this value. If unspecified, returns a maximum of 50 rules. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results beyond the first page. Obtained through ListCustomerRepricingConfigsResponse.next_page_token of the previous CloudChannelService.ListCustomerRepricingConfigs call.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "description": "Required. The resource name of the customer. Parent uses the format: accounts/{account_id}/customers/{customer_id}. Supports accounts/{account_id}/customers/- to retrieve configs for all customers.", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:transferEntitlements", - // "request": { - // "$ref": "GoogleCloudChannelV1TransferEntitlementsRequest" - // }, + // "path": "v1/{+parent}/customerRepricingConfigs", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1ListCustomerRepricingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -8870,52 +11053,72 @@ func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOpt } -// method id "cloudchannel.accounts.customers.transferEntitlementsToGoogle": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomerRepricingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type AccountsCustomersTransferEntitlementsToGoogleCall struct { - s *Service - parent string - googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.patch": + +type AccountsCustomersCustomerRepricingConfigsPatchCall struct { + s *Service + name string + googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TransferEntitlementsToGoogle: Transfers customer entitlements from -// their current reseller to Google. Possible error codes: * -// PERMISSION_DENIED: The customer doesn't belong to the reseller. * -// INVALID_ARGUMENT: Required request parameters are missing or invalid. -// * NOT_FOUND: The customer or offer resource was not found. * -// ALREADY_EXISTS: The SKU was already transferred for the customer. * -// CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain -// verification to transfer, but the domain is not verified. * An Add-On -// SKU (example, Vault or Drive) is missing the pre-requisite SKU -// (example, G Suite Basic). * (Developer accounts only) Reseller and -// resold domain must meet the following naming requirements: * Domain -// names must start with goog-test. * Domain names must include the -// reseller domain. * INTERNAL: Any non-user error related to a -// technical issue in the backend. Contact Cloud Channel support. * -// UNKNOWN: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. Return value: The ID of a -// long-running operation. To get the results of the operation, call the -// GetOperation method of CloudChannelOperationsService. The response -// will contain google.protobuf.Empty on success. The Operation metadata -// will contain an instance of OperationMetadata. +// Patch: Updates a CustomerRepricingConfig. Call this method to set +// modifications for a specific customer's bill. This method overwrites +// the existing CustomerRepricingConfig. You can only update configs if +// the RepricingConfig.effective_invoice_month is a future month. To +// make changes to configs for the current month, use +// CreateCustomerRepricingConfig, taking note of its restrictions. You +// cannot update the RepricingConfig.effective_invoice_month. When +// updating a config in the future: * This config must already exist. +// Possible Error Codes: * PERMISSION_DENIED: If the account making the +// request and the account being queried are different. * +// INVALID_ARGUMENT: Missing or invalid required parameters in the +// request. Also displays if the updated config is for the current month +// or past months. * NOT_FOUND: The CustomerRepricingConfig specified +// does not exist or is not associated with the given account. * +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. Return Value: +// If successful, the updated CustomerRepricingConfig resource, +// otherwise returns an error. // -// - parent: The resource name of the reseller's customer account where -// the entitlements transfer from. Parent uses the format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) TransferEntitlementsToGoogle(parent string, googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest) *AccountsCustomersTransferEntitlementsToGoogleCall { - c := &AccountsCustomersTransferEntitlementsToGoogleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudchannelv1transferentitlementstogooglerequest = googlecloudchannelv1transferentitlementstogooglerequest +// - name: Output only. Resource name of the CustomerRepricingConfig. +// Format: +// accounts/{account_id}/customers/{customer_id}/customerRepricingConfi +// gs/{id}. +func (r *AccountsCustomersCustomerRepricingConfigsService) Patch(name string, googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig) *AccountsCustomersCustomerRepricingConfigsPatchCall { + c := &AccountsCustomersCustomerRepricingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1customerrepricingconfig = googlecloudchannelv1customerrepricingconfig return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsToGoogleCall { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8923,21 +11126,21 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Fields(s ...googleap // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsToGoogleCall { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersTransferEntitlementsToGoogleCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8945,34 +11148,36 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementstogooglerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customerrepricingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlementsToGoogle") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.transferEntitlementsToGoogle" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.patch" call. +// Exactly one of *GoogleCloudChannelV1CustomerRepricingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1CustomerRepricingConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8991,7 +11196,7 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1CustomerRepricingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9003,28 +11208,28 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Transfers customer entitlements from their current reseller to Google. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlementsToGoogle", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.transferEntitlementsToGoogle", + // "description": "Updates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. This method overwrites the existing CustomerRepricingConfig. You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateCustomerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month. When updating a config in the future: * This config must already exist. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + // "httpMethod": "PATCH", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "name": { + // "description": "Output only. Resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:transferEntitlementsToGoogle", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudChannelV1TransferEntitlementsToGoogleRequest" + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" diff --git a/container/v1/container-api.json b/container/v1/container-api.json index ba49c934034..8603a13a1b7 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2459,7 +2459,7 @@ } } }, - "revision": "20220328", + "revision": "20220330", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3946,6 +3946,17 @@ }, "type": "object" }, + "ManagedPrometheusConfig": { + "description": "ManagedPrometheusConfig defines the configuration for Google Cloud Managed Service for Prometheus.", + "id": "ManagedPrometheusConfig", + "properties": { + "enabled": { + "description": "Enable Managed Collection.", + "type": "boolean" + } + }, + "type": "object" + }, "MasterAuth": { "description": "The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates.", "id": "MasterAuth", @@ -4072,6 +4083,10 @@ "componentConfig": { "$ref": "MonitoringComponentConfig", "description": "Monitoring components configuration" + }, + "managedPrometheusConfig": { + "$ref": "ManagedPrometheusConfig", + "description": "Enable Google Cloud Managed Service for Prometheus in the cluster." } }, "type": "object" @@ -4141,6 +4156,25 @@ }, "type": "object" }, + "NetworkPerformanceConfig": { + "description": "Configuration of all network bandwidth tiers", + "id": "NetworkPerformanceConfig", + "properties": { + "totalEgressBandwidthTier": { + "description": "Specifies the total network bandwidth tier for the NodePool.", + "enum": [ + "TIER_UNSPECIFIED", + "TIER_1" + ], + "enumDescriptions": [ + "Default value", + "Higher bandwidth, actual values based on VM size." + ], + "type": "string" + } + }, + "type": "object" + }, "NetworkPolicy": { "description": "Configuration options for the NetworkPolicy feature. https://kubernetes.io/docs/concepts/services-networking/networkpolicies/", "id": "NetworkPolicy", @@ -4396,6 +4430,10 @@ "description": "Input only. Whether to create a new range for pod IPs in this node pool. Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they are not specified. If neither `create_pod_range` or `pod_range` are specified, the cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is used. Only applicable if `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed after the node pool has been created.", "type": "boolean" }, + "networkPerformanceConfig": { + "$ref": "NetworkPerformanceConfig", + "description": "Network bandwidth tier configuration." + }, "podIpv4CidrBlock": { "description": "The IP address range for pod IPs in this node pool. Only applicable if `create_pod_range` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) to pick a specific range to use. Only applicable if `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed after the node pool has been created.", "type": "string" diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index f879fbdf8c6..bf7f2fd2e65 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -2869,6 +2869,35 @@ func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ManagedPrometheusConfig: ManagedPrometheusConfig defines the +// configuration for Google Cloud Managed Service for Prometheus. +type ManagedPrometheusConfig struct { + // Enabled: Enable Managed Collection. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ManagedPrometheusConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedPrometheusConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MasterAuth: The authentication information for accessing the master // endpoint. Authentication can be done using HTTP basic auth or using // client certificates. @@ -3126,6 +3155,10 @@ type MonitoringConfig struct { // ComponentConfig: Monitoring components configuration ComponentConfig *MonitoringComponentConfig `json:"componentConfig,omitempty"` + // ManagedPrometheusConfig: Enable Google Cloud Managed Service for + // Prometheus in the cluster. + ManagedPrometheusConfig *ManagedPrometheusConfig `json:"managedPrometheusConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComponentConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3240,6 +3273,42 @@ func (s *NetworkConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkPerformanceConfig: Configuration of all network bandwidth +// tiers +type NetworkPerformanceConfig struct { + // TotalEgressBandwidthTier: Specifies the total network bandwidth tier + // for the NodePool. + // + // Possible values: + // "TIER_UNSPECIFIED" - Default value + // "TIER_1" - Higher bandwidth, actual values based on VM size. + TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "TotalEgressBandwidthTier") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TotalEgressBandwidthTier") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkPerformanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NetworkPolicy: Configuration options for the NetworkPolicy feature. // https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ type NetworkPolicy struct { @@ -3682,6 +3751,9 @@ type NodeNetworkConfig struct { // This field cannot be changed after the node pool has been created. CreatePodRange bool `json:"createPodRange,omitempty"` + // NetworkPerformanceConfig: Network bandwidth tier configuration. + NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` + // PodIpv4CidrBlock: The IP address range for pod IPs in this node pool. // Only applicable if `create_pod_range` is true. Set to blank to have a // range chosen with the default size. Set to /netmask (e.g. `/14`) to diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 4a4beeb43fd..929685af547 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20220409", + "revision": "20220421", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1038,6 +1038,28 @@ "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", "description": "The basic metadata of the long running operation." + }, + "individualBatchDeleteStatuses": { + "description": "The list of response details of each document.", + "items": { + "$ref": "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus": { + "description": "The status of each individual document in the batch delete process.", + "id": "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus", + "properties": { + "documentId": { + "$ref": "GoogleCloudDocumentaiUiv1beta3DocumentId", + "description": "The document id of the document." + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The status of deleting the document." } }, "type": "object" diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 572d93a6729..9634ebb10cc 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -282,6 +282,10 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + // IndividualBatchDeleteStatuses: The list of response details of each + // document. + IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -306,6 +310,39 @@ func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBa +// tchDeleteStatus: The status of each individual document in the batch +// delete process. +type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus struct { + // DocumentId: The document id of the document. + DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` + + // Status: The status of deleting the document. + Status *GoogleRpcStatus `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DocumentId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DocumentId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse: Response // of the delete documents operation. type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse struct { diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 9f8cbf6ae01..d7a4e386da2 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220409", + "revision": "20220421", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -301,6 +301,28 @@ "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", "description": "The basic metadata of the long running operation." + }, + "individualBatchDeleteStatuses": { + "description": "The list of response details of each document.", + "items": { + "$ref": "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus": { + "description": "The status of each individual document in the batch delete process.", + "id": "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus", + "properties": { + "documentId": { + "$ref": "GoogleCloudDocumentaiUiv1beta3DocumentId", + "description": "The document id of the document." + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The status of deleting the document." } }, "type": "object" diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 3840e04f285..cc683f619b3 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -210,6 +210,10 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + // IndividualBatchDeleteStatuses: The list of response details of each + // document. + IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -234,6 +238,39 @@ func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBa +// tchDeleteStatus: The status of each individual document in the batch +// delete process. +type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus struct { + // DocumentId: The document id of the document. + DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` + + // Status: The status of deleting the document. + Status *GoogleRpcStatus `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DocumentId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DocumentId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse: Response // of the delete documents operation. type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse struct { diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 84f0b85611a..a58891f9f25 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -796,7 +796,7 @@ } } }, - "revision": "20220409", + "revision": "20220421", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -805,6 +805,28 @@ "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", "description": "The basic metadata of the long running operation." + }, + "individualBatchDeleteStatuses": { + "description": "The list of response details of each document.", + "items": { + "$ref": "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus": { + "description": "The status of each individual document in the batch delete process.", + "id": "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus", + "properties": { + "documentId": { + "$ref": "GoogleCloudDocumentaiUiv1beta3DocumentId", + "description": "The document id of the document." + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The status of deleting the document." } }, "type": "object" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 5fd13ed2835..b39d6032c07 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -210,6 +210,10 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + // IndividualBatchDeleteStatuses: The list of response details of each + // document. + IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -234,6 +238,39 @@ func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBa +// tchDeleteStatus: The status of each individual document in the batch +// delete process. +type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus struct { + // DocumentId: The document id of the document. + DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` + + // Status: The status of deleting the document. + Status *GoogleRpcStatus `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DocumentId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DocumentId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse: Response // of the delete documents operation. type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse struct { diff --git a/doubleclicksearch/v2/doubleclicksearch-api.json b/doubleclicksearch/v2/doubleclicksearch-api.json index 6727a95e63a..2141cd15fdd 100644 --- a/doubleclicksearch/v2/doubleclicksearch-api.json +++ b/doubleclicksearch/v2/doubleclicksearch-api.json @@ -341,6 +341,41 @@ "supportsMediaDownload": true, "useMediaDownloadService": true }, + "getIdMappingFile": { + "description": "Downloads a csv file(encoded in UTF-8) that contains ID mappings between legacy SA360 and new SA360. The file includes all children entities of the given advertiser(e.g. engine accounts, campaigns, ad groups, etc.) that exist in both legacy SA360 and new SA360.", + "flatPath": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/idmapping", + "httpMethod": "GET", + "id": "doubleclicksearch.reports.getIdMappingFile", + "parameterOrder": [ + "agencyId", + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Legacy SA360 advertiser ID.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "agencyId": { + "description": "Legacy SA360 agency ID.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/idmapping", + "response": { + "$ref": "IdMappingFile" + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclicksearch" + ], + "supportsMediaDownload": true, + "useMediaDownloadService": true + }, "request": { "description": "Inserts a report request into the reporting system.", "flatPath": "doubleclicksearch/v2/reports", @@ -399,7 +434,7 @@ } } }, - "revision": "20200825", + "revision": "20220420", "rootUrl": "https://doubleclicksearch.googleapis.com/", "schemas": { "Availability": { @@ -680,6 +715,12 @@ }, "type": "object" }, + "IdMappingFile": { + "description": "File returned to https://developers.google.com/search-ads/v2/reference/reports/getIdMappingFile.", + "id": "IdMappingFile", + "properties": {}, + "type": "object" + }, "Report": { "description": "A DoubleClick Search report. This object contains the report request, some report metadata such as currency code, and the generated report rows or report files.", "id": "Report", diff --git a/doubleclicksearch/v2/doubleclicksearch-gen.go b/doubleclicksearch/v2/doubleclicksearch-gen.go index 5c8bc425348..4b068d7e1b7 100644 --- a/doubleclicksearch/v2/doubleclicksearch-gen.go +++ b/doubleclicksearch/v2/doubleclicksearch-gen.go @@ -485,6 +485,14 @@ func (s *CustomMetric) UnmarshalJSON(data []byte) error { return nil } +// IdMappingFile: File returned to +// https://developers.google.com/search-ads/v2/reference/reports/getIdMappingFile. +type IdMappingFile struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // Report: A DoubleClick Search report. This object contains the report // request, some report metadata such as currency code, and the // generated report rows or report files. @@ -2130,6 +2138,186 @@ func (c *ReportsGetFileCall) Do(opts ...googleapi.CallOption) error { } +// method id "doubleclicksearch.reports.getIdMappingFile": + +type ReportsGetIdMappingFileCall struct { + s *Service + agencyId int64 + advertiserId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIdMappingFile: Downloads a csv file(encoded in UTF-8) that +// contains ID mappings between legacy SA360 and new SA360. The file +// includes all children entities of the given advertiser(e.g. engine +// accounts, campaigns, ad groups, etc.) that exist in both legacy SA360 +// and new SA360. +// +// - advertiserId: Legacy SA360 advertiser ID. +// - agencyId: Legacy SA360 agency ID. +func (r *ReportsService) GetIdMappingFile(agencyId int64, advertiserId int64) *ReportsGetIdMappingFileCall { + c := &ReportsGetIdMappingFileCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.agencyId = agencyId + c.advertiserId = advertiserId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReportsGetIdMappingFileCall) Fields(s ...googleapi.Field) *ReportsGetIdMappingFileCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReportsGetIdMappingFileCall) IfNoneMatch(entityTag string) *ReportsGetIdMappingFileCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do and Download +// methods. Any pending HTTP request will be aborted if the provided +// context is canceled. +func (c *ReportsGetIdMappingFileCall) Context(ctx context.Context) *ReportsGetIdMappingFileCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReportsGetIdMappingFileCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReportsGetIdMappingFileCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/idmapping") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "agencyId": strconv.FormatInt(c.agencyId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Download fetches the API endpoint's "media" value, instead of the normal +// API response value. If the returned error is nil, the Response is guaranteed to +// have a 2xx status code. Callers must close the Response.Body as usual. +func (c *ReportsGetIdMappingFileCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("media") + if err != nil { + return nil, err + } + if err := googleapi.CheckResponse(res); err != nil { + res.Body.Close() + return nil, err + } + return res, nil +} + +// Do executes the "doubleclicksearch.reports.getIdMappingFile" call. +// Exactly one of *IdMappingFile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *IdMappingFile.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ReportsGetIdMappingFileCall) Do(opts ...googleapi.CallOption) (*IdMappingFile, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &IdMappingFile{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Downloads a csv file(encoded in UTF-8) that contains ID mappings between legacy SA360 and new SA360. The file includes all children entities of the given advertiser(e.g. engine accounts, campaigns, ad groups, etc.) that exist in both legacy SA360 and new SA360.", + // "flatPath": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/idmapping", + // "httpMethod": "GET", + // "id": "doubleclicksearch.reports.getIdMappingFile", + // "parameterOrder": [ + // "agencyId", + // "advertiserId" + // ], + // "parameters": { + // "advertiserId": { + // "description": "Legacy SA360 advertiser ID.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "agencyId": { + // "description": "Legacy SA360 agency ID.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/idmapping", + // "response": { + // "$ref": "IdMappingFile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/doubleclicksearch" + // ], + // "supportsMediaDownload": true, + // "useMediaDownloadService": true + // } + +} + // method id "doubleclicksearch.reports.request": type ReportsRequestCall struct { diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json index 23b02af155b..60ccb6940b2 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json @@ -1,4 +1,13 @@ { + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/userinfo.email": { + "description": "See your primary Google Account email address" + } + } + } + }, "basePath": "", "baseUrl": "https://prod-tt-sasportal.googleapis.com/", "batchPath": "batch", @@ -118,7 +127,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalCustomer" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Returns a list of requested customers.", @@ -142,7 +154,10 @@ "path": "v1alpha1/customers", "response": { "$ref": "SasPortalListCustomersResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing customer.", @@ -173,7 +188,10 @@ }, "response": { "$ref": "SasPortalCustomer" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -202,7 +220,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a deployment.", @@ -224,7 +245,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested deployment.", @@ -246,7 +270,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -284,7 +311,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a deployment under another node or customer.", @@ -309,7 +339,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing deployment.", @@ -340,7 +373,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -369,7 +405,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -394,7 +433,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -432,7 +474,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -463,7 +508,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -488,7 +536,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a device.", @@ -510,7 +561,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Gets details about a device.", @@ -532,7 +586,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -570,7 +627,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a device under another node or customer.", @@ -595,7 +655,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates a device.", @@ -626,7 +689,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "signDevice": { "description": "Signs a device.", @@ -651,7 +717,10 @@ }, "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "updateSigned": { "description": "Updates a signed device.", @@ -676,7 +745,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -705,7 +777,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a node.", @@ -727,7 +802,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested node.", @@ -749,7 +827,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -787,7 +868,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a node under another node or customer.", @@ -812,7 +896,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing node.", @@ -843,7 +930,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -872,7 +962,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -910,7 +1003,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -939,7 +1035,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -964,7 +1063,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -1002,7 +1104,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -1031,7 +1136,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -1069,7 +1177,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -1099,7 +1210,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1125,7 +1239,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Gets details about a device.", @@ -1147,7 +1264,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a device under another node or customer.", @@ -1172,7 +1292,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates a device.", @@ -1203,7 +1326,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "signDevice": { "description": "Signs a device.", @@ -1228,7 +1354,10 @@ }, "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "updateSigned": { "description": "Updates a signed device.", @@ -1253,7 +1382,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -1274,7 +1406,10 @@ }, "response": { "$ref": "SasPortalGenerateSecretResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "validate": { "description": "Validates the identity of a Certified Professional Installer (CPI).", @@ -1289,7 +1424,10 @@ }, "response": { "$ref": "SasPortalValidateInstallerResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -1315,7 +1453,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1341,7 +1482,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested deployment.", @@ -1363,7 +1507,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -1401,7 +1548,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a deployment under another node or customer.", @@ -1426,7 +1576,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing deployment.", @@ -1457,7 +1610,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1486,7 +1642,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -1511,7 +1670,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -1549,7 +1711,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -1580,7 +1745,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -1605,7 +1773,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a device.", @@ -1627,7 +1798,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Gets details about a device.", @@ -1649,7 +1823,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -1687,7 +1864,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a device under another node or customer.", @@ -1712,7 +1892,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates a device.", @@ -1743,7 +1926,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "signDevice": { "description": "Signs a device.", @@ -1768,7 +1954,10 @@ }, "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "updateSigned": { "description": "Updates a signed device.", @@ -1793,7 +1982,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -1822,7 +2014,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a node.", @@ -1844,7 +2039,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested node.", @@ -1866,7 +2064,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -1904,7 +2105,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a node under another node or customer.", @@ -1929,7 +2133,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing node.", @@ -1960,7 +2167,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1989,7 +2199,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -2027,7 +2240,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -2056,7 +2272,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -2081,7 +2300,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -2119,7 +2341,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -2148,7 +2373,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -2186,7 +2414,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -2209,7 +2440,10 @@ }, "response": { "$ref": "SasPortalPolicy" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "set": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", @@ -2224,7 +2458,10 @@ }, "response": { "$ref": "SasPortalPolicy" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "test": { "description": "Returns permissions that a caller has on the specified resource.", @@ -2239,12 +2476,15 @@ }, "response": { "$ref": "SasPortalTestPermissionsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } }, - "revision": "20220415", + "revision": "20220425", "rootUrl": "https://prod-tt-sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go index 3c5a6e42287..3c628164280 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go @@ -78,8 +78,19 @@ const apiVersion = "v1alpha1" const basePath = "https://prod-tt-sasportal.googleapis.com/" const mtlsBasePath = "https://prod-tt-sasportal.mtls.googleapis.com/" +// OAuth2 scopes used by this API. +const ( + // See your primary Google Account email address + UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" +) + // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/userinfo.email", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) client, endpoint, err := htransport.NewClient(ctx, opts...) @@ -2050,7 +2061,10 @@ func (c *CustomersGetCall) Do(opts ...googleapi.CallOption) (*SasPortalCustomer, // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalCustomer" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2203,7 +2217,10 @@ func (c *CustomersListCall) Do(opts ...googleapi.CallOption) (*SasPortalListCust // "path": "v1alpha1/customers", // "response": { // "$ref": "SasPortalListCustomersResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2376,7 +2393,10 @@ func (c *CustomersPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalCustome // }, // "response": { // "$ref": "SasPortalCustomer" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2516,7 +2536,10 @@ func (c *CustomersDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*SasP // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2645,7 +2668,10 @@ func (c *CustomersDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*SasP // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2788,7 +2814,10 @@ func (c *CustomersDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPort // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2972,7 +3001,10 @@ func (c *CustomersDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPor // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3132,7 +3164,10 @@ func (c *CustomersDeploymentsMoveCall) Do(opts ...googleapi.CallOption) (*SasPor // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3284,7 +3319,10 @@ func (c *CustomersDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*SasPo // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3423,7 +3461,10 @@ func (c *CustomersDeploymentsDevicesCreateCall) Do(opts ...googleapi.CallOption) // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3562,7 +3603,10 @@ func (c *CustomersDeploymentsDevicesCreateSignedCall) Do(opts ...googleapi.CallO // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3746,7 +3790,10 @@ func (c *CustomersDeploymentsDevicesListCall) Do(opts ...googleapi.CallOption) ( // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3906,7 +3953,10 @@ func (c *CustomersDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPorta // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4045,7 +4095,10 @@ func (c *CustomersDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*Sa // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4174,7 +4227,10 @@ func (c *CustomersDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPorta // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4317,7 +4373,10 @@ func (c *CustomersDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDe // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4501,7 +4560,10 @@ func (c *CustomersDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalL // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4661,7 +4723,10 @@ func (c *CustomersDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalO // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4813,7 +4878,10 @@ func (c *CustomersDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortal // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4952,7 +5020,10 @@ func (c *CustomersDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*SasP // }, // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5091,7 +5162,10 @@ func (c *CustomersDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (*Sa // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5230,7 +5304,10 @@ func (c *CustomersNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalN // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5359,7 +5436,10 @@ func (c *CustomersNodesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalE // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5502,7 +5582,10 @@ func (c *CustomersNodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5685,7 +5768,10 @@ func (c *CustomersNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalLis // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5845,7 +5931,10 @@ func (c *CustomersNodesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOpe // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5997,7 +6086,10 @@ func (c *CustomersNodesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalNo // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6137,7 +6229,10 @@ func (c *CustomersNodesDeploymentsCreateCall) Do(opts ...googleapi.CallOption) ( // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6321,7 +6416,10 @@ func (c *CustomersNodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*S // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6481,7 +6579,10 @@ func (c *CustomersNodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*Sas // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6620,7 +6721,10 @@ func (c *CustomersNodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6804,7 +6908,10 @@ func (c *CustomersNodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPo // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6964,7 +7071,10 @@ func (c *CustomersNodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPo // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7147,7 +7257,10 @@ func (c *CustomersNodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPort // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7311,7 +7424,10 @@ func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDeploym // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7440,7 +7556,10 @@ func (c *DeploymentsDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPor // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7583,7 +7702,10 @@ func (c *DeploymentsDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortal // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7722,7 +7844,10 @@ func (c *DeploymentsDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPorta // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7874,7 +7999,10 @@ func (c *DeploymentsDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPort // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8013,7 +8141,10 @@ func (c *DeploymentsDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*Sa // }, // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8152,7 +8283,10 @@ func (c *DeploymentsDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (* // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8275,7 +8409,10 @@ func (c *InstallerGenerateSecretCall) Do(opts ...googleapi.CallOption) (*SasPort // }, // "response": { // "$ref": "SasPortalGenerateSecretResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8399,7 +8536,10 @@ func (c *InstallerValidateCall) Do(opts ...googleapi.CallOption) (*SasPortalVali // }, // "response": { // "$ref": "SasPortalValidateInstallerResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8542,7 +8682,10 @@ func (c *NodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8671,7 +8814,10 @@ func (c *NodesDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*SasPorta // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8814,7 +8960,10 @@ func (c *NodesDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDe // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8998,7 +9147,10 @@ func (c *NodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPortalL // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9158,7 +9310,10 @@ func (c *NodesDeploymentsMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalO // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9310,7 +9465,10 @@ func (c *NodesDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*SasPortal // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9449,7 +9607,10 @@ func (c *NodesDeploymentsDevicesCreateCall) Do(opts ...googleapi.CallOption) (*S // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9588,7 +9749,10 @@ func (c *NodesDeploymentsDevicesCreateSignedCall) Do(opts ...googleapi.CallOptio // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9772,7 +9936,10 @@ func (c *NodesDeploymentsDevicesListCall) Do(opts ...googleapi.CallOption) (*Sas // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9932,7 +10099,10 @@ func (c *NodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDev // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10071,7 +10241,10 @@ func (c *NodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPor // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10200,7 +10373,10 @@ func (c *NodesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmp // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10343,7 +10519,10 @@ func (c *NodesDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10527,7 +10706,10 @@ func (c *NodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListD // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10687,7 +10869,10 @@ func (c *NodesDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOpera // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10839,7 +11024,10 @@ func (c *NodesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalDevi // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10978,7 +11166,10 @@ func (c *NodesDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*SasPorta // }, // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11117,7 +11308,10 @@ func (c *NodesDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (*SasPor // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11256,7 +11450,10 @@ func (c *NodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11385,7 +11582,10 @@ func (c *NodesNodesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11528,7 +11728,10 @@ func (c *NodesNodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, er // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11711,7 +11914,10 @@ func (c *NodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListNod // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11871,7 +12077,10 @@ func (c *NodesNodesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperati // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12023,7 +12232,10 @@ func (c *NodesNodesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12163,7 +12375,10 @@ func (c *NodesNodesDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Sas // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12347,7 +12562,10 @@ func (c *NodesNodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPo // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12507,7 +12725,10 @@ func (c *NodesNodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPort // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12646,7 +12867,10 @@ func (c *NodesNodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*S // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12830,7 +13054,10 @@ func (c *NodesNodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortal // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12990,7 +13217,10 @@ func (c *NodesNodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortal // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13173,7 +13403,10 @@ func (c *NodesNodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalLi // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13317,7 +13550,10 @@ func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalPolicy, er // }, // "response": { // "$ref": "SasPortalPolicy" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13440,7 +13676,10 @@ func (c *PoliciesSetCall) Do(opts ...googleapi.CallOption) (*SasPortalPolicy, er // }, // "response": { // "$ref": "SasPortalPolicy" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13563,7 +13802,10 @@ func (c *PoliciesTestCall) Do(opts ...googleapi.CallOption) (*SasPortalTestPermi // }, // "response": { // "$ref": "SasPortalTestPermissionsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } diff --git a/sasportal/v1alpha1/sasportal-api.json b/sasportal/v1alpha1/sasportal-api.json index 7ee053450e2..c9a310b6ba9 100644 --- a/sasportal/v1alpha1/sasportal-api.json +++ b/sasportal/v1alpha1/sasportal-api.json @@ -1,4 +1,13 @@ { + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/userinfo.email": { + "description": "See your primary Google Account email address" + } + } + } + }, "basePath": "", "baseUrl": "https://sasportal.googleapis.com/", "batchPath": "batch", @@ -117,7 +126,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalCustomer" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Returns a list of requested customers.", @@ -141,7 +153,10 @@ "path": "v1alpha1/customers", "response": { "$ref": "SasPortalListCustomersResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing customer.", @@ -172,7 +187,10 @@ }, "response": { "$ref": "SasPortalCustomer" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -201,7 +219,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a deployment.", @@ -223,7 +244,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested deployment.", @@ -245,7 +269,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -283,7 +310,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a deployment under another node or customer.", @@ -308,7 +338,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing deployment.", @@ -339,7 +372,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -368,7 +404,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -393,7 +432,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -431,7 +473,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -462,7 +507,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -487,7 +535,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a device.", @@ -509,7 +560,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Gets details about a device.", @@ -531,7 +585,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -569,7 +626,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a device under another node or customer.", @@ -594,7 +654,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates a device.", @@ -625,7 +688,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "signDevice": { "description": "Signs a device.", @@ -650,7 +716,10 @@ }, "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "updateSigned": { "description": "Updates a signed device.", @@ -675,7 +744,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -704,7 +776,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a node.", @@ -726,7 +801,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested node.", @@ -748,7 +826,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -786,7 +867,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a node under another node or customer.", @@ -811,7 +895,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing node.", @@ -842,7 +929,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -871,7 +961,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -909,7 +1002,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -938,7 +1034,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -963,7 +1062,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -1001,7 +1103,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -1030,7 +1135,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -1068,7 +1176,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -1098,7 +1209,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1124,7 +1238,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Gets details about a device.", @@ -1146,7 +1263,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a device under another node or customer.", @@ -1171,7 +1291,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates a device.", @@ -1202,7 +1325,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "signDevice": { "description": "Signs a device.", @@ -1227,7 +1353,10 @@ }, "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "updateSigned": { "description": "Updates a signed device.", @@ -1252,7 +1381,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -1273,7 +1405,10 @@ }, "response": { "$ref": "SasPortalGenerateSecretResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "validate": { "description": "Validates the identity of a Certified Professional Installer (CPI).", @@ -1288,7 +1423,10 @@ }, "response": { "$ref": "SasPortalValidateInstallerResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -1314,7 +1452,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1340,7 +1481,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested deployment.", @@ -1362,7 +1506,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -1400,7 +1547,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a deployment under another node or customer.", @@ -1425,7 +1575,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing deployment.", @@ -1456,7 +1609,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1485,7 +1641,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -1510,7 +1669,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -1548,7 +1710,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -1579,7 +1744,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -1604,7 +1772,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a device.", @@ -1626,7 +1797,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Gets details about a device.", @@ -1648,7 +1822,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -1686,7 +1863,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a device under another node or customer.", @@ -1711,7 +1891,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates a device.", @@ -1742,7 +1925,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "signDevice": { "description": "Signs a device.", @@ -1767,7 +1953,10 @@ }, "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "updateSigned": { "description": "Updates a signed device.", @@ -1792,7 +1981,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -1821,7 +2013,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "delete": { "description": "Deletes a node.", @@ -1843,7 +2038,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalEmpty" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "get": { "description": "Returns a requested node.", @@ -1865,7 +2063,10 @@ "path": "v1alpha1/{+name}", "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -1903,7 +2104,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "move": { "description": "Moves a node under another node or customer.", @@ -1928,7 +2132,10 @@ }, "response": { "$ref": "SasPortalOperation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "patch": { "description": "Updates an existing node.", @@ -1959,7 +2166,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1988,7 +2198,10 @@ }, "response": { "$ref": "SasPortalDeployment" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists deployments.", @@ -2026,7 +2239,10 @@ "path": "v1alpha1/{+parent}/deployments", "response": { "$ref": "SasPortalListDeploymentsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -2055,7 +2271,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "createSigned": { "description": "Creates a signed device under a node or customer.", @@ -2080,7 +2299,10 @@ }, "response": { "$ref": "SasPortalDevice" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists devices under a node or customer.", @@ -2118,7 +2340,10 @@ "path": "v1alpha1/{+parent}/devices", "response": { "$ref": "SasPortalListDevicesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } }, @@ -2147,7 +2372,10 @@ }, "response": { "$ref": "SasPortalNode" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "list": { "description": "Lists nodes.", @@ -2185,7 +2413,10 @@ "path": "v1alpha1/{+parent}/nodes", "response": { "$ref": "SasPortalListNodesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } @@ -2208,7 +2439,10 @@ }, "response": { "$ref": "SasPortalPolicy" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "set": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", @@ -2223,7 +2457,10 @@ }, "response": { "$ref": "SasPortalPolicy" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] }, "test": { "description": "Returns permissions that a caller has on the specified resource.", @@ -2238,12 +2475,15 @@ }, "response": { "$ref": "SasPortalTestPermissionsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/userinfo.email" + ] } } } }, - "revision": "20220419", + "revision": "20220425", "rootUrl": "https://sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { diff --git a/sasportal/v1alpha1/sasportal-gen.go b/sasportal/v1alpha1/sasportal-gen.go index ff2772722d5..a5e64ce8013 100644 --- a/sasportal/v1alpha1/sasportal-gen.go +++ b/sasportal/v1alpha1/sasportal-gen.go @@ -78,8 +78,19 @@ const apiVersion = "v1alpha1" const basePath = "https://sasportal.googleapis.com/" const mtlsBasePath = "https://sasportal.mtls.googleapis.com/" +// OAuth2 scopes used by this API. +const ( + // See your primary Google Account email address + UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" +) + // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/userinfo.email", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) client, endpoint, err := htransport.NewClient(ctx, opts...) @@ -2050,7 +2061,10 @@ func (c *CustomersGetCall) Do(opts ...googleapi.CallOption) (*SasPortalCustomer, // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalCustomer" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2203,7 +2217,10 @@ func (c *CustomersListCall) Do(opts ...googleapi.CallOption) (*SasPortalListCust // "path": "v1alpha1/customers", // "response": { // "$ref": "SasPortalListCustomersResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2376,7 +2393,10 @@ func (c *CustomersPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalCustome // }, // "response": { // "$ref": "SasPortalCustomer" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2516,7 +2536,10 @@ func (c *CustomersDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*SasP // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2645,7 +2668,10 @@ func (c *CustomersDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*SasP // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2788,7 +2814,10 @@ func (c *CustomersDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPort // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -2972,7 +3001,10 @@ func (c *CustomersDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPor // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3132,7 +3164,10 @@ func (c *CustomersDeploymentsMoveCall) Do(opts ...googleapi.CallOption) (*SasPor // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3284,7 +3319,10 @@ func (c *CustomersDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*SasPo // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3423,7 +3461,10 @@ func (c *CustomersDeploymentsDevicesCreateCall) Do(opts ...googleapi.CallOption) // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3562,7 +3603,10 @@ func (c *CustomersDeploymentsDevicesCreateSignedCall) Do(opts ...googleapi.CallO // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3746,7 +3790,10 @@ func (c *CustomersDeploymentsDevicesListCall) Do(opts ...googleapi.CallOption) ( // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -3906,7 +3953,10 @@ func (c *CustomersDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPorta // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4045,7 +4095,10 @@ func (c *CustomersDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*Sa // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4174,7 +4227,10 @@ func (c *CustomersDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPorta // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4317,7 +4373,10 @@ func (c *CustomersDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDe // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4501,7 +4560,10 @@ func (c *CustomersDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalL // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4661,7 +4723,10 @@ func (c *CustomersDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalO // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4813,7 +4878,10 @@ func (c *CustomersDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortal // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -4952,7 +5020,10 @@ func (c *CustomersDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*SasP // }, // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5091,7 +5162,10 @@ func (c *CustomersDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (*Sa // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5230,7 +5304,10 @@ func (c *CustomersNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalN // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5359,7 +5436,10 @@ func (c *CustomersNodesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalE // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5502,7 +5582,10 @@ func (c *CustomersNodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5685,7 +5768,10 @@ func (c *CustomersNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalLis // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5845,7 +5931,10 @@ func (c *CustomersNodesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOpe // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -5997,7 +6086,10 @@ func (c *CustomersNodesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalNo // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6137,7 +6229,10 @@ func (c *CustomersNodesDeploymentsCreateCall) Do(opts ...googleapi.CallOption) ( // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6321,7 +6416,10 @@ func (c *CustomersNodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*S // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6481,7 +6579,10 @@ func (c *CustomersNodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*Sas // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6620,7 +6721,10 @@ func (c *CustomersNodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6804,7 +6908,10 @@ func (c *CustomersNodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPo // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -6964,7 +7071,10 @@ func (c *CustomersNodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPo // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7147,7 +7257,10 @@ func (c *CustomersNodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPort // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7311,7 +7424,10 @@ func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDeploym // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7440,7 +7556,10 @@ func (c *DeploymentsDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPor // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7583,7 +7702,10 @@ func (c *DeploymentsDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortal // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7722,7 +7844,10 @@ func (c *DeploymentsDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPorta // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -7874,7 +7999,10 @@ func (c *DeploymentsDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPort // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8013,7 +8141,10 @@ func (c *DeploymentsDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*Sa // }, // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8152,7 +8283,10 @@ func (c *DeploymentsDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (* // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8275,7 +8409,10 @@ func (c *InstallerGenerateSecretCall) Do(opts ...googleapi.CallOption) (*SasPort // }, // "response": { // "$ref": "SasPortalGenerateSecretResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8399,7 +8536,10 @@ func (c *InstallerValidateCall) Do(opts ...googleapi.CallOption) (*SasPortalVali // }, // "response": { // "$ref": "SasPortalValidateInstallerResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8542,7 +8682,10 @@ func (c *NodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8671,7 +8814,10 @@ func (c *NodesDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*SasPorta // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8814,7 +8960,10 @@ func (c *NodesDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDe // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -8998,7 +9147,10 @@ func (c *NodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPortalL // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9158,7 +9310,10 @@ func (c *NodesDeploymentsMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalO // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9310,7 +9465,10 @@ func (c *NodesDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*SasPortal // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9449,7 +9607,10 @@ func (c *NodesDeploymentsDevicesCreateCall) Do(opts ...googleapi.CallOption) (*S // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9588,7 +9749,10 @@ func (c *NodesDeploymentsDevicesCreateSignedCall) Do(opts ...googleapi.CallOptio // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9772,7 +9936,10 @@ func (c *NodesDeploymentsDevicesListCall) Do(opts ...googleapi.CallOption) (*Sas // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -9932,7 +10099,10 @@ func (c *NodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDev // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10071,7 +10241,10 @@ func (c *NodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPor // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10200,7 +10373,10 @@ func (c *NodesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmp // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10343,7 +10519,10 @@ func (c *NodesDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10527,7 +10706,10 @@ func (c *NodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListD // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10687,7 +10869,10 @@ func (c *NodesDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOpera // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10839,7 +11024,10 @@ func (c *NodesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalDevi // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -10978,7 +11166,10 @@ func (c *NodesDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*SasPorta // }, // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11117,7 +11308,10 @@ func (c *NodesDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (*SasPor // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11256,7 +11450,10 @@ func (c *NodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11385,7 +11582,10 @@ func (c *NodesNodesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalEmpty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11528,7 +11728,10 @@ func (c *NodesNodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, er // "path": "v1alpha1/{+name}", // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11711,7 +11914,10 @@ func (c *NodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListNod // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -11871,7 +12077,10 @@ func (c *NodesNodesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperati // }, // "response": { // "$ref": "SasPortalOperation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12023,7 +12232,10 @@ func (c *NodesNodesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12163,7 +12375,10 @@ func (c *NodesNodesDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Sas // }, // "response": { // "$ref": "SasPortalDeployment" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12347,7 +12562,10 @@ func (c *NodesNodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPo // "path": "v1alpha1/{+parent}/deployments", // "response": { // "$ref": "SasPortalListDeploymentsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12507,7 +12725,10 @@ func (c *NodesNodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPort // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12646,7 +12867,10 @@ func (c *NodesNodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*S // }, // "response": { // "$ref": "SasPortalDevice" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12830,7 +13054,10 @@ func (c *NodesNodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortal // "path": "v1alpha1/{+parent}/devices", // "response": { // "$ref": "SasPortalListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -12990,7 +13217,10 @@ func (c *NodesNodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortal // }, // "response": { // "$ref": "SasPortalNode" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13173,7 +13403,10 @@ func (c *NodesNodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalLi // "path": "v1alpha1/{+parent}/nodes", // "response": { // "$ref": "SasPortalListNodesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13317,7 +13550,10 @@ func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalPolicy, er // }, // "response": { // "$ref": "SasPortalPolicy" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13440,7 +13676,10 @@ func (c *PoliciesSetCall) Do(opts ...googleapi.CallOption) (*SasPortalPolicy, er // }, // "response": { // "$ref": "SasPortalPolicy" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } } @@ -13563,7 +13802,10 @@ func (c *PoliciesTestCall) Do(opts ...googleapi.CallOption) (*SasPortalTestPermi // }, // "response": { // "$ref": "SasPortalTestPermissionsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/userinfo.email" + // ] // } }