diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index bcacd7d7da3..d050d4c1e26 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -4671,7 +4671,7 @@ } } }, - "revision": "20251021", + "revision": "20251107", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -5459,7 +5459,7 @@ "type": "array" }, "bluetoothAdapterInfo": { - "description": "Output only. Information about bluetooth adapters of the device.", + "description": "Output only. Information about Bluetooth adapters of the device.", "items": { "$ref": "BluetoothAdapterInfo" }, diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 3ed83f32795..d38a7af3430 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -1570,7 +1570,7 @@ type ChromeOsDevice struct { AutoUpdateThrough string `json:"autoUpdateThrough,omitempty"` // BacklightInfo: Output only. Contains backlight information for the device. BacklightInfo []*BacklightInfo `json:"backlightInfo,omitempty"` - // BluetoothAdapterInfo: Output only. Information about bluetooth adapters of + // BluetoothAdapterInfo: Output only. Information about Bluetooth adapters of // the device. BluetoothAdapterInfo []*BluetoothAdapterInfo `json:"bluetoothAdapterInfo,omitempty"` // BootMode: The boot mode for the device. The possible values are: * diff --git a/admin/reports/v1/admin-api.json b/admin/reports/v1/admin-api.json index d42f796c07e..9cd2b3d0b14 100644 --- a/admin/reports/v1/admin-api.json +++ b/admin/reports/v1/admin-api.json @@ -3,10 +3,10 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/admin.reports.audit.readonly": { - "description": "View audit reports for your G Suite domain" + "description": "View audit reports for your Google Workspace domain" }, "https://www.googleapis.com/auth/admin.reports.usage.readonly": { - "description": "View usage reports for your G Suite domain" + "description": "View usage reports for your Google Workspace domain" } } } @@ -635,7 +635,7 @@ } } }, - "revision": "20250818", + "revision": "20251107", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Activities": { diff --git a/admin/reports/v1/admin-gen.go b/admin/reports/v1/admin-gen.go index 5a69cbbb1b3..cac12f71fc3 100644 --- a/admin/reports/v1/admin-gen.go +++ b/admin/reports/v1/admin-gen.go @@ -103,10 +103,10 @@ const mtlsBasePath = "https://admin.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( - // View audit reports for your G Suite domain + // View audit reports for your Google Workspace domain AdminReportsAuditReadonlyScope = "https://www.googleapis.com/auth/admin.reports.audit.readonly" - // View usage reports for your G Suite domain + // View usage reports for your Google Workspace domain AdminReportsUsageReadonlyScope = "https://www.googleapis.com/auth/admin.reports.usage.readonly" ) diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 0a55e4c5634..b8c70d48f13 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -10333,6 +10333,48 @@ } } }, + "google": { + "resources": { + "science": { + "methods": { + "inference": { + "description": "Forwards arbitrary HTTP requests for both streaming and non-streaming cases. To use this method, invoke_route_prefix must be set to allow the paths that will be specified in the request.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/google/science/inference", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.google.science.inference", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "deployedModelId": { + "description": "ID of the DeployedModel that serves the invoke request.", + "location": "query", + "type": "string" + }, + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/google$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}/science/inference", + "request": { + "$ref": "GoogleApiHttpBody" + }, + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + } + } + }, "invoke": { "methods": { "invoke": { @@ -28693,7 +28735,7 @@ } } }, - "revision": "20251101", + "revision": "20251114", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -29747,7 +29789,7 @@ "id": "GoogleCloudAiplatformV1AutoscalingMetricSpec", "properties": { "metricName": { - "description": "Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `aiplatform.googleapis.com/prediction/online/request_count`", + "description": "Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `aiplatform.googleapis.com/prediction/online/request_count` * `pubsub.googleapis.com/subscription/num_undelivered_messages`", "type": "string" }, "target": { @@ -34483,7 +34525,7 @@ }, "response": { "$ref": "GoogleCloudAiplatformV1EvaluationInstanceInstanceData", - "description": "Required. Data used to populate placeholder `response` in a metric prompt template." + "description": "Optional. Data used to populate placeholder `response` in a metric prompt template." }, "rubricGroups": { "additionalProperties": { @@ -51703,6 +51745,43 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData": { + "description": "Defines data for an application builder.", + "id": "GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData", + "properties": { + "codeRepositoryState": { + "description": "Serialized state of the code repository. This string will typically contain a JSON representation of the UI's CodeRepositoryService state (files, folders, content, and any metadata). The UI is responsible for serialization and deserialization.", + "type": "string" + }, + "linkedResources": { + "description": "Linked resources attached to the application by the user.", + "items": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource": { + "description": "A linked resource attached to the application by the user.", + "id": "GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource", + "properties": { + "displayName": { + "description": "A user-friendly name for the data source shown in the UI.", + "type": "string" + }, + "name": { + "description": "The unique resource name of the data source. The format is determined by the 'type' field. For type \"SAVED_PROMPT\": projects/{project}/locations/{location}/datasets/{dataset} For type \"AI_AGENT\": projects/{project}/locations/{location}/agents/{agent}", + "type": "string" + }, + "type": { + "description": "The type of the linked resource. e.g., \"SAVED_PROMPT\", \"AI_AGENT\" This string corresponds to the name of the LinkedResourceType enum member. See: google3/cloud/console/web/ai/platform/llm/prompts/build/services/specs_repository_service/linked_resources/linked_resource.ts", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt": { "description": "Prompt variation that embeds preambles to prompt string.", "id": "GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt", @@ -51805,6 +51884,10 @@ "description": "Prompt variation that stores preambles in separate fields.", "id": "GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt", "properties": { + "appBuilderData": { + "$ref": "GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData", + "description": "Data for app builder use case." + }, "context": { "$ref": "GoogleCloudAiplatformV1Content", "description": "Preamble: The context of the prompt." diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index 9e28270a978..9fb4f08e460 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -1368,6 +1368,7 @@ func NewProjectsLocationsEndpointsService(s *Service) *ProjectsLocationsEndpoint rs := &ProjectsLocationsEndpointsService{s: s} rs.Chat = NewProjectsLocationsEndpointsChatService(s) rs.DeployedModels = NewProjectsLocationsEndpointsDeployedModelsService(s) + rs.Google = NewProjectsLocationsEndpointsGoogleService(s) rs.Invoke = NewProjectsLocationsEndpointsInvokeService(s) rs.Openapi = NewProjectsLocationsEndpointsOpenapiService(s) rs.Operations = NewProjectsLocationsEndpointsOperationsService(s) @@ -1381,6 +1382,8 @@ type ProjectsLocationsEndpointsService struct { DeployedModels *ProjectsLocationsEndpointsDeployedModelsService + Google *ProjectsLocationsEndpointsGoogleService + Invoke *ProjectsLocationsEndpointsInvokeService Openapi *ProjectsLocationsEndpointsOpenapiService @@ -1418,6 +1421,27 @@ type ProjectsLocationsEndpointsDeployedModelsInvokeService struct { s *Service } +func NewProjectsLocationsEndpointsGoogleService(s *Service) *ProjectsLocationsEndpointsGoogleService { + rs := &ProjectsLocationsEndpointsGoogleService{s: s} + rs.Science = NewProjectsLocationsEndpointsGoogleScienceService(s) + return rs +} + +type ProjectsLocationsEndpointsGoogleService struct { + s *Service + + Science *ProjectsLocationsEndpointsGoogleScienceService +} + +func NewProjectsLocationsEndpointsGoogleScienceService(s *Service) *ProjectsLocationsEndpointsGoogleScienceService { + rs := &ProjectsLocationsEndpointsGoogleScienceService{s: s} + return rs +} + +type ProjectsLocationsEndpointsGoogleScienceService struct { + s *Service +} + func NewProjectsLocationsEndpointsInvokeService(s *Service) *ProjectsLocationsEndpointsInvokeService { rs := &ProjectsLocationsEndpointsInvokeService{s: s} return rs @@ -4148,7 +4172,8 @@ type GoogleCloudAiplatformV1AutoscalingMetricSpec struct { // Online Prediction: * // `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * // `aiplatform.googleapis.com/prediction/online/cpu/utilization` * - // `aiplatform.googleapis.com/prediction/online/request_count` + // `aiplatform.googleapis.com/prediction/online/request_count` * + // `pubsub.googleapis.com/subscription/num_undelivered_messages` MetricName string `json:"metricName,omitempty"` // Target: The target resource utilization in percentage (1% - 100%) for the // given metric; once the real usage deviates from the target by a certain @@ -10748,7 +10773,7 @@ type GoogleCloudAiplatformV1EvaluationInstance struct { // Reference: Optional. Data used to populate placeholder `reference` in a // metric prompt template. Reference *GoogleCloudAiplatformV1EvaluationInstanceInstanceData `json:"reference,omitempty"` - // Response: Required. Data used to populate placeholder `response` in a metric + // Response: Optional. Data used to populate placeholder `response` in a metric // prompt template. Response *GoogleCloudAiplatformV1EvaluationInstanceInstanceData `json:"response,omitempty"` // RubricGroups: Optional. Named groups of rubrics associated with the prompt. @@ -35087,6 +35112,67 @@ func (s GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData: Defines data for an +// application builder. +type GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData struct { + // CodeRepositoryState: Serialized state of the code repository. This string + // will typically contain a JSON representation of the UI's + // CodeRepositoryService state (files, folders, content, and any metadata). The + // UI is responsible for serialization and deserialization. + CodeRepositoryState string `json:"codeRepositoryState,omitempty"` + // LinkedResources: Linked resources attached to the application by the user. + LinkedResources []*GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource `json:"linkedResources,omitempty"` + // ForceSendFields is a list of field names (e.g. "CodeRepositoryState") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CodeRepositoryState") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource: A +// linked resource attached to the application by the user. +type GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource struct { + // DisplayName: A user-friendly name for the data source shown in the UI. + DisplayName string `json:"displayName,omitempty"` + // Name: The unique resource name of the data source. The format is determined + // by the 'type' field. For type "SAVED_PROMPT": + // projects/{project}/locations/{location}/datasets/{dataset} For type + // "AI_AGENT": projects/{project}/locations/{location}/agents/{agent} + Name string `json:"name,omitempty"` + // Type: The type of the linked resource. e.g., "SAVED_PROMPT", "AI_AGENT" This + // string corresponds to the name of the LinkedResourceType enum member. See: + // google3/cloud/console/web/ai/platform/llm/prompts/build/services/specs_reposi + // tory_service/linked_resources/linked_resource.ts + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderDataLinkedResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt: Prompt variation // that embeds preambles to prompt string. type GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt struct { @@ -35229,6 +35315,8 @@ func (s GoogleCloudAiplatformV1SchemaPromptSpecReferenceSentencePairList) Marsha // GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt: Prompt variation // that stores preambles in separate fields. type GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt struct { + // AppBuilderData: Data for app builder use case. + AppBuilderData *GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData `json:"appBuilderData,omitempty"` // Context: Preamble: The context of the prompt. Context *GoogleCloudAiplatformV1Content `json:"context,omitempty"` // Examples: Preamble: A set of examples for expected model response. @@ -35249,15 +35337,15 @@ type GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt struct { PredictionInputs []*GoogleCloudAiplatformV1SchemaPromptSpecPartList `json:"predictionInputs,omitempty"` // PromptMessage: The prompt message. PromptMessage *GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage `json:"promptMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Context") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "AppBuilderData") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Context") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AppBuilderData") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -83208,6 +83296,120 @@ func (c *ProjectsLocationsEndpointsDeployedModelsInvokeInvokeCall) Do(opts ...go return ret, nil } +type ProjectsLocationsEndpointsGoogleScienceInferenceCall struct { + s *Service + endpoint string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Inference: Forwards arbitrary HTTP requests for both streaming and +// non-streaming cases. To use this method, invoke_route_prefix must be set to +// allow the paths that will be specified in the request. +// +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsGoogleScienceService) Inference(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsGoogleScienceInferenceCall { + c := &ProjectsLocationsEndpointsGoogleScienceInferenceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googleapihttpbody = googleapihttpbody + return c +} + +// DeployedModelId sets the optional parameter "deployedModelId": ID of the +// DeployedModel that serves the invoke request. +func (c *ProjectsLocationsEndpointsGoogleScienceInferenceCall) DeployedModelId(deployedModelId string) *ProjectsLocationsEndpointsGoogleScienceInferenceCall { + c.urlParams_.Set("deployedModelId", deployedModelId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEndpointsGoogleScienceInferenceCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGoogleScienceInferenceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEndpointsGoogleScienceInferenceCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGoogleScienceInferenceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEndpointsGoogleScienceInferenceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsGoogleScienceInferenceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleapihttpbody) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}/science/inference") + 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{ + "endpoint": c.endpoint, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "aiplatform.projects.locations.endpoints.google.science.inference", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.google.science.inference" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *ProjectsLocationsEndpointsGoogleScienceInferenceCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleApiHttpBody{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "aiplatform.projects.locations.endpoints.google.science.inference", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsEndpointsInvokeInvokeCall struct { s *Service endpoint string diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json index 6790e3c0e12..f9ecbfc6dec 100644 --- a/alertcenter/v1beta1/alertcenter-api.json +++ b/alertcenter/v1beta1/alertcenter-api.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/apps.alerts": { - "description": "See and delete your domain's G Suite alerts, and send alert feedback" + "description": "See and delete your domain's Google Workspace alerts, and send alert feedback" } } } @@ -423,7 +423,7 @@ } } }, - "revision": "20250929", + "revision": "20251117", "rootUrl": "https://alertcenter.googleapis.com/", "schemas": { "AbuseDetected": { @@ -1661,6 +1661,10 @@ "description": "Drive file ID.", "type": "string" }, + "messageId": { + "description": "RFC2822 message ID.", + "type": "string" + }, "resourceTitle": { "description": "Title of the resource, for example email subject, or document title.", "type": "string" diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go index 1cf926ee35b..2ab1ce169cd 100644 --- a/alertcenter/v1beta1/alertcenter-gen.go +++ b/alertcenter/v1beta1/alertcenter-gen.go @@ -98,7 +98,8 @@ const mtlsBasePath = "https://alertcenter.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( - // See and delete your domain's G Suite alerts, and send alert feedback + // See and delete your domain's Google Workspace alerts, and send alert + // feedback AppsAlertsScope = "https://www.googleapis.com/auth/apps.alerts" ) @@ -1689,6 +1690,8 @@ type ResourceInfo struct { DeviceId string `json:"deviceId,omitempty"` // DocumentId: Drive file ID. DocumentId string `json:"documentId,omitempty"` + // MessageId: RFC2822 message ID. + MessageId string `json:"messageId,omitempty"` // ResourceTitle: Title of the resource, for example email subject, or document // title. ResourceTitle string `json:"resourceTitle,omitempty"` diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json index d923bae26a9..8c43db6c837 100644 --- a/alloydb/v1/alloydb-api.json +++ b/alloydb/v1/alloydb-api.json @@ -15,6 +15,218 @@ "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/alloydb/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west4.rep.googleapis.com/", + "location": "us-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-north2.rep.googleapis.com/", + "location": "europe-north2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west10.rep.googleapis.com/", + "location": "europe-west10" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west12.rep.googleapis.com/", + "location": "europe-west12" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -283,6 +495,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. The view of the backup to return.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_CLUSTER_DELETED" + ], + "enumDescriptions": [ + "Value unspecified, equivalent to BASIC.", + "Responses include all fields that aren't explicitly gated behind another view.", + "Response include all the field from BASIC plus the field cluster_deleted, which specifies if the cluster corresponding to this backup is deleted." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -329,6 +556,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. The view of the backup to return.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_CLUSTER_DELETED" + ], + "enumDescriptions": [ + "Value unspecified, equivalent to BASIC.", + "Responses include all fields that aren't explicitly gated behind another view.", + "Response include all the field from BASIC plus the field cluster_deleted, which specifies if the cluster corresponding to this backup is deleted." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/backups", @@ -1627,7 +1869,7 @@ } } }, - "revision": "20251023", + "revision": "20251106", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -2188,6 +2430,20 @@ "$ref": "MaintenanceUpdatePolicy", "description": "Optional. The maintenance update policy determines when to allow or deny updates." }, + "maintenanceVersionSelectionPolicy": { + "description": "Input only. Policy to use to automatically select the maintenance version to which to update the cluster's instances.", + "enum": [ + "MAINTENANCE_VERSION_SELECTION_POLICY_UNSPECIFIED", + "MAINTENANCE_VERSION_SELECTION_POLICY_LATEST", + "MAINTENANCE_VERSION_SELECTION_POLICY_DEFAULT" + ], + "enumDescriptions": [ + "The maintenance version selection policy is not specified.", + "Use the latest available maintenance version.", + "Use the current default maintenance version." + ], + "type": "string" + }, "migrationSource": { "$ref": "MigrationSource", "description": "Output only. Cluster created via DMS migration.", @@ -2999,6 +3255,11 @@ "$ref": "MachineConfig", "description": "Configurations for the machines that host the underlying database engine." }, + "maintenanceVersionName": { + "description": "Output only. Maintenance version of the instance, for example: POSTGRES_15.2025_07_15.04_00. Output only. Update this field via the parent cluster's maintenance_version field(s).", + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", "readOnly": true, @@ -4953,7 +5214,7 @@ "type": "object" }, "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata": { - "description": "Common model for database resource instance metadata. Next ID: 29", + "description": "Common model for database resource instance metadata. Next ID: 30", "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", "properties": { "availabilityConfiguration": { @@ -5096,6 +5357,10 @@ ], "type": "string" }, + "isDeletionProtectionEnabled": { + "description": "Optional. Whether deletion protection is enabled for this resource.", + "type": "boolean" + }, "location": { "description": "The resource location. REQUIRED", "type": "string" diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go index 5e1d73e23be..a27bb10a933 100644 --- a/alloydb/v1/alloydb-gen.go +++ b/alloydb/v1/alloydb-gen.go @@ -772,6 +772,18 @@ type Cluster struct { // MaintenanceUpdatePolicy: Optional. The maintenance update policy determines // when to allow or deny updates. MaintenanceUpdatePolicy *MaintenanceUpdatePolicy `json:"maintenanceUpdatePolicy,omitempty"` + // MaintenanceVersionSelectionPolicy: Input only. Policy to use to + // automatically select the maintenance version to which to update the + // cluster's instances. + // + // Possible values: + // "MAINTENANCE_VERSION_SELECTION_POLICY_UNSPECIFIED" - The maintenance + // version selection policy is not specified. + // "MAINTENANCE_VERSION_SELECTION_POLICY_LATEST" - Use the latest available + // maintenance version. + // "MAINTENANCE_VERSION_SELECTION_POLICY_DEFAULT" - Use the current default + // maintenance version. + MaintenanceVersionSelectionPolicy string `json:"maintenanceVersionSelectionPolicy,omitempty"` // MigrationSource: Output only. Cluster created via DMS migration. MigrationSource *MigrationSource `json:"migrationSource,omitempty"` // Name: Output only. The name of the cluster resource with the format: * @@ -1746,6 +1758,10 @@ type Instance struct { // MachineConfig: Configurations for the machines that host the underlying // database engine. MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + // MaintenanceVersionName: Output only. Maintenance version of the instance, + // for example: POSTGRES_15.2025_07_15.04_00. Output only. Update this field + // via the parent cluster's maintenance_version field(s). + MaintenanceVersionName string `json:"maintenanceVersionName,omitempty"` // Name: Output only. The name of the instance resource with the format: * // projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instan // ce_id} where the cluster and instance ID segments should satisfy the regex @@ -3927,7 +3943,7 @@ func (s StorageDatabasecenterPartnerapiV1mainDatabaseResourceId) MarshalJSON() ( } // StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata: Common model -// for database resource instance metadata. Next ID: 29 +// for database resource instance metadata. Next ID: 30 type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // AvailabilityConfiguration: Availability configuration for this instance AvailabilityConfiguration *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration `json:"availabilityConfiguration,omitempty"` @@ -4000,6 +4016,9 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // primary. // "SUB_RESOURCE_TYPE_OTHER" - For rest of the other categories. InstanceType string `json:"instanceType,omitempty"` + // IsDeletionProtectionEnabled: Optional. Whether deletion protection is + // enabled for this resource. + IsDeletionProtectionEnabled bool `json:"isDeletionProtectionEnabled,omitempty"` // Location: The resource location. REQUIRED Location string `json:"location,omitempty"` // MachineConfiguration: Machine configuration for this resource. @@ -5978,6 +5997,24 @@ func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBac return c } +// View sets the optional parameter "view": The view of the backup to return. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - Value unspecified, equivalent to BASIC. +// "BACKUP_VIEW_BASIC" - Responses include all fields that aren't explicitly +// +// gated behind another view. +// +// "BACKUP_VIEW_CLUSTER_DELETED" - Response include all the field from BASIC +// +// plus the field cluster_deleted, which specifies if the cluster corresponding +// to this backup is deleted. +func (c *ProjectsLocationsBackupsGetCall) View(view string) *ProjectsLocationsBackupsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6115,6 +6152,24 @@ func (c *ProjectsLocationsBackupsListCall) PageToken(pageToken string) *Projects return c } +// View sets the optional parameter "view": The view of the backup to return. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - Value unspecified, equivalent to BASIC. +// "BACKUP_VIEW_BASIC" - Responses include all fields that aren't explicitly +// +// gated behind another view. +// +// "BACKUP_VIEW_CLUSTER_DELETED" - Response include all the field from BASIC +// +// plus the field cluster_deleted, which specifies if the cluster corresponding +// to this backup is deleted. +func (c *ProjectsLocationsBackupsListCall) View(view string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json index 5f5a1fc1495..1ee6fba9f63 100644 --- a/alloydb/v1alpha/alloydb-api.json +++ b/alloydb/v1alpha/alloydb-api.json @@ -15,6 +15,218 @@ "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/alloydb/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west4.rep.googleapis.com/", + "location": "us-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-north2.rep.googleapis.com/", + "location": "europe-north2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west10.rep.googleapis.com/", + "location": "europe-west10" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west12.rep.googleapis.com/", + "location": "europe-west12" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -283,6 +495,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. The view of the backup to return.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_CLUSTER_DELETED" + ], + "enumDescriptions": [ + "Value unspecified, equivalent to BASIC.", + "Responses include all fields that aren't explicitly gated behind another view.", + "Response include all the field from BASIC plus the field cluster_deleted, which specifies if the cluster corresponding to this backup is deleted." + ], + "location": "query", + "type": "string" } }, "path": "v1alpha/{+name}", @@ -329,6 +556,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. The view of the backup to return.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_CLUSTER_DELETED" + ], + "enumDescriptions": [ + "Value unspecified, equivalent to BASIC.", + "Responses include all fields that aren't explicitly gated behind another view.", + "Response include all the field from BASIC plus the field cluster_deleted, which specifies if the cluster corresponding to this backup is deleted." + ], + "location": "query", + "type": "string" } }, "path": "v1alpha/{+parent}/backups", @@ -1627,7 +1869,7 @@ } } }, - "revision": "20251023", + "revision": "20251106", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1713,6 +1955,11 @@ "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", "type": "object" }, + "clusterDeleted": { + "description": "Output only. Set to true if the cluster corresponding to this backup is deleted. This field is only populated for when using the BACKUP_VIEW_CLUSTER_DELETED view.", + "readOnly": true, + "type": "boolean" + }, "clusterName": { "description": "Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).", "type": "string" @@ -3176,6 +3423,11 @@ "$ref": "MachineConfig", "description": "Configurations for the machines that host the underlying database engine." }, + "maintenanceVersionName": { + "description": "Output only. Maintenance version of the instance, for example: POSTGRES_15.2025_07_15.04_00. Output only. Update this field via the parent cluster's maintenance_version field(s).", + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", "readOnly": true, @@ -5213,7 +5465,7 @@ "type": "object" }, "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata": { - "description": "Common model for database resource instance metadata. Next ID: 29", + "description": "Common model for database resource instance metadata. Next ID: 30", "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", "properties": { "availabilityConfiguration": { @@ -5356,6 +5608,10 @@ ], "type": "string" }, + "isDeletionProtectionEnabled": { + "description": "Optional. Whether deletion protection is enabled for this resource.", + "type": "boolean" + }, "location": { "description": "The resource location. REQUIRED", "type": "string" diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go index 2b46149c828..81a42553bf2 100644 --- a/alloydb/v1alpha/alloydb-gen.go +++ b/alloydb/v1alpha/alloydb-gen.go @@ -348,6 +348,10 @@ type Backup struct { // Annotations: Annotations to allow client tools to store small amount of // arbitrary data. This is distinct from labels. https://google.aip.dev/128 Annotations map[string]string `json:"annotations,omitempty"` + // ClusterDeleted: Output only. Set to true if the cluster corresponding to + // this backup is deleted. This field is only populated for when using the + // BACKUP_VIEW_CLUSTER_DELETED view. + ClusterDeleted bool `json:"clusterDeleted,omitempty"` // ClusterName: Required. The full resource name of the backup source cluster // (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}). ClusterName string `json:"clusterName,omitempty"` @@ -1928,6 +1932,10 @@ type Instance struct { // MachineConfig: Configurations for the machines that host the underlying // database engine. MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + // MaintenanceVersionName: Output only. Maintenance version of the instance, + // for example: POSTGRES_15.2025_07_15.04_00. Output only. Update this field + // via the parent cluster's maintenance_version field(s). + MaintenanceVersionName string `json:"maintenanceVersionName,omitempty"` // Name: Output only. The name of the instance resource with the format: * // projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instan // ce_id} where the cluster and instance ID segments should satisfy the regex @@ -4193,7 +4201,7 @@ func (s StorageDatabasecenterPartnerapiV1mainDatabaseResourceId) MarshalJSON() ( } // StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata: Common model -// for database resource instance metadata. Next ID: 29 +// for database resource instance metadata. Next ID: 30 type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // AvailabilityConfiguration: Availability configuration for this instance AvailabilityConfiguration *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration `json:"availabilityConfiguration,omitempty"` @@ -4266,6 +4274,9 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // primary. // "SUB_RESOURCE_TYPE_OTHER" - For rest of the other categories. InstanceType string `json:"instanceType,omitempty"` + // IsDeletionProtectionEnabled: Optional. Whether deletion protection is + // enabled for this resource. + IsDeletionProtectionEnabled bool `json:"isDeletionProtectionEnabled,omitempty"` // Location: The resource location. REQUIRED Location string `json:"location,omitempty"` // MachineConfiguration: Machine configuration for this resource. @@ -6272,6 +6283,24 @@ func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBac return c } +// View sets the optional parameter "view": The view of the backup to return. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - Value unspecified, equivalent to BASIC. +// "BACKUP_VIEW_BASIC" - Responses include all fields that aren't explicitly +// +// gated behind another view. +// +// "BACKUP_VIEW_CLUSTER_DELETED" - Response include all the field from BASIC +// +// plus the field cluster_deleted, which specifies if the cluster corresponding +// to this backup is deleted. +func (c *ProjectsLocationsBackupsGetCall) View(view string) *ProjectsLocationsBackupsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6409,6 +6438,24 @@ func (c *ProjectsLocationsBackupsListCall) PageToken(pageToken string) *Projects return c } +// View sets the optional parameter "view": The view of the backup to return. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - Value unspecified, equivalent to BASIC. +// "BACKUP_VIEW_BASIC" - Responses include all fields that aren't explicitly +// +// gated behind another view. +// +// "BACKUP_VIEW_CLUSTER_DELETED" - Response include all the field from BASIC +// +// plus the field cluster_deleted, which specifies if the cluster corresponding +// to this backup is deleted. +func (c *ProjectsLocationsBackupsListCall) View(view string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index c9bb4dddc2d..9133f695496 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -15,6 +15,218 @@ "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/alloydb/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.us-west4.rep.googleapis.com/", + "location": "us-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-north2.rep.googleapis.com/", + "location": "europe-north2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west10.rep.googleapis.com/", + "location": "europe-west10" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.europe-west12.rep.googleapis.com/", + "location": "europe-west12" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://alloydb.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -283,6 +495,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. The view of the backup to return.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_CLUSTER_DELETED" + ], + "enumDescriptions": [ + "Value unspecified, equivalent to BASIC.", + "Responses include all fields that aren't explicitly gated behind another view.", + "Response include all the field from BASIC plus the field cluster_deleted, which specifies if the cluster corresponding to this backup is deleted." + ], + "location": "query", + "type": "string" } }, "path": "v1beta/{+name}", @@ -329,6 +556,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. The view of the backup to return.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_CLUSTER_DELETED" + ], + "enumDescriptions": [ + "Value unspecified, equivalent to BASIC.", + "Responses include all fields that aren't explicitly gated behind another view.", + "Response include all the field from BASIC plus the field cluster_deleted, which specifies if the cluster corresponding to this backup is deleted." + ], + "location": "query", + "type": "string" } }, "path": "v1beta/{+parent}/backups", @@ -1624,7 +1866,7 @@ } } }, - "revision": "20251023", + "revision": "20251106", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1710,6 +1952,11 @@ "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", "type": "object" }, + "clusterDeleted": { + "description": "Output only. Set to true if the cluster corresponding to this backup is deleted. This field is only populated for when using the BACKUP_VIEW_CLUSTER_DELETED view.", + "readOnly": true, + "type": "boolean" + }, "clusterName": { "description": "Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).", "type": "string" @@ -3157,6 +3404,11 @@ "$ref": "MachineConfig", "description": "Configurations for the machines that host the underlying database engine." }, + "maintenanceVersionName": { + "description": "Output only. Maintenance version of the instance, for example: POSTGRES_15.2025_07_15.04_00. Output only. Update this field via the parent cluster's maintenance_version field(s).", + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", "readOnly": true, @@ -5189,7 +5441,7 @@ "type": "object" }, "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata": { - "description": "Common model for database resource instance metadata. Next ID: 29", + "description": "Common model for database resource instance metadata. Next ID: 30", "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", "properties": { "availabilityConfiguration": { @@ -5332,6 +5584,10 @@ ], "type": "string" }, + "isDeletionProtectionEnabled": { + "description": "Optional. Whether deletion protection is enabled for this resource.", + "type": "boolean" + }, "location": { "description": "The resource location. REQUIRED", "type": "string" diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index 2f6670679cd..e0abfc80b15 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -348,6 +348,10 @@ type Backup struct { // Annotations: Annotations to allow client tools to store small amount of // arbitrary data. This is distinct from labels. https://google.aip.dev/128 Annotations map[string]string `json:"annotations,omitempty"` + // ClusterDeleted: Output only. Set to true if the cluster corresponding to + // this backup is deleted. This field is only populated for when using the + // BACKUP_VIEW_CLUSTER_DELETED view. + ClusterDeleted bool `json:"clusterDeleted,omitempty"` // ClusterName: Required. The full resource name of the backup source cluster // (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}). ClusterName string `json:"clusterName,omitempty"` @@ -1920,6 +1924,10 @@ type Instance struct { // MachineConfig: Configurations for the machines that host the underlying // database engine. MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + // MaintenanceVersionName: Output only. Maintenance version of the instance, + // for example: POSTGRES_15.2025_07_15.04_00. Output only. Update this field + // via the parent cluster's maintenance_version field(s). + MaintenanceVersionName string `json:"maintenanceVersionName,omitempty"` // Name: Output only. The name of the instance resource with the format: * // projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instan // ce_id} where the cluster and instance ID segments should satisfy the regex @@ -4183,7 +4191,7 @@ func (s StorageDatabasecenterPartnerapiV1mainDatabaseResourceId) MarshalJSON() ( } // StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata: Common model -// for database resource instance metadata. Next ID: 29 +// for database resource instance metadata. Next ID: 30 type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // AvailabilityConfiguration: Availability configuration for this instance AvailabilityConfiguration *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration `json:"availabilityConfiguration,omitempty"` @@ -4256,6 +4264,9 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // primary. // "SUB_RESOURCE_TYPE_OTHER" - For rest of the other categories. InstanceType string `json:"instanceType,omitempty"` + // IsDeletionProtectionEnabled: Optional. Whether deletion protection is + // enabled for this resource. + IsDeletionProtectionEnabled bool `json:"isDeletionProtectionEnabled,omitempty"` // Location: The resource location. REQUIRED Location string `json:"location,omitempty"` // MachineConfiguration: Machine configuration for this resource. @@ -6262,6 +6273,24 @@ func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBac return c } +// View sets the optional parameter "view": The view of the backup to return. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - Value unspecified, equivalent to BASIC. +// "BACKUP_VIEW_BASIC" - Responses include all fields that aren't explicitly +// +// gated behind another view. +// +// "BACKUP_VIEW_CLUSTER_DELETED" - Response include all the field from BASIC +// +// plus the field cluster_deleted, which specifies if the cluster corresponding +// to this backup is deleted. +func (c *ProjectsLocationsBackupsGetCall) View(view string) *ProjectsLocationsBackupsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6399,6 +6428,24 @@ func (c *ProjectsLocationsBackupsListCall) PageToken(pageToken string) *Projects return c } +// View sets the optional parameter "view": The view of the backup to return. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - Value unspecified, equivalent to BASIC. +// "BACKUP_VIEW_BASIC" - Responses include all fields that aren't explicitly +// +// gated behind another view. +// +// "BACKUP_VIEW_CLUSTER_DELETED" - Response include all the field from BASIC +// +// plus the field cluster_deleted, which specifies if the cluster corresponding +// to this backup is deleted. +func (c *ProjectsLocationsBackupsListCall) View(view string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index bf8b42c911b..e086651ac2d 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1265,7 +1265,7 @@ } } }, - "revision": "20251104", + "revision": "20251111", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -6553,7 +6553,7 @@ "type": "boolean" }, "setUserIconDisabled": { - "description": "Whether changing the user icon is disabled. The setting has effect only on fully managed devices.", + "description": "Whether changing the user icon is disabled. This applies only on devices running Android 7 and above.", "type": "boolean" }, "setWallpaperDisabled": { @@ -6568,7 +6568,7 @@ "type": "array" }, "shareLocationDisabled": { - "description": "Whether location sharing is disabled. share_location_disabled is supported for both fully managed devices and personally owned work profiles.", + "description": "Whether location sharing is disabled.", "type": "boolean" }, "shortSupportMessage": { diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 7a8f4efb038..04631889238 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -6666,8 +6666,8 @@ type Policy struct { SafeBootDisabled bool `json:"safeBootDisabled,omitempty"` // ScreenCaptureDisabled: Whether screen capture is disabled. ScreenCaptureDisabled bool `json:"screenCaptureDisabled,omitempty"` - // SetUserIconDisabled: Whether changing the user icon is disabled. The setting - // has effect only on fully managed devices. + // SetUserIconDisabled: Whether changing the user icon is disabled. This + // applies only on devices running Android 7 and above. SetUserIconDisabled bool `json:"setUserIconDisabled,omitempty"` // SetWallpaperDisabled: Whether changing the wallpaper is disabled. SetWallpaperDisabled bool `json:"setWallpaperDisabled,omitempty"` @@ -6675,8 +6675,6 @@ type Policy struct { // may be specified. SetupActions []*SetupAction `json:"setupActions,omitempty"` // ShareLocationDisabled: Whether location sharing is disabled. - // share_location_disabled is supported for both fully managed devices and - // personally owned work profiles. ShareLocationDisabled bool `json:"shareLocationDisabled,omitempty"` // ShortSupportMessage: A message displayed to the user in the settings screen // wherever functionality has been disabled by the admin. If the message is diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index a266ffca39a..f985a98dd8d 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -10405,6 +10405,21 @@ "pattern": "^organizations/[^/]+/securityProfilesV2/[^/]+$", "required": true, "type": "string" + }, + "riskAssessmentType": { + "description": "Optional. The risk assessment type of the security profile. Defaults to ADVANCED_API_SECURITY.", + "enum": [ + "RISK_ASSESSMENT_TYPE_UNSPECIFIED", + "APIGEE", + "API_HUB" + ], + "enumDescriptions": [ + "Risk assessment type is not specified.", + "Risk assessment type is Apigee.", + "Risk assessment type is API Hub." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -10430,6 +10445,21 @@ "pattern": "^organizations/[^/]+/securityProfilesV2/[^/]+$", "required": true, "type": "string" + }, + "riskAssessmentType": { + "description": "Optional. The risk assessment type of the security profile. Defaults to ADVANCED_API_SECURITY.", + "enum": [ + "RISK_ASSESSMENT_TYPE_UNSPECIFIED", + "APIGEE", + "API_HUB" + ], + "enumDescriptions": [ + "Risk assessment type is not specified.", + "Risk assessment type is Apigee.", + "Risk assessment type is API Hub." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -10466,6 +10496,21 @@ "pattern": "^organizations/[^/]+$", "required": true, "type": "string" + }, + "riskAssessmentType": { + "description": "Optional. The risk assessment type of the security profiles. Defaults to ADVANCED_API_SECURITY.", + "enum": [ + "RISK_ASSESSMENT_TYPE_UNSPECIFIED", + "APIGEE", + "API_HUB" + ], + "enumDescriptions": [ + "Risk assessment type is not specified.", + "Risk assessment type is Apigee.", + "Risk assessment type is API Hub." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/securityProfilesV2", @@ -11448,7 +11493,7 @@ } } }, - "revision": "20251016", + "revision": "20251105", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -12813,6 +12858,14 @@ "description": "Request for BatchComputeSecurityAssessmentResults.", "id": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequest", "properties": { + "apiHubApis": { + "$ref": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray", + "description": "An array of API Hub APIs to assess. A maximum of 1 API can be assessed." + }, + "apiHubGateways": { + "$ref": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayArray", + "description": "An array of API Hub Gateways to assess. A maximum of 3 gateways can be assessed." + }, "include": { "$ref": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestResourceArray", "description": "Include only these resources." @@ -12835,12 +12888,40 @@ "type": "string" }, "scope": { - "description": "Optional. Scope of the resources for the computation. For Apigee, the environment is the scope of the resources.", + "description": "Optional. Scope of the resources for the computation. When computing scores for Apigee proxies, the scope should be set to the environment of the resources. When computing scores for API Hub deployments, api_hub_scope should be set instead.", "type": "string" } }, "type": "object" }, + "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray": { + "description": "Message for the array of API Hub APIs.", + "id": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray", + "properties": { + "apis": { + "description": "Required. The array of API Hub API IDs. Format: `projects/{project}/locations/{location}/apis/{api}`", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayArray": { + "description": "Message for the array of API Hub Gateways.", + "id": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayArray", + "properties": { + "gateways": { + "description": "Required. The array of API Hub Gateway IDs. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestIncludeAll": { "description": "Message for include_all_resources option.", "id": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestIncludeAll", @@ -12866,18 +12947,20 @@ "id": "GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestResourceArrayResource", "properties": { "name": { - "description": "Required. Name of this resource.", + "description": "Required. Name of this resource. For an Apigee API Proxy, this should be the id of the API proxy. For an API Hub Deployment, this should be the id of the deployment.", "type": "string" }, "type": { "description": "Required. Type of this resource.", "enum": [ "RESOURCE_TYPE_UNSPECIFIED", - "API_PROXY" + "API_PROXY", + "API_HUB_DEPLOYMENT" ], "enumDescriptions": [ "ResourceType not specified.", - "Resource is an Apigee Proxy." + "Resource is an Apigee Proxy.", + "Resource is an API Hub deployment." ], "type": "string" } @@ -18695,8 +18778,13 @@ "description": "Resource for which we are computing security assessment.", "id": "GoogleCloudApigeeV1SecurityAssessmentResultResource", "properties": { + "apiHubDeploymentDetails": { + "$ref": "GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails", + "description": "Output only. Additional details for the API Hub deployment.", + "readOnly": true + }, "name": { - "description": "Required. Name of this resource.", + "description": "Required. Name of this resource. For an Apigee API Proxy, this should be the id of the API proxy. For an API Hub Deployment, this should be the id of the deployment.", "type": "string" }, "resourceRevisionId": { @@ -18707,13 +18795,56 @@ "description": "Required. Type of this resource.", "enum": [ "RESOURCE_TYPE_UNSPECIFIED", - "API_PROXY" + "API_PROXY", + "API_HUB_DEPLOYMENT" ], "enumDescriptions": [ "ResourceType not specified.", - "Resource is an Apigee Proxy." + "Resource is an Apigee Proxy.", + "Resource is an API Hub deployment." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails": { + "description": "Additional details if the resource is an API Hub deployment.", + "id": "GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails", + "properties": { + "displayName": { + "description": "The display name of the API Hub deployment.", + "type": "string" + }, + "gateway": { + "description": "The gateway for the API Hub deployment. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`", + "type": "string" + }, + "gatewayType": { + "description": "The gateway type for the API Hub deployment.", + "enum": [ + "API_HUB_GATEWAY_TYPE_UNSPECIFIED", + "APIGEE_X", + "APIGEE_HYBRID", + "APIGEE_EDGE", + "APIGEE_OPDK" + ], + "enumDescriptions": [ + "Gateway type is not specified.", + "Gateway is Apigee X for API Hub.", + "Gateway is Apigee Hybrid for API Hub.", + "Gateway is Apigee Edge for API Hub.", + "Gateway is Apigee OPDK for API Hub." ], "type": "string" + }, + "resourceUri": { + "description": "The resource uri for the API Hub deployment.", + "type": "string" + }, + "sourceProject": { + "description": "The source project for the API Hub deployment.", + "type": "string" } }, "type": "object" @@ -18792,12 +18923,14 @@ "enum": [ "VERDICT_UNSPECIFIED", "PASS", - "FAIL" + "FAIL", + "NOT_APPLICABLE" ], "enumDescriptions": [ "The verdict is unspecified.", "The assessment has passed.", - "The assessment has failed." + "The assessment has failed.", + "The verdict is not applicable." ], "type": "string" }, @@ -19242,6 +19375,20 @@ "description": "Required. The configuration for each assessment in this profile. Key is the name/id of the assessment.", "type": "object" }, + "riskAssessmentType": { + "description": "Optional. The risk assessment type of the security profile. Defaults to ADVANCED_API_SECURITY.", + "enum": [ + "RISK_ASSESSMENT_TYPE_UNSPECIFIED", + "APIGEE", + "API_HUB" + ], + "enumDescriptions": [ + "Risk assessment type is not specified.", + "Risk assessment type is Apigee.", + "Risk assessment type is API Hub." + ], + "type": "string" + }, "updateTime": { "description": "Output only. The time of the security profile update.", "format": "google-datetime", @@ -19255,6 +19402,10 @@ "description": "The configuration definition for a specific assessment.", "id": "GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfig", "properties": { + "include": { + "$ref": "GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeArray", + "description": "Include only these Gateway Types." + }, "weight": { "description": "The weight of the assessment.", "enum": [ @@ -19274,6 +19425,34 @@ }, "type": "object" }, + "GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeArray": { + "description": "Message for the array of API Hub Gateway Types.", + "id": "GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeArray", + "properties": { + "gatewayTypes": { + "description": "Required. The array of API Hub Gateway Types.", + "items": { + "enum": [ + "API_HUB_GATEWAY_TYPE_UNSPECIFIED", + "APIGEE_X", + "APIGEE_HYBRID", + "APIGEE_EDGE", + "APIGEE_OPDK" + ], + "enumDescriptions": [ + "Gateway type is not specified.", + "Gateway is Apigee X for API Hub.", + "Gateway is Apigee Hybrid for API Hub.", + "Gateway is Apigee Edge for API Hub.", + "Gateway is Apigee OPDK for API Hub." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1SecurityReport": { "description": "SecurityReport saves all the information about the created security report.", "id": "GoogleCloudApigeeV1SecurityReport", diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index c27462a13f1..9d997f33429 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -2872,6 +2872,12 @@ func (s GoogleCloudApigeeV1Attributes) MarshalJSON() ([]byte, error) { // GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequest: Request for // BatchComputeSecurityAssessmentResults. type GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequest struct { + // ApiHubApis: An array of API Hub APIs to assess. A maximum of 1 API can be + // assessed. + ApiHubApis *GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray `json:"apiHubApis,omitempty"` + // ApiHubGateways: An array of API Hub Gateways to assess. A maximum of 3 + // gateways can be assessed. + ApiHubGateways *GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayArray `json:"apiHubGateways,omitempty"` // Include: Include only these resources. Include *GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestResourceArray `json:"include,omitempty"` // IncludeAllResources: Include all resources under the scope. @@ -2886,16 +2892,18 @@ type GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequest struct { PageToken string `json:"pageToken,omitempty"` // Profile: Required. Name of the profile that is used for computation. Profile string `json:"profile,omitempty"` - // Scope: Optional. Scope of the resources for the computation. For Apigee, the - // environment is the scope of the resources. + // Scope: Optional. Scope of the resources for the computation. When computing + // scores for Apigee proxies, the scope should be set to the environment of the + // resources. When computing scores for API Hub deployments, api_hub_scope + // should be set instead. Scope string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "Include") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "ApiHubApis") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Include") to include in API + // NullFields is a list of field names (e.g. "ApiHubApis") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -2907,6 +2915,55 @@ func (s GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequest) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray +// : Message for the array of API Hub APIs. +type GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray struct { + // Apis: Required. The array of API Hub API IDs. Format: + // `projects/{project}/locations/{location}/apis/{api}` + Apis []string `json:"apis,omitempty"` + // ForceSendFields is a list of field names (e.g. "Apis") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Apis") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubApiArray + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayA +// rray: Message for the array of API Hub Gateways. +type GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayArray struct { + // Gateways: Required. The array of API Hub Gateway IDs. Format: + // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance + // }` + Gateways []string `json:"gateways,omitempty"` + // ForceSendFields is a list of field names (e.g. "Gateways") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Gateways") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayArray) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestApiHubGatewayArray + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestIncludeAll: // Message for include_all_resources option. type GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestIncludeAll struct { @@ -2940,13 +2997,16 @@ func (s GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestResourceA // GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestResourceArrayR // esource: Resource for which we are computing security assessment. type GoogleCloudApigeeV1BatchComputeSecurityAssessmentResultsRequestResourceArrayResource struct { - // Name: Required. Name of this resource. + // Name: Required. Name of this resource. For an Apigee API Proxy, this should + // be the id of the API proxy. For an API Hub Deployment, this should be the id + // of the deployment. Name string `json:"name,omitempty"` // Type: Required. Type of this resource. // // Possible values: // "RESOURCE_TYPE_UNSPECIFIED" - ResourceType not specified. // "API_PROXY" - Resource is an Apigee Proxy. + // "API_HUB_DEPLOYMENT" - Resource is an API Hub deployment. Type string `json:"type,omitempty"` // 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 @@ -10126,7 +10186,12 @@ func (s GoogleCloudApigeeV1SecurityAssessmentResult) MarshalJSON() ([]byte, erro // GoogleCloudApigeeV1SecurityAssessmentResultResource: Resource for which we // are computing security assessment. type GoogleCloudApigeeV1SecurityAssessmentResultResource struct { - // Name: Required. Name of this resource. + // ApiHubDeploymentDetails: Output only. Additional details for the API Hub + // deployment. + ApiHubDeploymentDetails *GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails `json:"apiHubDeploymentDetails,omitempty"` + // Name: Required. Name of this resource. For an Apigee API Proxy, this should + // be the id of the API proxy. For an API Hub Deployment, this should be the id + // of the deployment. Name string `json:"name,omitempty"` // ResourceRevisionId: The revision id for the resource. In case of Apigee, // this is proxy revision id. @@ -10136,16 +10201,17 @@ type GoogleCloudApigeeV1SecurityAssessmentResultResource struct { // Possible values: // "RESOURCE_TYPE_UNSPECIFIED" - ResourceType not specified. // "API_PROXY" - Resource is an Apigee Proxy. + // "API_HUB_DEPLOYMENT" - Resource is an API Hub deployment. Type string `json:"type,omitempty"` - // 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. See + // ForceSendFields is a list of field names (e.g. "ApiHubDeploymentDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. 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. See + // NullFields is a list of field names (e.g. "ApiHubDeploymentDetails") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -10155,6 +10221,46 @@ func (s GoogleCloudApigeeV1SecurityAssessmentResultResource) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails: +// Additional details if the resource is an API Hub deployment. +type GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails struct { + // DisplayName: The display name of the API Hub deployment. + DisplayName string `json:"displayName,omitempty"` + // Gateway: The gateway for the API Hub deployment. Format: + // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance + // }` + Gateway string `json:"gateway,omitempty"` + // GatewayType: The gateway type for the API Hub deployment. + // + // Possible values: + // "API_HUB_GATEWAY_TYPE_UNSPECIFIED" - Gateway type is not specified. + // "APIGEE_X" - Gateway is Apigee X for API Hub. + // "APIGEE_HYBRID" - Gateway is Apigee Hybrid for API Hub. + // "APIGEE_EDGE" - Gateway is Apigee Edge for API Hub. + // "APIGEE_OPDK" - Gateway is Apigee OPDK for API Hub. + GatewayType string `json:"gatewayType,omitempty"` + // ResourceUri: The resource uri for the API Hub deployment. + ResourceUri string `json:"resourceUri,omitempty"` + // SourceProject: The source project for the API Hub deployment. + SourceProject string `json:"sourceProject,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityAssessmentResultResourceApiHubDeploymentDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApigeeV1SecurityAssessmentResultScoringResult: The result of the // assessment. type GoogleCloudApigeeV1SecurityAssessmentResultScoringResult struct { @@ -10212,6 +10318,7 @@ type GoogleCloudApigeeV1SecurityAssessmentResultScoringResultAssessmentRecommend // "VERDICT_UNSPECIFIED" - The verdict is unspecified. // "PASS" - The assessment has passed. // "FAIL" - The assessment has failed. + // "NOT_APPLICABLE" - The verdict is not applicable. Verdict string `json:"verdict,omitempty"` // Weight: The weight of the assessment which was set in the profile. // @@ -10647,6 +10754,15 @@ type GoogleCloudApigeeV1SecurityProfileV2 struct { // ProfileAssessmentConfigs: Required. The configuration for each assessment in // this profile. Key is the name/id of the assessment. ProfileAssessmentConfigs map[string]GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfig `json:"profileAssessmentConfigs,omitempty"` + // RiskAssessmentType: Optional. The risk assessment type of the security + // profile. Defaults to ADVANCED_API_SECURITY. + // + // Possible values: + // "RISK_ASSESSMENT_TYPE_UNSPECIFIED" - Risk assessment type is not + // specified. + // "APIGEE" - Risk assessment type is Apigee. + // "API_HUB" - Risk assessment type is API Hub. + RiskAssessmentType string `json:"riskAssessmentType,omitempty"` // UpdateTime: Output only. The time of the security profile update. UpdateTime string `json:"updateTime,omitempty"` @@ -10673,6 +10789,8 @@ func (s GoogleCloudApigeeV1SecurityProfileV2) MarshalJSON() ([]byte, error) { // GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfig: The // configuration definition for a specific assessment. type GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfig struct { + // Include: Include only these Gateway Types. + Include *GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeArray `json:"include,omitempty"` // Weight: The weight of the assessment. // // Possible values: @@ -10681,13 +10799,13 @@ type GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfig struct { // "MODERATE" - The weight is moderate. // "MAJOR" - The weight is major. Weight string `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "Weight") to unconditionally + // ForceSendFields is a list of field names (e.g. "Include") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Weight") to include in API + // NullFields is a list of field names (e.g. "Include") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -10699,6 +10817,36 @@ func (s GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfig) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeA +// rray: Message for the array of API Hub Gateway Types. +type GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeArray struct { + // GatewayTypes: Required. The array of API Hub Gateway Types. + // + // Possible values: + // "API_HUB_GATEWAY_TYPE_UNSPECIFIED" - Gateway type is not specified. + // "APIGEE_X" - Gateway is Apigee X for API Hub. + // "APIGEE_HYBRID" - Gateway is Apigee Hybrid for API Hub. + // "APIGEE_EDGE" - Gateway is Apigee Edge for API Hub. + // "APIGEE_OPDK" - Gateway is Apigee OPDK for API Hub. + GatewayTypes []string `json:"gatewayTypes,omitempty"` + // ForceSendFields is a list of field names (e.g. "GatewayTypes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GatewayTypes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeArray) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityProfileV2ProfileAssessmentConfigApiHubGatewayTypeArray + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApigeeV1SecurityReport: SecurityReport saves all the information // about the created security report. type GoogleCloudApigeeV1SecurityReport struct { @@ -50979,6 +51127,23 @@ func (r *OrganizationsSecurityProfilesV2Service) Delete(name string) *Organizati return c } +// RiskAssessmentType sets the optional parameter "riskAssessmentType": The +// risk assessment type of the security profile. Defaults to +// ADVANCED_API_SECURITY. +// +// Possible values: +// +// "RISK_ASSESSMENT_TYPE_UNSPECIFIED" - Risk assessment type is not +// +// specified. +// +// "APIGEE" - Risk assessment type is Apigee. +// "API_HUB" - Risk assessment type is API Hub. +func (c *OrganizationsSecurityProfilesV2DeleteCall) RiskAssessmentType(riskAssessmentType string) *OrganizationsSecurityProfilesV2DeleteCall { + c.urlParams_.Set("riskAssessmentType", riskAssessmentType) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -51079,6 +51244,23 @@ func (r *OrganizationsSecurityProfilesV2Service) Get(name string) *Organizations return c } +// RiskAssessmentType sets the optional parameter "riskAssessmentType": The +// risk assessment type of the security profile. Defaults to +// ADVANCED_API_SECURITY. +// +// Possible values: +// +// "RISK_ASSESSMENT_TYPE_UNSPECIFIED" - Risk assessment type is not +// +// specified. +// +// "APIGEE" - Risk assessment type is Apigee. +// "API_HUB" - Risk assessment type is API Hub. +func (c *OrganizationsSecurityProfilesV2GetCall) RiskAssessmentType(riskAssessmentType string) *OrganizationsSecurityProfilesV2GetCall { + c.urlParams_.Set("riskAssessmentType", riskAssessmentType) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -51205,6 +51387,23 @@ func (c *OrganizationsSecurityProfilesV2ListCall) PageToken(pageToken string) *O return c } +// RiskAssessmentType sets the optional parameter "riskAssessmentType": The +// risk assessment type of the security profiles. Defaults to +// ADVANCED_API_SECURITY. +// +// Possible values: +// +// "RISK_ASSESSMENT_TYPE_UNSPECIFIED" - Risk assessment type is not +// +// specified. +// +// "APIGEE" - Risk assessment type is Apigee. +// "API_HUB" - Risk assessment type is API Hub. +func (c *OrganizationsSecurityProfilesV2ListCall) RiskAssessmentType(riskAssessmentType string) *OrganizationsSecurityProfilesV2ListCall { + c.urlParams_.Set("riskAssessmentType", riskAssessmentType) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/apihub/v1/apihub-api.json b/apihub/v1/apihub-api.json index e81e05ef93d..aef1740be16 100644 --- a/apihub/v1/apihub-api.json +++ b/apihub/v1/apihub-api.json @@ -264,6 +264,104 @@ } }, "resources": { + "addons": { + "methods": { + "get": { + "description": "Get an addon.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addons/{addonsId}", + "httpMethod": "GET", + "id": "apihub.projects.locations.addons.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the addon to get. Format: `projects/{project}/locations/{location}/addons/{addon}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addons/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApihubV1Addon" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List addons.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addons", + "httpMethod": "GET", + "id": "apihub.projects.locations.addons.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression that filters the list of addons. The only supported filter is `plugin_instance_name`. It can be used to filter addons that are enabled for a given plugin instance. The format of the filter is `plugin_instance_name = \"projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}\"`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of hub addons to return. The service may return fewer than this value. If unspecified, at most 50 hub addons will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListAddons` call. Provide this to retrieve the subsequent page. When paginating, all other parameters (except page_size) provided to `ListAddons` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource where this addon will be created. Format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/addons", + "response": { + "$ref": "GoogleCloudApihubV1ListAddonsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "manageConfig": { + "description": "Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addons/{addonsId}:manageConfig", + "httpMethod": "POST", + "id": "apihub.projects.locations.addons.manageConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the addon for which the config is to be managed. Format: `projects/{project}/locations/{location}/addons/{addon}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addons/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:manageConfig", + "request": { + "$ref": "GoogleCloudApihubV1ManageAddonConfigRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "apiHubInstances": { "methods": { "create": { @@ -2979,7 +3077,7 @@ } } }, - "revision": "20251025", + "revision": "20251110", "rootUrl": "https://apihub.googleapis.com/", "schemas": { "Empty": { @@ -3031,6 +3129,100 @@ }, "type": "object" }, + "GoogleCloudApihubV1Addon": { + "description": "Addon resource.", + "id": "GoogleCloudApihubV1Addon", + "properties": { + "config": { + "$ref": "GoogleCloudApihubV1AddonConfig", + "description": "Required. The configuration of the addon." + }, + "createTime": { + "description": "Output only. The time at which the addon was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataSource": { + "description": "Required. The data source on which the addon operates. This determines which field in the `config` oneof is used.", + "enum": [ + "DATA_SOURCE_UNSPECIFIED", + "PLUGIN_INSTANCE", + "ALL_DATA" + ], + "enumDescriptions": [ + "The data source of the addon is not specified.", + "Addon operates on data collected from specific plugin instances.", + "Addon operates on all data in the API hub." + ], + "type": "string" + }, + "description": { + "description": "Optional. The description of the addon.", + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the addon.", + "type": "string" + }, + "name": { + "description": "Identifier. The name of the addon to enable. Format: `projects/{project}/locations/{location}/addons/{addon}`.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the addon.", + "enum": [ + "ADDON_STATE_UNSPECIFIED", + "ACTIVE", + "UPDATING", + "ERROR", + "INACTIVE" + ], + "enumDescriptions": [ + "The addon state is not specified.", + "The addon is active.", + "The addon is being updated.", + "The addon is in error state.", + "The addon is inactive." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time at which the addon was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApihubV1AddonConfig": { + "description": "Configuration for the addon.", + "id": "GoogleCloudApihubV1AddonConfig", + "properties": { + "allDataAddonConfig": { + "$ref": "GoogleCloudApihubV1AllDataAddonConfig", + "description": "Configuration for addons which act on all data in the API hub." + }, + "gatewayPluginAddonConfig": { + "$ref": "GoogleCloudApihubV1GatewayPluginAddonConfig", + "description": "Configuration for gateway plugin addons." + } + }, + "type": "object" + }, + "GoogleCloudApihubV1AllDataAddonConfig": { + "description": "Configuration for addons which act on all data in the API hub. This is used to specify if the addon is enabled for all data in the API hub.", + "id": "GoogleCloudApihubV1AllDataAddonConfig", + "properties": { + "enabled": { + "description": "Required. If true, the addon is enabled for all data in the API hub.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudApihubV1AllowedValue": { "description": "The value that can be assigned to the attribute when the data type is enum.", "id": "GoogleCloudApihubV1AllowedValue", @@ -3360,6 +3552,39 @@ }, "type": "object" }, + "GoogleCloudApihubV1ApigeeEdgeConfig": { + "description": "Configuration for Apigee Edge gateways. Applicability of a filter is determined by the filter being provided. If none of the filters are provided the addon will be enabled for all data brought in by the gateway plugin instance.", + "id": "GoogleCloudApihubV1ApigeeEdgeConfig", + "properties": { + "environmentFilter": { + "$ref": "GoogleCloudApihubV1EnvironmentFilter", + "description": "Optional. The filter to apply on the resources managed by the gateway plugin instance. If provided this filter applies environment specific filtering." + } + }, + "type": "object" + }, + "GoogleCloudApihubV1ApigeeOPDKConfig": { + "description": "Configuration for Apigee OPDK gateways. Applicability of a filter is determined by the filter being provided. If none of the filters are provided the addon will be enabled for all data brought in by the gateway plugin instance.", + "id": "GoogleCloudApihubV1ApigeeOPDKConfig", + "properties": { + "environmentFilter": { + "$ref": "GoogleCloudApihubV1EnvironmentFilter", + "description": "Optional. The filter to apply on the resources managed by the gateway plugin instance. If provided this filter applies environment specific filtering." + } + }, + "type": "object" + }, + "GoogleCloudApihubV1ApigeeXHybridConfig": { + "description": "Configuration for Apigee X and Apigee Hybrid gateways. Applicability of a filter is determined by the filter being provided. If none of the filters are provided the addon will be enabled for all data brought in by the gateway plugin instance.", + "id": "GoogleCloudApihubV1ApigeeXHybridConfig", + "properties": { + "environmentFilter": { + "$ref": "GoogleCloudApihubV1EnvironmentFilter", + "description": "Optional. The filter to apply on the resources managed by the gateway plugin instance. If provided this filter applies environment specific filtering." + } + }, + "type": "object" + }, "GoogleCloudApihubV1ApplicationIntegrationEndpointDetails": { "description": "The details of the Application Integration endpoint to be triggered for curation.", "id": "GoogleCloudApihubV1ApplicationIntegrationEndpointDetails", @@ -4455,6 +4680,24 @@ }, "type": "object" }, + "GoogleCloudApihubV1EnvironmentFilter": { + "description": "Filter for environments.", + "id": "GoogleCloudApihubV1EnvironmentFilter", + "properties": { + "allEnvironments": { + "description": "Optional. Indicates if this filter should match all environments or only a subset of environments. If set to true, all environments are matched.", + "type": "boolean" + }, + "environments": { + "description": "Optional. If provided, only environments in this list are matched. This field is ignored if `all_environments` is true.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudApihubV1ExecutePluginInstanceActionRequest": { "description": "The ExecutePluginInstanceAction method's request.", "id": "GoogleCloudApihubV1ExecutePluginInstanceActionRequest", @@ -4549,6 +4792,43 @@ }, "type": "object" }, + "GoogleCloudApihubV1GatewayPluginAddonConfig": { + "description": "Configuration for gateway plugin addons. This is used to specify the list of gateway plugin configs for which the addon is enabled.", + "id": "GoogleCloudApihubV1GatewayPluginAddonConfig", + "properties": { + "gatewayPluginConfigs": { + "description": "Required. The list of gateway plugin configs for which the addon is enabled. Each gateway plugin config should have a unique plugin instance.", + "items": { + "$ref": "GoogleCloudApihubV1GatewayPluginConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudApihubV1GatewayPluginConfig": { + "description": "Configuration for a gateway plugin. This is used to specify configs for different gateways.", + "id": "GoogleCloudApihubV1GatewayPluginConfig", + "properties": { + "apigeeEdgeConfig": { + "$ref": "GoogleCloudApihubV1ApigeeEdgeConfig", + "description": "Configuration for Apigee Edge gateways." + }, + "apigeeOpdkConfig": { + "$ref": "GoogleCloudApihubV1ApigeeOPDKConfig", + "description": "Configuration for Apigee OPDK gateways." + }, + "apigeeXHybridConfig": { + "$ref": "GoogleCloudApihubV1ApigeeXHybridConfig", + "description": "Configuration for Apigee X and Apigee Hybrid gateways." + }, + "pluginInstance": { + "description": "Required. The name of the gateway plugin instance for which the config is to be specified. Format: projects/{project}/locations/{location}/plugins/{plugin}/pluginInstances/{plugin_instance}", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1GoogleServiceAccountConfig": { "description": "Config for Google service account authentication.", "id": "GoogleCloudApihubV1GoogleServiceAccountConfig", @@ -4881,6 +5161,24 @@ "properties": {}, "type": "object" }, + "GoogleCloudApihubV1ListAddonsResponse": { + "description": "The ListAddons method's response.", + "id": "GoogleCloudApihubV1ListAddonsResponse", + "properties": { + "addons": { + "description": "The list of addons.", + "items": { + "$ref": "GoogleCloudApihubV1Addon" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1ListApiOperationsResponse": { "description": "The ListApiOperations method's response.", "id": "GoogleCloudApihubV1ListApiOperationsResponse", @@ -5173,6 +5471,17 @@ }, "type": "object" }, + "GoogleCloudApihubV1ManageAddonConfigRequest": { + "description": "The ManageAddonConfig method's request.", + "id": "GoogleCloudApihubV1ManageAddonConfigRequest", + "properties": { + "config": { + "$ref": "GoogleCloudApihubV1AddonConfig", + "description": "Required. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon." + } + }, + "type": "object" + }, "GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest": { "description": "The ManagePluginInstanceSourceData method's request.", "id": "GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest", @@ -5658,6 +5967,13 @@ "description": "Identifier. The unique name of the plugin instance resource. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`", "type": "string" }, + "sourceEnvironmentsConfig": { + "additionalProperties": { + "$ref": "GoogleCloudApihubV1SourceEnvironment" + }, + "description": "Optional. The source environment's config present in the gateway instance linked to the plugin instance. The key is the `source_environment` name from the SourceEnvironment message.", + "type": "object" + }, "sourceProjectId": { "description": "Optional. The source project id of the plugin instance. This will be the id of runtime project in case of gcp based plugins and org id in case of non gcp based plugins. This field will be a required field for Google provided on-ramp plugins.", "type": "string" @@ -5983,6 +6299,31 @@ }, "type": "object" }, + "GoogleCloudApihubV1SourceEnvironment": { + "description": "Message representing the source environment details.", + "id": "GoogleCloudApihubV1SourceEnvironment", + "properties": { + "createTime": { + "description": "Optional. The time at which the environment was created at the source.", + "format": "google-datetime", + "type": "string" + }, + "sourceEnvironment": { + "description": "Required. The name of the environment at the source. This should map to Deployment.", + "type": "string" + }, + "sourceEnvironmentUri": { + "description": "The location where additional information about source environments can be found. The location should be relative path of the environment manifest with respect to a plugin instance.", + "type": "string" + }, + "updateTime": { + "description": "Optional. The time at which the environment was last updated at the source.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApihubV1SourceMetadata": { "description": "SourceMetadata represents the metadata for a resource at the source.", "id": "GoogleCloudApihubV1SourceMetadata", diff --git a/apihub/v1/apihub-gen.go b/apihub/v1/apihub-gen.go index 7215237f686..cab2c2bd3dd 100644 --- a/apihub/v1/apihub-gen.go +++ b/apihub/v1/apihub-gen.go @@ -168,6 +168,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Addons = NewProjectsLocationsAddonsService(s) rs.ApiHubInstances = NewProjectsLocationsApiHubInstancesService(s) rs.Apis = NewProjectsLocationsApisService(s) rs.Attributes = NewProjectsLocationsAttributesService(s) @@ -186,6 +187,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + Addons *ProjectsLocationsAddonsService + ApiHubInstances *ProjectsLocationsApiHubInstancesService Apis *ProjectsLocationsApisService @@ -211,6 +214,15 @@ type ProjectsLocationsService struct { RuntimeProjectAttachments *ProjectsLocationsRuntimeProjectAttachmentsService } +func NewProjectsLocationsAddonsService(s *Service) *ProjectsLocationsAddonsService { + rs := &ProjectsLocationsAddonsService{s: s} + return rs +} + +type ProjectsLocationsAddonsService struct { + s *Service +} + func NewProjectsLocationsApiHubInstancesService(s *Service) *ProjectsLocationsApiHubInstancesService { rs := &ProjectsLocationsApiHubInstancesService{s: s} return rs @@ -470,6 +482,110 @@ func (s GoogleCloudApihubV1ActionExecutionDetail) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1Addon: Addon resource. +type GoogleCloudApihubV1Addon struct { + // Config: Required. The configuration of the addon. + Config *GoogleCloudApihubV1AddonConfig `json:"config,omitempty"` + // CreateTime: Output only. The time at which the addon was created. + CreateTime string `json:"createTime,omitempty"` + // DataSource: Required. The data source on which the addon operates. This + // determines which field in the `config` oneof is used. + // + // Possible values: + // "DATA_SOURCE_UNSPECIFIED" - The data source of the addon is not specified. + // "PLUGIN_INSTANCE" - Addon operates on data collected from specific plugin + // instances. + // "ALL_DATA" - Addon operates on all data in the API hub. + DataSource string `json:"dataSource,omitempty"` + // Description: Optional. The description of the addon. + Description string `json:"description,omitempty"` + // DisplayName: Required. The display name of the addon. + DisplayName string `json:"displayName,omitempty"` + // Name: Identifier. The name of the addon to enable. Format: + // `projects/{project}/locations/{location}/addons/{addon}`. + Name string `json:"name,omitempty"` + // State: Output only. The state of the addon. + // + // Possible values: + // "ADDON_STATE_UNSPECIFIED" - The addon state is not specified. + // "ACTIVE" - The addon is active. + // "UPDATING" - The addon is being updated. + // "ERROR" - The addon is in error state. + // "INACTIVE" - The addon is inactive. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time at which the addon was last updated. + 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. "Config") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1Addon) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1Addon + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1AddonConfig: Configuration for the addon. +type GoogleCloudApihubV1AddonConfig struct { + // AllDataAddonConfig: Configuration for addons which act on all data in the + // API hub. + AllDataAddonConfig *GoogleCloudApihubV1AllDataAddonConfig `json:"allDataAddonConfig,omitempty"` + // GatewayPluginAddonConfig: Configuration for gateway plugin addons. + GatewayPluginAddonConfig *GoogleCloudApihubV1GatewayPluginAddonConfig `json:"gatewayPluginAddonConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllDataAddonConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllDataAddonConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1AddonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1AddonConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1AllDataAddonConfig: Configuration for addons which act on +// all data in the API hub. This is used to specify if the addon is enabled for +// all data in the API hub. +type GoogleCloudApihubV1AllDataAddonConfig struct { + // Enabled: Required. If true, the addon is enabled for all data in the API + // hub. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1AllDataAddonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1AllDataAddonConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1AllowedValue: The value that can be assigned to the // attribute when the data type is enum. type GoogleCloudApihubV1AllowedValue struct { @@ -869,6 +985,87 @@ func (s GoogleCloudApihubV1ApiOperation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1ApigeeEdgeConfig: Configuration for Apigee Edge gateways. +// Applicability of a filter is determined by the filter being provided. If +// none of the filters are provided the addon will be enabled for all data +// brought in by the gateway plugin instance. +type GoogleCloudApihubV1ApigeeEdgeConfig struct { + // EnvironmentFilter: Optional. The filter to apply on the resources managed by + // the gateway plugin instance. If provided this filter applies environment + // specific filtering. + EnvironmentFilter *GoogleCloudApihubV1EnvironmentFilter `json:"environmentFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnvironmentFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnvironmentFilter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1ApigeeEdgeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1ApigeeEdgeConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1ApigeeOPDKConfig: Configuration for Apigee OPDK gateways. +// Applicability of a filter is determined by the filter being provided. If +// none of the filters are provided the addon will be enabled for all data +// brought in by the gateway plugin instance. +type GoogleCloudApihubV1ApigeeOPDKConfig struct { + // EnvironmentFilter: Optional. The filter to apply on the resources managed by + // the gateway plugin instance. If provided this filter applies environment + // specific filtering. + EnvironmentFilter *GoogleCloudApihubV1EnvironmentFilter `json:"environmentFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnvironmentFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnvironmentFilter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1ApigeeOPDKConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1ApigeeOPDKConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1ApigeeXHybridConfig: Configuration for Apigee X and +// Apigee Hybrid gateways. Applicability of a filter is determined by the +// filter being provided. If none of the filters are provided the addon will be +// enabled for all data brought in by the gateway plugin instance. +type GoogleCloudApihubV1ApigeeXHybridConfig struct { + // EnvironmentFilter: Optional. The filter to apply on the resources managed by + // the gateway plugin instance. If provided this filter applies environment + // specific filtering. + EnvironmentFilter *GoogleCloudApihubV1EnvironmentFilter `json:"environmentFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnvironmentFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnvironmentFilter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1ApigeeXHybridConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1ApigeeXHybridConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1ApplicationIntegrationEndpointDetails: The details of the // Application Integration endpoint to be triggered for curation. type GoogleCloudApihubV1ApplicationIntegrationEndpointDetails struct { @@ -2039,6 +2236,33 @@ func (s GoogleCloudApihubV1EnumAttributeValues) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1EnvironmentFilter: Filter for environments. +type GoogleCloudApihubV1EnvironmentFilter struct { + // AllEnvironments: Optional. Indicates if this filter should match all + // environments or only a subset of environments. If set to true, all + // environments are matched. + AllEnvironments bool `json:"allEnvironments,omitempty"` + // Environments: Optional. If provided, only environments in this list are + // matched. This field is ignored if `all_environments` is true. + Environments []string `json:"environments,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllEnvironments") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllEnvironments") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1EnvironmentFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1EnvironmentFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1ExecutePluginInstanceActionRequest: The // ExecutePluginInstanceAction method's request. type GoogleCloudApihubV1ExecutePluginInstanceActionRequest struct { @@ -2143,6 +2367,64 @@ func (s GoogleCloudApihubV1ExternalApi) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1GatewayPluginAddonConfig: Configuration for gateway +// plugin addons. This is used to specify the list of gateway plugin configs +// for which the addon is enabled. +type GoogleCloudApihubV1GatewayPluginAddonConfig struct { + // GatewayPluginConfigs: Required. The list of gateway plugin configs for which + // the addon is enabled. Each gateway plugin config should have a unique plugin + // instance. + GatewayPluginConfigs []*GoogleCloudApihubV1GatewayPluginConfig `json:"gatewayPluginConfigs,omitempty"` + // ForceSendFields is a list of field names (e.g. "GatewayPluginConfigs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GatewayPluginConfigs") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1GatewayPluginAddonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1GatewayPluginAddonConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApihubV1GatewayPluginConfig: Configuration for a gateway plugin. +// This is used to specify configs for different gateways. +type GoogleCloudApihubV1GatewayPluginConfig struct { + // ApigeeEdgeConfig: Configuration for Apigee Edge gateways. + ApigeeEdgeConfig *GoogleCloudApihubV1ApigeeEdgeConfig `json:"apigeeEdgeConfig,omitempty"` + // ApigeeOpdkConfig: Configuration for Apigee OPDK gateways. + ApigeeOpdkConfig *GoogleCloudApihubV1ApigeeOPDKConfig `json:"apigeeOpdkConfig,omitempty"` + // ApigeeXHybridConfig: Configuration for Apigee X and Apigee Hybrid gateways. + ApigeeXHybridConfig *GoogleCloudApihubV1ApigeeXHybridConfig `json:"apigeeXHybridConfig,omitempty"` + // PluginInstance: Required. The name of the gateway plugin instance for which + // the config is to be specified. Format: + // projects/{project}/locations/{location}/plugins/{plugin}/pluginInstances/{plu + // gin_instance} + PluginInstance string `json:"pluginInstance,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApigeeEdgeConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApigeeEdgeConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1GatewayPluginConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1GatewayPluginConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1GoogleServiceAccountConfig: Config for Google service // account authentication. type GoogleCloudApihubV1GoogleServiceAccountConfig struct { @@ -2509,6 +2791,34 @@ func (s GoogleCloudApihubV1LintResponse) MarshalJSON() ([]byte, error) { type GoogleCloudApihubV1LintSpecRequest struct { } +// GoogleCloudApihubV1ListAddonsResponse: The ListAddons method's response. +type GoogleCloudApihubV1ListAddonsResponse struct { + // Addons: The list of addons. + Addons []*GoogleCloudApihubV1Addon `json:"addons,omitempty"` + // NextPageToken: A token to retrieve the next page of results, or empty if + // there are no more results in the list. + 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. "Addons") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Addons") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1ListAddonsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1ListAddonsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1ListApiOperationsResponse: The ListApiOperations method's // response. type GoogleCloudApihubV1ListApiOperationsResponse struct { @@ -2996,6 +3306,31 @@ func (s GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1ManageAddonConfigRequest: The ManageAddonConfig method's +// request. +type GoogleCloudApihubV1ManageAddonConfigRequest struct { + // Config: Required. The config of the addon to be managed. This config will + // replace the config present in the addon. The type of the config should match + // the config type already present in the addon. + Config *GoogleCloudApihubV1AddonConfig `json:"config,omitempty"` + // ForceSendFields is a list of field names (e.g. "Config") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1ManageAddonConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1ManageAddonConfigRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest: The // ManagePluginInstanceSourceData method's request. type GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest struct { @@ -3546,6 +3881,10 @@ type GoogleCloudApihubV1PluginInstance struct { // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance // }` Name string `json:"name,omitempty"` + // SourceEnvironmentsConfig: Optional. The source environment's config present + // in the gateway instance linked to the plugin instance. The key is the + // `source_environment` name from the SourceEnvironment message. + SourceEnvironmentsConfig map[string]GoogleCloudApihubV1SourceEnvironment `json:"sourceEnvironmentsConfig,omitempty"` // SourceProjectId: Optional. The source project id of the plugin instance. // This will be the id of runtime project in case of gcp based plugins and org // id in case of non gcp based plugins. This field will be a required field for @@ -4027,6 +4366,40 @@ func (s GoogleCloudApihubV1Secret) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudApihubV1SourceEnvironment: Message representing the source +// environment details. +type GoogleCloudApihubV1SourceEnvironment struct { + // CreateTime: Optional. The time at which the environment was created at the + // source. + CreateTime string `json:"createTime,omitempty"` + // SourceEnvironment: Required. The name of the environment at the source. This + // should map to Deployment. + SourceEnvironment string `json:"sourceEnvironment,omitempty"` + // SourceEnvironmentUri: The location where additional information about source + // environments can be found. The location should be relative path of the + // environment manifest with respect to a plugin instance. + SourceEnvironmentUri string `json:"sourceEnvironmentUri,omitempty"` + // UpdateTime: Optional. The time at which the environment was last updated at + // the source. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudApihubV1SourceEnvironment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApihubV1SourceEnvironment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudApihubV1SourceMetadata: SourceMetadata represents the metadata // for a resource at the source. type GoogleCloudApihubV1SourceMetadata struct { @@ -5354,6 +5727,385 @@ func (c *ProjectsLocationsSearchResourcesCall) Pages(ctx context.Context, f func } } +type ProjectsLocationsAddonsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get an addon. +// +// - name: The name of the addon to get. Format: +// `projects/{project}/locations/{location}/addons/{addon}`. +func (r *ProjectsLocationsAddonsService) Get(name string) *ProjectsLocationsAddonsGetCall { + c := &ProjectsLocationsAddonsGetCall{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 +// details. +func (c *ProjectsLocationsAddonsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddonsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAddonsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddonsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAddonsGetCall) Context(ctx context.Context) *ProjectsLocationsAddonsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAddonsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddonsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apihub.projects.locations.addons.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApihubV1Addon.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 *ProjectsLocationsAddonsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Addon, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudApihubV1Addon{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsAddonsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List addons. +// +// - parent: The parent resource where this addon will be created. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsAddonsService) List(parent string) *ProjectsLocationsAddonsListCall { + c := &ProjectsLocationsAddonsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression that filters the +// list of addons. The only supported filter is `plugin_instance_name`. It can +// be used to filter addons that are enabled for a given plugin instance. The +// format of the filter is `plugin_instance_name = +// "projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance +// }". +func (c *ProjectsLocationsAddonsListCall) Filter(filter string) *ProjectsLocationsAddonsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of hub +// addons to return. The service may return fewer than this value. If +// unspecified, at most 50 hub addons will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsAddonsListCall) PageSize(pageSize int64) *ProjectsLocationsAddonsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListAddons` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters (except page_size) provided to +// `ListAddons` must match the call that provided the page token. +func (c *ProjectsLocationsAddonsListCall) PageToken(pageToken string) *ProjectsLocationsAddonsListCall { + 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 +// details. +func (c *ProjectsLocationsAddonsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddonsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAddonsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddonsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAddonsListCall) Context(ctx context.Context) *ProjectsLocationsAddonsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAddonsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddonsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/addons") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apihub.projects.locations.addons.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApihubV1ListAddonsResponse.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 *ProjectsLocationsAddonsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListAddonsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudApihubV1ListAddonsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *ProjectsLocationsAddonsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListAddonsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsAddonsManageConfigCall struct { + s *Service + name string + googlecloudapihubv1manageaddonconfigrequest *GoogleCloudApihubV1ManageAddonConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ManageConfig: Manage addon config. This RPC is used for managing the config +// of the addon. Calling this RPC moves the addon into an updating state until +// the long-running operation succeeds. +// +// - name: The name of the addon for which the config is to be managed. Format: +// `projects/{project}/locations/{location}/addons/{addon}`. +func (r *ProjectsLocationsAddonsService) ManageConfig(name string, googlecloudapihubv1manageaddonconfigrequest *GoogleCloudApihubV1ManageAddonConfigRequest) *ProjectsLocationsAddonsManageConfigCall { + c := &ProjectsLocationsAddonsManageConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapihubv1manageaddonconfigrequest = googlecloudapihubv1manageaddonconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAddonsManageConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddonsManageConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAddonsManageConfigCall) Context(ctx context.Context) *ProjectsLocationsAddonsManageConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAddonsManageConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddonsManageConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1manageaddonconfigrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:manageConfig") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.manageConfig", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apihub.projects.locations.addons.manageConfig" call. +// 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 *ProjectsLocationsAddonsManageConfigCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.manageConfig", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsApiHubInstancesCreateCall struct { s *Service parent string diff --git a/appengine/v1beta/appengine-api.json b/appengine/v1beta/appengine-api.json index fbad6357af6..47ec208eb59 100644 --- a/appengine/v1beta/appengine-api.json +++ b/appengine/v1beta/appengine-api.json @@ -2741,7 +2741,7 @@ } } }, - "revision": "20251103", + "revision": "20251110", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -5155,6 +5155,49 @@ "description": "Allows App Engine second generation runtimes to access the legacy bundled services.", "type": "boolean" }, + "appEngineBundledServices": { + "description": "List of specific App Engine Bundled Services that are enabled for this Version.", + "items": { + "enum": [ + "BUNDLED_SERVICE_TYPE_UNSPECIFIED", + "BUNDLED_SERVICE_TYPE_APP_IDENTITY_SERVICE", + "BUNDLED_SERVICE_TYPE_BLOBSTORE", + "BUNDLED_SERVICE_TYPE_CAPABILITY_SERVICE", + "BUNDLED_SERVICE_TYPE_DATASTORE_V3", + "BUNDLED_SERVICE_TYPE_DEFERRED", + "BUNDLED_SERVICE_TYPE_IMAGES", + "BUNDLED_SERVICE_TYPE_MAIL", + "BUNDLED_SERVICE_TYPE_MEMCACHE", + "BUNDLED_SERVICE_TYPE_MODULES", + "BUNDLED_SERVICE_TYPE_NAMESPACES", + "BUNDLED_SERVICE_TYPE_NDB", + "BUNDLED_SERVICE_TYPE_SEARCH", + "BUNDLED_SERVICE_TYPE_TASKQUEUES", + "BUNDLED_SERVICE_TYPE_URLFETCH", + "BUNDLED_SERVICE_TYPE_USERS" + ], + "enumDescriptions": [ + "Default, invalid value", + "App Identity Service", + "Blobstore", + "Capability Service", + "Datastore V3", + "Deferred", + "Images", + "Mail", + "Memcache", + "Modules", + "Namespaces", + "NDB", + "Search", + "Task Queues", + "URL Fetch", + "Users" + ], + "type": "string" + }, + "type": "array" + }, "automaticScaling": { "$ref": "AutomaticScaling", "description": "Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic." diff --git a/appengine/v1beta/appengine-gen.go b/appengine/v1beta/appengine-gen.go index 5682073cb6d..0e95665d229 100644 --- a/appengine/v1beta/appengine-gen.go +++ b/appengine/v1beta/appengine-gen.go @@ -3488,6 +3488,27 @@ type Version struct { // AppEngineApis: Allows App Engine second generation runtimes to access the // legacy bundled services. AppEngineApis bool `json:"appEngineApis,omitempty"` + // AppEngineBundledServices: List of specific App Engine Bundled Services that + // are enabled for this Version. + // + // Possible values: + // "BUNDLED_SERVICE_TYPE_UNSPECIFIED" - Default, invalid value + // "BUNDLED_SERVICE_TYPE_APP_IDENTITY_SERVICE" - App Identity Service + // "BUNDLED_SERVICE_TYPE_BLOBSTORE" - Blobstore + // "BUNDLED_SERVICE_TYPE_CAPABILITY_SERVICE" - Capability Service + // "BUNDLED_SERVICE_TYPE_DATASTORE_V3" - Datastore V3 + // "BUNDLED_SERVICE_TYPE_DEFERRED" - Deferred + // "BUNDLED_SERVICE_TYPE_IMAGES" - Images + // "BUNDLED_SERVICE_TYPE_MAIL" - Mail + // "BUNDLED_SERVICE_TYPE_MEMCACHE" - Memcache + // "BUNDLED_SERVICE_TYPE_MODULES" - Modules + // "BUNDLED_SERVICE_TYPE_NAMESPACES" - Namespaces + // "BUNDLED_SERVICE_TYPE_NDB" - NDB + // "BUNDLED_SERVICE_TYPE_SEARCH" - Search + // "BUNDLED_SERVICE_TYPE_TASKQUEUES" - Task Queues + // "BUNDLED_SERVICE_TYPE_URLFETCH" - URL Fetch + // "BUNDLED_SERVICE_TYPE_USERS" - Users + AppEngineBundledServices []string `json:"appEngineBundledServices,omitempty"` // AutomaticScaling: Automatic scaling is based on request rate, response // latencies, and other application metrics. Instances are dynamically created // and destroyed as needed in order to handle traffic. diff --git a/apphub/v1/apphub-api.json b/apphub/v1/apphub-api.json index 23bc8d57282..ed10a3dcdb5 100644 --- a/apphub/v1/apphub-api.json +++ b/apphub/v1/apphub-api.json @@ -162,6 +162,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getBoundary": { + "description": "Gets a Boundary.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/boundary", + "httpMethod": "GET", + "id": "apphub.projects.locations.getBoundary", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the boundary to retrieve. Format: projects/{project}/locations/{location}/boundary", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/boundary$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Boundary" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists information about the supported locations for this service.", "flatPath": "v1/projects/{projectsId}/locations", @@ -233,6 +258,45 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateBoundary": { + "description": "Updates a Boundary.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/boundary", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.updateBoundary", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the boundary. Format: \"projects/{project}/locations/{location}/boundary\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/boundary$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Boundary resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Boundary" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1194,7 +1258,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -1357,7 +1421,7 @@ } } }, - "revision": "20251028", + "revision": "20251114", "rootUrl": "https://apphub.googleapis.com/", "schemas": { "Application": { @@ -1527,6 +1591,50 @@ }, "type": "object" }, + "Boundary": { + "description": "Application management boundary.", + "id": "Boundary", + "properties": { + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "crmNode": { + "description": "Optional. The resource name of the CRM node being attached to the boundary. Format: `projects/{project-number}` or `projects/{project-id}`", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of the boundary. Format: \"projects/{project}/locations/{location}/boundary\"", + "type": "string" + }, + "type": { + "description": "Output only. Boundary type.", + "enum": [ + "TYPE_UNSPECIFIED", + "AUTOMATIC", + "MANUAL", + "MANAGED_AUTOMATIC" + ], + "enumDescriptions": [ + "Unspecified type.", + "The Boundary automatically includes all descendants of the CRM node.", + "The list of projects within the Boundary is managed by the user.", + "The Boundary automatically includes all descendants of the CRM node, which is set via App Management folder capability." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -1681,6 +1789,22 @@ }, "type": "object" }, + "ExtendedMetadata": { + "description": "Additional metadata for a Service or Workload.", + "id": "ExtendedMetadata", + "properties": { + "metadataStruct": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Output only. The metadata contents.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, "FunctionalType": { "description": "The functional type of a service or workload.", "id": "FunctionalType", @@ -1703,6 +1827,18 @@ }, "type": "object" }, + "Identity": { + "description": "The identity associated with a service or workload.", + "id": "Identity", + "properties": { + "principal": { + "description": "Output only. Principal of the identity. Supported formats: * `sa://my-sa@xxxx.iam.gserviceaccount.com` for GCP Service Account * `principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID` for Managed Workload Identity", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListApplicationsResponse": { "description": "Response for ListApplications.", "id": "ListApplicationsResponse", @@ -1812,7 +1948,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, @@ -2104,6 +2240,28 @@ }, "type": "object" }, + "RegistrationType": { + "description": "The registration type of a service.", + "id": "RegistrationType", + "properties": { + "type": { + "description": "Output only. The registration type of a service.", + "enum": [ + "TYPE_UNSPECIFIED", + "EXCLUSIVE", + "SHARED" + ], + "enumDescriptions": [ + "Unspecified registration type. Defaults to EXCLUSIVE.", + "The service can only be registered to one application.", + "The service can be registered to multiple applications." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Scope": { "description": "Scope of an application.", "id": "Scope", @@ -2245,6 +2403,14 @@ "description": "Properties of an underlying cloud resource that can comprise a Service.", "id": "ServiceProperties", "properties": { + "extendedMetadata": { + "additionalProperties": { + "$ref": "ExtendedMetadata" + }, + "description": "Output only. Additional metadata specific to the resource type. The key is a string that identifies the type of metadata and the value is the metadata contents specific to that type. Key format: `apphub.googleapis.com/{metadataType}`", + "readOnly": true, + "type": "object" + }, "functionalType": { "$ref": "FunctionalType", "description": "Output only. The type of the service.", @@ -2255,11 +2421,21 @@ "readOnly": true, "type": "string" }, + "identity": { + "$ref": "Identity", + "description": "Output only. The identity associated with the service.", + "readOnly": true + }, "location": { "description": "Output only. The location that the underlying resource resides in, for example, us-west1.", "readOnly": true, "type": "string" }, + "registrationType": { + "$ref": "RegistrationType", + "description": "Output only. The registration type of the service.", + "readOnly": true + }, "zone": { "description": "Output only. The location that the underlying resource resides in if it is zonal, for example, us-west1-a).", "readOnly": true, @@ -2428,6 +2604,14 @@ "description": "Properties of an underlying compute resource represented by the Workload.", "id": "WorkloadProperties", "properties": { + "extendedMetadata": { + "additionalProperties": { + "$ref": "ExtendedMetadata" + }, + "description": "Output only. Additional metadata specific to the resource type. The key is a string that identifies the type of metadata and the value is the metadata contents specific to that type. Key format: `apphub.googleapis.com/{metadataType}`", + "readOnly": true, + "type": "object" + }, "functionalType": { "$ref": "FunctionalType", "description": "Output only. The type of the workload.", @@ -2438,6 +2622,11 @@ "readOnly": true, "type": "string" }, + "identity": { + "$ref": "Identity", + "description": "Output only. The identity associated with the workload.", + "readOnly": true + }, "location": { "description": "Output only. The location that the underlying compute resource resides in (for example, us-west1).", "readOnly": true, diff --git a/apphub/v1/apphub-gen.go b/apphub/v1/apphub-gen.go index 40bc12a854a..08694895b18 100644 --- a/apphub/v1/apphub-gen.go +++ b/apphub/v1/apphub-gen.go @@ -521,6 +521,50 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Boundary: Application management boundary. +type Boundary struct { + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + // CrmNode: Optional. The resource name of the CRM node being attached to the + // boundary. Format: `projects/{project-number}` or `projects/{project-id}` + CrmNode string `json:"crmNode,omitempty"` + // Name: Identifier. The resource name of the boundary. Format: + // "projects/{project}/locations/{location}/boundary" + Name string `json:"name,omitempty"` + // Type: Output only. Boundary type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "AUTOMATIC" - The Boundary automatically includes all descendants of the + // CRM node. + // "MANUAL" - The list of projects within the Boundary is managed by the + // user. + // "MANAGED_AUTOMATIC" - The Boundary automatically includes all descendants + // of the CRM node, which is set via App Management folder capability. + Type string `json:"type,omitempty"` + // UpdateTime: Output only. Update time. + 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. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Boundary) MarshalJSON() ([]byte, error) { + type NoMethod Boundary + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: The request message for Operations.CancelOperation. type CancelOperationRequest struct { } @@ -747,6 +791,28 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExtendedMetadata: Additional metadata for a Service or Workload. +type ExtendedMetadata struct { + // MetadataStruct: Output only. The metadata contents. + MetadataStruct googleapi.RawMessage `json:"metadataStruct,omitempty"` + // ForceSendFields is a list of field names (e.g. "MetadataStruct") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MetadataStruct") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExtendedMetadata) MarshalJSON() ([]byte, error) { + type NoMethod ExtendedMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // FunctionalType: The functional type of a service or workload. type FunctionalType struct { // Type: Output only. The functional type of a service or workload. @@ -774,6 +840,31 @@ func (s FunctionalType) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Identity: The identity associated with a service or workload. +type Identity struct { + // Principal: Output only. Principal of the identity. Supported formats: * + // `sa://my-sa@xxxx.iam.gserviceaccount.com` for GCP Service Account * + // `principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/s + // a/MANAGED_IDENTITY_ID` for Managed Workload Identity + Principal string `json:"principal,omitempty"` + // ForceSendFields is a list of field names (e.g. "Principal") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Principal") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Identity) MarshalJSON() ([]byte, error) { + type NoMethod Identity + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListApplicationsResponse: Response for ListApplications. type ListApplicationsResponse struct { // Applications: List of Applications. @@ -901,8 +992,8 @@ type ListOperationsResponse struct { Operations []*Operation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1343,6 +1434,33 @@ func (s ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RegistrationType: The registration type of a service. +type RegistrationType struct { + // Type: Output only. The registration type of a service. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified registration type. Defaults to EXCLUSIVE. + // "EXCLUSIVE" - The service can only be registered to one application. + // "SHARED" - The service can be registered to multiple applications. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Type") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegistrationType) MarshalJSON() ([]byte, error) { + type NoMethod RegistrationType + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Scope: Scope of an application. type Scope struct { // Type: Required. Scope Type. @@ -1487,24 +1605,33 @@ func (s ServiceProjectAttachment) MarshalJSON() ([]byte, error) { // ServiceProperties: Properties of an underlying cloud resource that can // comprise a Service. type ServiceProperties struct { + // ExtendedMetadata: Output only. Additional metadata specific to the resource + // type. The key is a string that identifies the type of metadata and the value + // is the metadata contents specific to that type. Key format: + // `apphub.googleapis.com/{metadataType}` + ExtendedMetadata map[string]ExtendedMetadata `json:"extendedMetadata,omitempty"` // FunctionalType: Output only. The type of the service. FunctionalType *FunctionalType `json:"functionalType,omitempty"` // GcpProject: Output only. The service project identifier that the underlying // cloud resource resides in. GcpProject string `json:"gcpProject,omitempty"` + // Identity: Output only. The identity associated with the service. + Identity *Identity `json:"identity,omitempty"` // Location: Output only. The location that the underlying resource resides in, // for example, us-west1. Location string `json:"location,omitempty"` + // RegistrationType: Output only. The registration type of the service. + RegistrationType *RegistrationType `json:"registrationType,omitempty"` // Zone: Output only. The location that the underlying resource resides in if // it is zonal, for example, us-west1-a). Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "FunctionalType") to + // ForceSendFields is a list of field names (e.g. "ExtendedMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FunctionalType") to include in + // NullFields is a list of field names (e.g. "ExtendedMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -1721,24 +1848,31 @@ func (s Workload) MarshalJSON() ([]byte, error) { // WorkloadProperties: Properties of an underlying compute resource represented // by the Workload. type WorkloadProperties struct { + // ExtendedMetadata: Output only. Additional metadata specific to the resource + // type. The key is a string that identifies the type of metadata and the value + // is the metadata contents specific to that type. Key format: + // `apphub.googleapis.com/{metadataType}` + ExtendedMetadata map[string]ExtendedMetadata `json:"extendedMetadata,omitempty"` // FunctionalType: Output only. The type of the workload. FunctionalType *FunctionalType `json:"functionalType,omitempty"` // GcpProject: Output only. The service project identifier that the underlying // cloud resource resides in. Empty for non-cloud resources. GcpProject string `json:"gcpProject,omitempty"` + // Identity: Output only. The identity associated with the workload. + Identity *Identity `json:"identity,omitempty"` // Location: Output only. The location that the underlying compute resource // resides in (for example, us-west1). Location string `json:"location,omitempty"` // Zone: Output only. The location that the underlying compute resource resides // in if it is zonal (for example, us-west1-a). Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "FunctionalType") to + // ForceSendFields is a list of field names (e.g. "ExtendedMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FunctionalType") to include in + // NullFields is a list of field names (e.g. "ExtendedMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -1990,6 +2124,116 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, return ret, nil } +type ProjectsLocationsGetBoundaryCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetBoundary: Gets a Boundary. +// +// - name: The name of the boundary to retrieve. Format: +// projects/{project}/locations/{location}/boundary. +func (r *ProjectsLocationsService) GetBoundary(name string) *ProjectsLocationsGetBoundaryCall { + c := &ProjectsLocationsGetBoundaryCall{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 +// details. +func (c *ProjectsLocationsGetBoundaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetBoundaryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGetBoundaryCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetBoundaryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetBoundaryCall) Context(ctx context.Context) *ProjectsLocationsGetBoundaryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetBoundaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetBoundaryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apphub.projects.locations.getBoundary", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.getBoundary" call. +// Any non-2xx status code is an error. Response headers are in either +// *Boundary.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 *ProjectsLocationsGetBoundaryCall) Do(opts ...googleapi.CallOption) (*Boundary, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Boundary{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apphub.projects.locations.getBoundary", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsListCall struct { s *APIService name string @@ -2267,6 +2511,137 @@ func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Do(opts ...googlea return ret, nil } +type ProjectsLocationsUpdateBoundaryCall struct { + s *APIService + name string + boundary *Boundary + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateBoundary: Updates a Boundary. +// +// - name: Identifier. The resource name of the boundary. Format: +// "projects/{project}/locations/{location}/boundary". +func (r *ProjectsLocationsService) UpdateBoundary(name string, boundary *Boundary) *ProjectsLocationsUpdateBoundaryCall { + c := &ProjectsLocationsUpdateBoundaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.boundary = boundary + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsUpdateBoundaryCall) RequestId(requestId string) *ProjectsLocationsUpdateBoundaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Boundary resource by the +// update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsUpdateBoundaryCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateBoundaryCall { + 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 +// details. +func (c *ProjectsLocationsUpdateBoundaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateBoundaryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUpdateBoundaryCall) Context(ctx context.Context) *ProjectsLocationsUpdateBoundaryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUpdateBoundaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateBoundaryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.boundary) + if err != nil { + return nil, err + } + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apphub.projects.locations.updateBoundary", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.updateBoundary" call. +// 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 *ProjectsLocationsUpdateBoundaryCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apphub.projects.locations.updateBoundary", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsApplicationsCreateCall struct { s *APIService parent string @@ -5717,9 +6092,9 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { diff --git a/apphub/v1alpha/apphub-api.json b/apphub/v1alpha/apphub-api.json index 35cb49981ef..4cd6a20b0fb 100644 --- a/apphub/v1alpha/apphub-api.json +++ b/apphub/v1alpha/apphub-api.json @@ -162,6 +162,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getBoundary": { + "description": "Gets a Boundary.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/boundary", + "httpMethod": "GET", + "id": "apphub.projects.locations.getBoundary", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the boundary to retrieve. Format: projects/{project}/locations/{location}/boundary", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/boundary$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Boundary" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists information about the supported locations for this service.", "flatPath": "v1alpha/projects/{projectsId}/locations", @@ -233,6 +258,45 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateBoundary": { + "description": "Updates a Boundary.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/boundary", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.updateBoundary", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the boundary. Format: \"projects/{project}/locations/{location}/boundary\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/boundary$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Boundary resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Boundary" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1286,7 +1350,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -1449,7 +1513,7 @@ } } }, - "revision": "20251028", + "revision": "20251114", "rootUrl": "https://apphub.googleapis.com/", "schemas": { "Application": { @@ -1619,6 +1683,50 @@ }, "type": "object" }, + "Boundary": { + "description": "Application management boundary.", + "id": "Boundary", + "properties": { + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "crmNode": { + "description": "Optional. The resource name of the CRM node being attached to the boundary. Format: `projects/{project-number}` or `projects/{project-id}`", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of the boundary. Format: \"projects/{project}/locations/{location}/boundary\"", + "type": "string" + }, + "type": { + "description": "Output only. Boundary type.", + "enum": [ + "TYPE_UNSPECIFIED", + "AUTOMATIC", + "MANUAL", + "MANAGED_AUTOMATIC" + ], + "enumDescriptions": [ + "Unspecified type.", + "The Boundary automatically includes all descendants of the CRM node.", + "The list of projects within the Boundary is managed by the user.", + "The Boundary automatically includes all descendants of the CRM node, which is set via App Management folder capability." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -1803,6 +1911,22 @@ }, "type": "object" }, + "ExtendedMetadata": { + "description": "Additional metadata for a Service or Workload.", + "id": "ExtendedMetadata", + "properties": { + "metadataStruct": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Output only. The metadata contents.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, "FindUnregisteredServicesResponse": { "description": "Response for FindUnregisteredServices.", "id": "FindUnregisteredServicesResponse", @@ -1875,6 +1999,18 @@ }, "type": "object" }, + "Identity": { + "description": "The identity associated with a service or workload.", + "id": "Identity", + "properties": { + "principal": { + "description": "Output only. Principal of the identity. Supported formats: * `sa://my-sa@xxxx.iam.gserviceaccount.com` for GCP Service Account * `principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID` for Managed Workload Identity", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListApplicationsResponse": { "description": "Response for ListApplications.", "id": "ListApplicationsResponse", @@ -1984,7 +2120,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, @@ -2245,6 +2381,28 @@ }, "type": "object" }, + "RegistrationType": { + "description": "The registration type of a service.", + "id": "RegistrationType", + "properties": { + "type": { + "description": "Output only. The registration type of a service.", + "enum": [ + "TYPE_UNSPECIFIED", + "EXCLUSIVE", + "SHARED" + ], + "enumDescriptions": [ + "Unspecified registration type. Defaults to EXCLUSIVE.", + "The service can only be registered to one application.", + "The service can be registered to multiple applications." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Scope": { "description": "Scope of an application.", "id": "Scope", @@ -2386,6 +2544,14 @@ "description": "Properties of an underlying cloud resource that can comprise a Service.", "id": "ServiceProperties", "properties": { + "extendedMetadata": { + "additionalProperties": { + "$ref": "ExtendedMetadata" + }, + "description": "Output only. Additional metadata specific to the resource type. The key is a string that identifies the type of metadata and the value is the metadata contents specific to that type. Key format: `apphub.googleapis.com/{metadataType}`", + "readOnly": true, + "type": "object" + }, "functionalType": { "$ref": "FunctionalType", "description": "Output only. The type of the service.", @@ -2396,11 +2562,21 @@ "readOnly": true, "type": "string" }, + "identity": { + "$ref": "Identity", + "description": "Output only. The identity associated with the service.", + "readOnly": true + }, "location": { "description": "Output only. The location that the underlying resource resides in, for example, us-west1.", "readOnly": true, "type": "string" }, + "registrationType": { + "$ref": "RegistrationType", + "description": "Output only. The registration type of the service.", + "readOnly": true + }, "zone": { "description": "Output only. The location that the underlying resource resides in if it is zonal, for example, us-west1-a).", "readOnly": true, @@ -2574,6 +2750,14 @@ "description": "Properties of an underlying compute resource represented by the Workload.", "id": "WorkloadProperties", "properties": { + "extendedMetadata": { + "additionalProperties": { + "$ref": "ExtendedMetadata" + }, + "description": "Output only. Additional metadata specific to the resource type. The key is a string that identifies the type of metadata and the value is the metadata contents specific to that type. Key format: `apphub.googleapis.com/{metadataType}`", + "readOnly": true, + "type": "object" + }, "functionalType": { "$ref": "FunctionalType", "description": "Output only. The type of the workload.", @@ -2584,6 +2768,11 @@ "readOnly": true, "type": "string" }, + "identity": { + "$ref": "Identity", + "description": "Output only. The identity associated with the workload.", + "readOnly": true + }, "location": { "description": "Output only. The location that the underlying compute resource resides in (for example, us-west1).", "readOnly": true, diff --git a/apphub/v1alpha/apphub-gen.go b/apphub/v1alpha/apphub-gen.go index 8e1fd38c3db..d7cc4019afd 100644 --- a/apphub/v1alpha/apphub-gen.go +++ b/apphub/v1alpha/apphub-gen.go @@ -521,6 +521,50 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Boundary: Application management boundary. +type Boundary struct { + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + // CrmNode: Optional. The resource name of the CRM node being attached to the + // boundary. Format: `projects/{project-number}` or `projects/{project-id}` + CrmNode string `json:"crmNode,omitempty"` + // Name: Identifier. The resource name of the boundary. Format: + // "projects/{project}/locations/{location}/boundary" + Name string `json:"name,omitempty"` + // Type: Output only. Boundary type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "AUTOMATIC" - The Boundary automatically includes all descendants of the + // CRM node. + // "MANUAL" - The list of projects within the Boundary is managed by the + // user. + // "MANAGED_AUTOMATIC" - The Boundary automatically includes all descendants + // of the CRM node, which is set via App Management folder capability. + Type string `json:"type,omitempty"` + // UpdateTime: Output only. Update time. + 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. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Boundary) MarshalJSON() ([]byte, error) { + type NoMethod Boundary + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: The request message for Operations.CancelOperation. type CancelOperationRequest struct { } @@ -783,6 +827,28 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExtendedMetadata: Additional metadata for a Service or Workload. +type ExtendedMetadata struct { + // MetadataStruct: Output only. The metadata contents. + MetadataStruct googleapi.RawMessage `json:"metadataStruct,omitempty"` + // ForceSendFields is a list of field names (e.g. "MetadataStruct") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MetadataStruct") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExtendedMetadata) MarshalJSON() ([]byte, error) { + type NoMethod ExtendedMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // FindUnregisteredServicesResponse: Response for FindUnregisteredServices. type FindUnregisteredServicesResponse struct { // DiscoveredServices: List of Discovered Services. @@ -870,6 +936,31 @@ func (s FunctionalType) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Identity: The identity associated with a service or workload. +type Identity struct { + // Principal: Output only. Principal of the identity. Supported formats: * + // `sa://my-sa@xxxx.iam.gserviceaccount.com` for GCP Service Account * + // `principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/s + // a/MANAGED_IDENTITY_ID` for Managed Workload Identity + Principal string `json:"principal,omitempty"` + // ForceSendFields is a list of field names (e.g. "Principal") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Principal") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Identity) MarshalJSON() ([]byte, error) { + type NoMethod Identity + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListApplicationsResponse: Response for ListApplications. type ListApplicationsResponse struct { // Applications: List of Applications. @@ -997,8 +1088,8 @@ type ListOperationsResponse struct { Operations []*Operation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1404,6 +1495,33 @@ func (s Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RegistrationType: The registration type of a service. +type RegistrationType struct { + // Type: Output only. The registration type of a service. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified registration type. Defaults to EXCLUSIVE. + // "EXCLUSIVE" - The service can only be registered to one application. + // "SHARED" - The service can be registered to multiple applications. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Type") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegistrationType) MarshalJSON() ([]byte, error) { + type NoMethod RegistrationType + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Scope: Scope of an application. type Scope struct { // Type: Required. Scope Type. @@ -1548,24 +1666,33 @@ func (s ServiceProjectAttachment) MarshalJSON() ([]byte, error) { // ServiceProperties: Properties of an underlying cloud resource that can // comprise a Service. type ServiceProperties struct { + // ExtendedMetadata: Output only. Additional metadata specific to the resource + // type. The key is a string that identifies the type of metadata and the value + // is the metadata contents specific to that type. Key format: + // `apphub.googleapis.com/{metadataType}` + ExtendedMetadata map[string]ExtendedMetadata `json:"extendedMetadata,omitempty"` // FunctionalType: Output only. The type of the service. FunctionalType *FunctionalType `json:"functionalType,omitempty"` // GcpProject: Output only. The service project identifier that the underlying // cloud resource resides in. GcpProject string `json:"gcpProject,omitempty"` + // Identity: Output only. The identity associated with the service. + Identity *Identity `json:"identity,omitempty"` // Location: Output only. The location that the underlying resource resides in, // for example, us-west1. Location string `json:"location,omitempty"` + // RegistrationType: Output only. The registration type of the service. + RegistrationType *RegistrationType `json:"registrationType,omitempty"` // Zone: Output only. The location that the underlying resource resides in if // it is zonal, for example, us-west1-a). Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "FunctionalType") to + // ForceSendFields is a list of field names (e.g. "ExtendedMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FunctionalType") to include in + // NullFields is a list of field names (e.g. "ExtendedMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -1786,24 +1913,31 @@ func (s Workload) MarshalJSON() ([]byte, error) { // WorkloadProperties: Properties of an underlying compute resource represented // by the Workload. type WorkloadProperties struct { + // ExtendedMetadata: Output only. Additional metadata specific to the resource + // type. The key is a string that identifies the type of metadata and the value + // is the metadata contents specific to that type. Key format: + // `apphub.googleapis.com/{metadataType}` + ExtendedMetadata map[string]ExtendedMetadata `json:"extendedMetadata,omitempty"` // FunctionalType: Output only. The type of the workload. FunctionalType *FunctionalType `json:"functionalType,omitempty"` // GcpProject: Output only. The service project identifier that the underlying // cloud resource resides in. Empty for non-cloud resources. GcpProject string `json:"gcpProject,omitempty"` + // Identity: Output only. The identity associated with the workload. + Identity *Identity `json:"identity,omitempty"` // Location: Output only. The location that the underlying compute resource // resides in (for example, us-west1). Location string `json:"location,omitempty"` // Zone: Output only. The location that the underlying compute resource resides // in if it is zonal (for example, us-west1-a). Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "FunctionalType") to + // ForceSendFields is a list of field names (e.g. "ExtendedMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FunctionalType") to include in + // NullFields is a list of field names (e.g. "ExtendedMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -2055,6 +2189,116 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, return ret, nil } +type ProjectsLocationsGetBoundaryCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetBoundary: Gets a Boundary. +// +// - name: The name of the boundary to retrieve. Format: +// projects/{project}/locations/{location}/boundary. +func (r *ProjectsLocationsService) GetBoundary(name string) *ProjectsLocationsGetBoundaryCall { + c := &ProjectsLocationsGetBoundaryCall{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 +// details. +func (c *ProjectsLocationsGetBoundaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetBoundaryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGetBoundaryCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetBoundaryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetBoundaryCall) Context(ctx context.Context) *ProjectsLocationsGetBoundaryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetBoundaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetBoundaryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apphub.projects.locations.getBoundary", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.getBoundary" call. +// Any non-2xx status code is an error. Response headers are in either +// *Boundary.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 *ProjectsLocationsGetBoundaryCall) Do(opts ...googleapi.CallOption) (*Boundary, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Boundary{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apphub.projects.locations.getBoundary", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsListCall struct { s *APIService name string @@ -2332,6 +2576,137 @@ func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Do(opts ...googlea return ret, nil } +type ProjectsLocationsUpdateBoundaryCall struct { + s *APIService + name string + boundary *Boundary + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateBoundary: Updates a Boundary. +// +// - name: Identifier. The resource name of the boundary. Format: +// "projects/{project}/locations/{location}/boundary". +func (r *ProjectsLocationsService) UpdateBoundary(name string, boundary *Boundary) *ProjectsLocationsUpdateBoundaryCall { + c := &ProjectsLocationsUpdateBoundaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.boundary = boundary + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsUpdateBoundaryCall) RequestId(requestId string) *ProjectsLocationsUpdateBoundaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Boundary resource by the +// update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsUpdateBoundaryCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateBoundaryCall { + 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 +// details. +func (c *ProjectsLocationsUpdateBoundaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateBoundaryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUpdateBoundaryCall) Context(ctx context.Context) *ProjectsLocationsUpdateBoundaryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUpdateBoundaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateBoundaryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.boundary) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apphub.projects.locations.updateBoundary", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.updateBoundary" call. +// 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 *ProjectsLocationsUpdateBoundaryCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apphub.projects.locations.updateBoundary", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsApplicationsCreateCall struct { s *APIService parent string @@ -6104,9 +6479,9 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index e81b218474d..a9828fa0b58 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -473,7 +473,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -2493,7 +2493,7 @@ } } }, - "revision": "20251017", + "revision": "20251029", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 906249d7ca0..a031611b6dc 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -4106,9 +4106,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index a80b0dea94c..326da5f5d82 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -385,7 +385,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -1182,7 +1182,7 @@ } } }, - "revision": "20250925", + "revision": "20251029", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index 88334f72414..f62b42d1474 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -1233,9 +1233,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 44991616368..d990e10cb23 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -447,7 +447,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -1450,7 +1450,7 @@ } } }, - "revision": "20250925", + "revision": "20251029", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 50c9e56a5e6..2861592acec 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -1970,9 +1970,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index 4af4e0cb059..5037270a998 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -2234,7 +2234,7 @@ } } }, - "revision": "20251029", + "revision": "20251105", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -2646,6 +2646,21 @@ }, "type": "array" }, + "backupRetentionInheritance": { + "description": "Output only. Setting for how the enforced retention end time is inherited. This value is copied from this backup's BackupVault.", + "enum": [ + "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED", + "INHERIT_VAULT_RETENTION", + "MATCH_BACKUP_EXPIRE_TIME" + ], + "enumDescriptions": [ + "Inheritance behavior not set. This will default to `INHERIT_VAULT_RETENTION`.", + "The enforced retention end time of a backup will be inherited from the backup vault's `backup_minimum_enforced_retention_duration` field. This is the default behavior.", + "The enforced retention end time of a backup will always match the expire time of the backup. If this is set, the backup's enforced retention end time will be set to match the expire time during creation of the backup. When updating, the ERET and expire time must be updated together and have the same value. Invalid update requests will be rejected by the server." + ], + "readOnly": true, + "type": "string" + }, "backupType": { "description": "Output only. Type of the backup, unspecified, scheduled or ondemand.", "enum": [ @@ -2719,6 +2734,14 @@ "description": "Output only. Unique identifier of the GCP resource that is being backed up.", "readOnly": true }, + "kmsKeyVersions": { + "description": "Optional. Output only. The list of KMS key versions used to encrypt the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "labels": { "additionalProperties": { "type": "string" @@ -3435,6 +3458,20 @@ "format": "google-duration", "type": "string" }, + "backupRetentionInheritance": { + "description": "Optional. Setting for how a backup's enforced retention end time is inherited.", + "enum": [ + "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED", + "INHERIT_VAULT_RETENTION", + "MATCH_BACKUP_EXPIRE_TIME" + ], + "enumDescriptions": [ + "Inheritance behavior not set. This will default to `INHERIT_VAULT_RETENTION`.", + "The enforced retention end time of a backup will be inherited from the backup vault's `backup_minimum_enforced_retention_duration` field. This is the default behavior.", + "The enforced retention end time of a backup will always match the expire time of the backup. If this is set, the backup's enforced retention end time will be set to match the expire time during creation of the backup. When updating, the ERET and expire time must be updated together and have the same value. Invalid update requests will be rejected by the server." + ], + "type": "string" + }, "createTime": { "description": "Output only. The time when the instance was created.", "format": "google-datetime", @@ -3455,6 +3492,10 @@ "format": "google-datetime", "type": "string" }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config of the backup vault." + }, "etag": { "description": "Optional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other.", "type": "string" @@ -4566,6 +4607,17 @@ "properties": {}, "type": "object" }, + "EncryptionConfig": { + "description": "Message describing the EncryptionConfig of backup vault. This determines how data within the vault is encrypted at rest.", + "id": "EncryptionConfig", + "properties": { + "kmsKeyName": { + "description": "Optional. The Cloud KMS key name to encrypt backups in this backup vault. Must be in the same region as the vault. Some workload backups like compute disk backups may use their inherited source key instead. Format: projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}", + "type": "string" + } + }, + "type": "object" + }, "Entry": { "description": "A key/value pair to be used for storing metadata.", "id": "Entry", @@ -5879,6 +5931,11 @@ "description": "Request message for restoring from a Backup.", "id": "RestoreBackupRequest", "properties": { + "clearOverridesFieldMask": { + "description": "Optional. A field mask used to clear server-side default values for fields within the `instance_properties` oneof. When a field in this mask is cleared, the server will not apply its default logic (like inheriting a value from the source) for that field. The most common current use case is clearing default encryption keys. Examples of field mask paths: - Compute Instance Disks: `compute_instance_restore_properties.disks.*.disk_encryption_key` - Single Disk: `disk_restore_properties.disk_encryption_key`", + "format": "google-fieldmask", + "type": "string" + }, "computeInstanceRestoreProperties": { "$ref": "ComputeInstanceRestoreProperties", "description": "Compute Engine instance properties to be overridden during restore." @@ -6402,6 +6459,13 @@ "format": "int32", "type": "integer" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels to be applied on the backup.", + "type": "object" + }, "requestId": { "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "type": "string" diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index fa27098024b..b4c3432f6ed 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -774,6 +774,24 @@ type Backup struct { // BackupApplianceLocks: Optional. The list of BackupLocks taken by the // accessor Backup Appliance. BackupApplianceLocks []*BackupLock `json:"backupApplianceLocks,omitempty"` + // BackupRetentionInheritance: Output only. Setting for how the enforced + // retention end time is inherited. This value is copied from this backup's + // BackupVault. + // + // Possible values: + // "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED" - Inheritance behavior not set. + // This will default to `INHERIT_VAULT_RETENTION`. + // "INHERIT_VAULT_RETENTION" - The enforced retention end time of a backup + // will be inherited from the backup vault's + // `backup_minimum_enforced_retention_duration` field. This is the default + // behavior. + // "MATCH_BACKUP_EXPIRE_TIME" - The enforced retention end time of a backup + // will always match the expire time of the backup. If this is set, the + // backup's enforced retention end time will be set to match the expire time + // during creation of the backup. When updating, the ERET and expire time must + // be updated together and have the same value. Invalid update requests will be + // rejected by the server. + BackupRetentionInheritance string `json:"backupRetentionInheritance,omitempty"` // BackupType: Output only. Type of the backup, unspecified, scheduled or // ondemand. // @@ -812,6 +830,9 @@ type Backup struct { // GcpResource: Output only. Unique identifier of the GCP resource that is // being backed up. GcpResource *BackupGcpResource `json:"gcpResource,omitempty"` + // KmsKeyVersions: Optional. Output only. The list of KMS key versions used to + // encrypt the backup. + KmsKeyVersions []string `json:"kmsKeyVersions,omitempty"` // Labels: Optional. Resource labels to represent user provided metadata. No // labels currently defined. Labels map[string]string `json:"labels,omitempty"` @@ -1537,6 +1558,23 @@ type BackupVault struct { // retention period impacts potential storage costs post introductory trial. We // recommend starting with a short duration of 3 days or less. BackupMinimumEnforcedRetentionDuration string `json:"backupMinimumEnforcedRetentionDuration,omitempty"` + // BackupRetentionInheritance: Optional. Setting for how a backup's enforced + // retention end time is inherited. + // + // Possible values: + // "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED" - Inheritance behavior not set. + // This will default to `INHERIT_VAULT_RETENTION`. + // "INHERIT_VAULT_RETENTION" - The enforced retention end time of a backup + // will be inherited from the backup vault's + // `backup_minimum_enforced_retention_duration` field. This is the default + // behavior. + // "MATCH_BACKUP_EXPIRE_TIME" - The enforced retention end time of a backup + // will always match the expire time of the backup. If this is set, the + // backup's enforced retention end time will be set to match the expire time + // during creation of the backup. When updating, the ERET and expire time must + // be updated together and have the same value. Invalid update requests will be + // rejected by the server. + BackupRetentionInheritance string `json:"backupRetentionInheritance,omitempty"` // CreateTime: Output only. The time when the instance was created. CreateTime string `json:"createTime,omitempty"` // Deletable: Output only. Set to true when there are no backups nested under @@ -1548,6 +1586,8 @@ type BackupVault struct { // EffectiveTime: Optional. Time after which the BackupVault resource is // locked. EffectiveTime string `json:"effectiveTime,omitempty"` + // EncryptionConfig: Optional. The encryption config of the backup vault. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` // Etag: Optional. Server specified ETag for the backup vault resource to // prevent simultaneous updates from overwiting each other. Etag string `json:"etag,omitempty"` @@ -2738,6 +2778,33 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// EncryptionConfig: Message describing the EncryptionConfig of backup vault. +// This determines how data within the vault is encrypted at rest. +type EncryptionConfig struct { + // KmsKeyName: Optional. The Cloud KMS key name to encrypt backups in this + // backup vault. Must be in the same region as the vault. Some workload backups + // like compute disk backups may use their inherited source key instead. + // Format: + // projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key} + KmsKeyName string `json:"kmsKeyName,omitempty"` + // ForceSendFields is a list of field names (e.g. "KmsKeyName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "KmsKeyName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s EncryptionConfig) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Entry: A key/value pair to be used for storing metadata. type Entry struct { // Key: Optional. Key for the metadata entry. @@ -4461,6 +4528,15 @@ func (s ResourceBackupConfig) MarshalJSON() ([]byte, error) { // RestoreBackupRequest: Request message for restoring from a Backup. type RestoreBackupRequest struct { + // ClearOverridesFieldMask: Optional. A field mask used to clear server-side + // default values for fields within the `instance_properties` oneof. When a + // field in this mask is cleared, the server will not apply its default logic + // (like inheriting a value from the source) for that field. The most common + // current use case is clearing default encryption keys. Examples of field mask + // paths: - Compute Instance Disks: + // `compute_instance_restore_properties.disks.*.disk_encryption_key` - Single + // Disk: `disk_restore_properties.disk_encryption_key` + ClearOverridesFieldMask string `json:"clearOverridesFieldMask,omitempty"` // ComputeInstanceRestoreProperties: Compute Engine instance properties to be // overridden during restore. ComputeInstanceRestoreProperties *ComputeInstanceRestoreProperties `json:"computeInstanceRestoreProperties,omitempty"` @@ -4486,18 +4562,16 @@ type RestoreBackupRequest struct { // exception that zero UUID is not supported // (00000000-0000-0000-0000-000000000000). RequestId string `json:"requestId,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ComputeInstanceRestoreProperties") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See + // ForceSendFields is a list of field names (e.g. "ClearOverridesFieldMask") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "ComputeInstanceRestoreProperties") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. + // NullFields is a list of field names (e.g. "ClearOverridesFieldMask") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -5079,6 +5153,8 @@ type TriggerBackupRequest struct { // in "days". It is mutually exclusive with rule_id. This field is required if // rule_id is not provided. CustomRetentionDays int64 `json:"customRetentionDays,omitempty"` + // Labels: Optional. Labels to be applied on the backup. + Labels map[string]string `json:"labels,omitempty"` // RequestId: Optional. An optional request ID to identify requests. Specify a // unique request ID so that if you must retry your request, the server will // know to ignore the request if it has already been completed. The server will diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index 3248f26e40c..102edd0c4c8 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://beyondcorp.googleapis.com/", "batchPath": "batch", "canonicalName": "BeyondCorp", - "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity solutions.", + "description": "Chrome Enterprise Premium is a secure enterprise browsing solution that provides secure access to applications and resources, and offers integrated threat and data protection. It adds an extra layer of security to safeguard your Chrome browser environment, including Data Loss Prevention (DLP), real-time URL and file scanning, and Context-Aware Access for SaaS and web apps.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/", "fullyEncodeReservedExpansion": true, @@ -280,7 +280,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -1909,7 +1909,7 @@ } } }, - "revision": "20250930", + "revision": "20251029", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -3157,7 +3157,7 @@ "type": "string" }, "endpointMatchers": { - "description": "Required. Endpoint matchers associated with an application. A combination of hostname and ports as endpoint matchers is used to match the application. Match conditions for OR logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if one of the conditions is met. The conditions should be the following combination: (Hostname \u0026 Ports) EXAMPLES: Hostname and Ports - (\"*.example.com\", \"443\"), (\"example.com\" and \"22\"), (\"example.com\" and \"22,33\") etc", + "description": "Optional. An array of conditions to match the application's network endpoint. Each element in the array is an EndpointMatcher object, which defines a specific combination of a hostname pattern and one or more ports. The application is considered matched if at least one of the EndpointMatcher conditions in this array is met (the conditions are combined using OR logic). Each EndpointMatcher must contain a hostname pattern, such as \"example.com\", and one or more port numbers specified as a string, such as \"443\". Hostname and port number examples: \"*.example.com\", \"443\" \"example.com\" and \"22\" \"example.com\" and \"22,33\"", "items": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1EndpointMatcher" }, @@ -3251,11 +3251,11 @@ "properties": { "deviceInfo": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceInfo", - "description": "Optional. Device info configuration." + "description": "Optional. The device information configuration." }, "groupInfo": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupInfo", - "description": "Optional. Group info configuration." + "description": "Optional. Group details." }, "outputType": { "description": "Optional. Default output type for all enabled headers.", @@ -3266,7 +3266,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -3275,17 +3275,17 @@ }, "userInfo": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedUserInfo", - "description": "Optional. User info configuration." + "description": "Optional. User details." } }, "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceInfo": { - "description": "Delegated device info configuration.", + "description": "The delegated device information configuration.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceInfo", "properties": { "outputType": { - "description": "Optional. The output type of the delegated device info.", + "description": "Optional. The output type details for the delegated device.", "enum": [ "OUTPUT_TYPE_UNSPECIFIED", "PROTOBUF", @@ -3293,7 +3293,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -3304,11 +3304,11 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupInfo": { - "description": "Delegated group info configuration.", + "description": "The delegated group configuration details.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupInfo", "properties": { "outputType": { - "description": "Optional. The output type of the delegated group info.", + "description": "Optional. The output type of the delegated group information.", "enum": [ "OUTPUT_TYPE_UNSPECIFIED", "PROTOBUF", @@ -3316,7 +3316,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -3327,11 +3327,11 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedUserInfo": { - "description": "Delegated user info configuration.", + "description": "The configuration information for the delegated user.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedUserInfo", "properties": { "outputType": { - "description": "Optional. The output type of the delegated user info.", + "description": "Optional. The delegated user's information.", "enum": [ "OUTPUT_TYPE_UNSPECIFIED", "PROTOBUF", @@ -3339,7 +3339,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -3388,7 +3388,7 @@ "type": "string" }, "ports": { - "description": "Required. Ports of the application.", + "description": "Required. The ports of the application.", "items": { "format": "int32", "type": "integer" @@ -3494,7 +3494,7 @@ "description": "Optional. Configuration for the contextual headers." }, "gatewayIdentity": { - "description": "Optional. Gateway identity configuration.", + "description": "Optional. The security gateway identity configuration.", "enum": [ "GATEWAY_IDENTITY_UNSPECIFIED", "RESOURCE_NAME" @@ -3509,7 +3509,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Custom resource specific headers along with the values. The names should conform to RFC 9110: \u003e Field names SHOULD constrain themselves to alphanumeric characters, \"-\", and \".\", and SHOULD begin with a letter. Field values SHOULD contain only ASCII printable characters and tab.", + "description": "Optional. Custom resource specific headers along with the values. The names should conform to RFC 9110: \u003eField names can contain alphanumeric characters, hyphens, and periods, can contain only ASCII-printable characters and tabs, and must start with a letter.", "type": "object" } }, @@ -3664,7 +3664,7 @@ "id": "GoogleCloudBeyondcorpSecuritygatewaysV1ServiceDiscoveryApiGatewayOperationDescriptor", "properties": { "path": { - "description": "Required. Contains uri path fragment where HTTP request is sent.", + "description": "Required. Contains the URI path fragment where HTTP request is sent.", "type": "string" } }, diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index f86a3502cc3..19e3067c281 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -1574,14 +1574,15 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1Application struct { // DisplayName: Optional. An arbitrary user-provided name for the application // resource. Cannot exceed 64 characters. DisplayName string `json:"displayName,omitempty"` - // EndpointMatchers: Required. Endpoint matchers associated with an - // application. A combination of hostname and ports as endpoint matchers is - // used to match the application. Match conditions for OR logic. An array of - // match conditions to allow for multiple matching criteria. The rule is - // considered a match if one of the conditions is met. The conditions should be - // the following combination: (Hostname & Ports) EXAMPLES: Hostname and Ports - - // ("*.example.com", "443"), ("example.com" and "22"), ("example.com" and - // "22,33") etc + // EndpointMatchers: Optional. An array of conditions to match the + // application's network endpoint. Each element in the array is an + // EndpointMatcher object, which defines a specific combination of a hostname + // pattern and one or more ports. The application is considered matched if at + // least one of the EndpointMatcher conditions in this array is met (the + // conditions are combined using OR logic). Each EndpointMatcher must contain a + // hostname pattern, such as "example.com", and one or more port numbers + // specified as a string, such as "443". Hostname and port number examples: + // "*.example.com", "443" "example.com" and "22" "example.com" and "22,33" EndpointMatchers []*GoogleCloudBeyondcorpSecuritygatewaysV1EndpointMatcher `json:"endpointMatchers,omitempty"` // Name: Identifier. Name of the resource. Name string `json:"name,omitempty"` @@ -1699,19 +1700,19 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1ApplicationUpstreamNetwork) Marsh // GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeaders: Contextual headers // configuration. type GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeaders struct { - // DeviceInfo: Optional. Device info configuration. + // DeviceInfo: Optional. The device information configuration. DeviceInfo *GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceInfo `json:"deviceInfo,omitempty"` - // GroupInfo: Optional. Group info configuration. + // GroupInfo: Optional. Group details. GroupInfo *GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupInfo `json:"groupInfo,omitempty"` // OutputType: Optional. Default output type for all enabled headers. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. OutputType string `json:"outputType,omitempty"` - // UserInfo: Optional. User info configuration. + // UserInfo: Optional. User details. UserInfo *GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedUserInfo `json:"userInfo,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceInfo") to // unconditionally include in API requests. By default, fields with empty or @@ -1732,12 +1733,12 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeaders) MarshalJSON() } // GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceInfo: -// Delegated device info configuration. +// The delegated device information configuration. type GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceInfo struct { - // OutputType: Optional. The output type of the delegated device info. + // OutputType: Optional. The output type details for the delegated device. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. @@ -1761,12 +1762,12 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceI } // GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupInfo: -// Delegated group info configuration. +// The delegated group configuration details. type GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupInfo struct { - // OutputType: Optional. The output type of the delegated group info. + // OutputType: Optional. The output type of the delegated group information. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. @@ -1790,12 +1791,12 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupIn } // GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedUserInfo: -// Delegated user info configuration. +// The configuration information for the delegated user. type GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedUserInfo struct { - // OutputType: Optional. The output type of the delegated user info. + // OutputType: Optional. The delegated user's information. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. @@ -1871,7 +1872,7 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1Endpoint) MarshalJSON() ([]byte, type GoogleCloudBeyondcorpSecuritygatewaysV1EndpointMatcher struct { // Hostname: Required. Hostname of the application. Hostname string `json:"hostname,omitempty"` - // Ports: Required. Ports of the application. + // Ports: Required. The ports of the application. Ports []int64 `json:"ports,omitempty"` // ForceSendFields is a list of field names (e.g. "Hostname") to // unconditionally include in API requests. By default, fields with empty or @@ -2009,7 +2010,7 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1ProxyProtocolConfig struct { ClientIp bool `json:"clientIp,omitempty"` // ContextualHeaders: Optional. Configuration for the contextual headers. ContextualHeaders *GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeaders `json:"contextualHeaders,omitempty"` - // GatewayIdentity: Optional. Gateway identity configuration. + // GatewayIdentity: Optional. The security gateway identity configuration. // // Possible values: // "GATEWAY_IDENTITY_UNSPECIFIED" - Unspecified gateway identity. @@ -2018,9 +2019,9 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1ProxyProtocolConfig struct { // way_id} GatewayIdentity string `json:"gatewayIdentity,omitempty"` // MetadataHeaders: Optional. Custom resource specific headers along with the - // values. The names should conform to RFC 9110: > Field names SHOULD constrain - // themselves to alphanumeric characters, "-", and ".", and SHOULD begin with a - // letter. Field values SHOULD contain only ASCII printable characters and tab. + // values. The names should conform to RFC 9110: >Field names can contain + // alphanumeric characters, hyphens, and periods, can contain only + // ASCII-printable characters and tabs, and must start with a letter. MetadataHeaders map[string]string `json:"metadataHeaders,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedClientHeaders") to // unconditionally include in API requests. By default, fields with empty or @@ -2187,7 +2188,7 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1ServiceDiscoveryApiGateway) Marsh // GoogleCloudBeyondcorpSecuritygatewaysV1ServiceDiscoveryApiGatewayOperationDes // criptor: API operation descriptor. type GoogleCloudBeyondcorpSecuritygatewaysV1ServiceDiscoveryApiGatewayOperationDescriptor struct { - // Path: Required. Contains uri path fragment where HTTP request is sent. + // Path: Required. Contains the URI path fragment where HTTP request is sent. Path string `json:"path,omitempty"` // ForceSendFields is a list of field names (e.g. "Path") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -3541,9 +3542,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index bf3f97635c4..a767f5367dd 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://beyondcorp.googleapis.com/", "batchPath": "batch", "canonicalName": "BeyondCorp", - "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity solutions.", + "description": "Chrome Enterprise Premium is a secure enterprise browsing solution that provides secure access to applications and resources, and offers integrated threat and data protection. It adds an extra layer of security to safeguard your Chrome browser environment, including Data Loss Prevention (DLP), real-time URL and file scanning, and Context-Aware Access for SaaS and web apps.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/", "fullyEncodeReservedExpansion": true, @@ -795,7 +795,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -3445,7 +3445,7 @@ } } }, - "revision": "20250930", + "revision": "20251029", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -5512,7 +5512,7 @@ "type": "string" }, "endpointMatchers": { - "description": "Required. Endpoint matchers associated with an application. A combination of hostname and ports as endpoint matchers is used to match the application. Match conditions for OR logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if one of the conditions is met. The conditions should be the following combination: (Hostname \u0026 Ports) EXAMPLES: Hostname and Ports - (\"*.example.com\", \"443\"), (\"example.com\" and \"22\"), (\"example.com\" and \"22,33\") etc", + "description": "Optional. An array of conditions to match the application's network endpoint. Each element in the array is an EndpointMatcher object, which defines a specific combination of a hostname pattern and one or more ports. The application is considered matched if at least one of the EndpointMatcher conditions in this array is met (the conditions are combined using OR logic). Each EndpointMatcher must contain a hostname pattern, such as \"example.com\", and one or more port numbers specified as a string, such as \"443\". Hostname and port number examples: \"*.example.com\", \"443\" \"example.com\" and \"22\" \"example.com\" and \"22,33\"", "items": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher" }, @@ -5606,11 +5606,11 @@ "properties": { "deviceInfo": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedDeviceInfo", - "description": "Optional. Device info configuration." + "description": "Optional. The device information configuration." }, "groupInfo": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedGroupInfo", - "description": "Optional. Group info configuration." + "description": "Optional. Group details." }, "outputType": { "description": "Optional. Default output type for all enabled headers.", @@ -5621,7 +5621,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -5630,17 +5630,17 @@ }, "userInfo": { "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedUserInfo", - "description": "Optional. User info configuration." + "description": "Optional. User details." } }, "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedDeviceInfo": { - "description": "Delegated device info configuration.", + "description": "The delegated device information configuration.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedDeviceInfo", "properties": { "outputType": { - "description": "Optional. The output type of the delegated device info.", + "description": "Optional. The output type details for the delegated device.", "enum": [ "OUTPUT_TYPE_UNSPECIFIED", "PROTOBUF", @@ -5648,7 +5648,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -5659,11 +5659,11 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedGroupInfo": { - "description": "Delegated group info configuration.", + "description": "The delegated group configuration details.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedGroupInfo", "properties": { "outputType": { - "description": "Optional. The output type of the delegated group info.", + "description": "Optional. The output type of the delegated group information.", "enum": [ "OUTPUT_TYPE_UNSPECIFIED", "PROTOBUF", @@ -5671,7 +5671,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -5682,11 +5682,11 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedUserInfo": { - "description": "Delegated user info configuration.", + "description": "The configuration information for the delegated user.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedUserInfo", "properties": { "outputType": { - "description": "Optional. The output type of the delegated user info.", + "description": "Optional. The delegated user's information.", "enum": [ "OUTPUT_TYPE_UNSPECIFIED", "PROTOBUF", @@ -5694,7 +5694,7 @@ "NONE" ], "enumDescriptions": [ - "Unspecified output type.", + "The unspecified output type.", "Protobuf output type.", "JSON output type.", "Explicitly disable header output." @@ -5743,7 +5743,7 @@ "type": "string" }, "ports": { - "description": "Required. Ports of the application.", + "description": "Required. The ports of the application.", "items": { "format": "int32", "type": "integer" @@ -5849,7 +5849,7 @@ "description": "Optional. Configuration for the contextual headers." }, "gatewayIdentity": { - "description": "Optional. Gateway identity configuration.", + "description": "Optional. The security gateway identity configuration.", "enum": [ "GATEWAY_IDENTITY_UNSPECIFIED", "RESOURCE_NAME" @@ -5864,7 +5864,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Custom resource specific headers along with the values. The names should conform to RFC 9110: \u003e Field names SHOULD constrain themselves to alphanumeric characters, \"-\", and \".\", and SHOULD begin with a letter. Field values SHOULD contain only ASCII printable characters and tab.", + "description": "Optional. Custom resource specific headers along with the values. The names should conform to RFC 9110: \u003eField names can contain alphanumeric characters, hyphens, and periods, can contain only ASCII-printable characters and tabs, and must start with a letter.", "type": "object" } }, @@ -6019,7 +6019,7 @@ "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaServiceDiscoveryApiGatewayOperationDescriptor", "properties": { "path": { - "description": "Required. Contains uri path fragment where HTTP request is sent.", + "description": "Required. Contains the URI path fragment where HTTP request is sent.", "type": "string" } }, diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 19624c51baa..40bee9a69c2 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -2563,14 +2563,15 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication struct { // DisplayName: Optional. An arbitrary user-provided name for the application // resource. Cannot exceed 64 characters. DisplayName string `json:"displayName,omitempty"` - // EndpointMatchers: Required. Endpoint matchers associated with an - // application. A combination of hostname and ports as endpoint matchers is - // used to match the application. Match conditions for OR logic. An array of - // match conditions to allow for multiple matching criteria. The rule is - // considered a match if one of the conditions is met. The conditions should be - // the following combination: (Hostname & Ports) EXAMPLES: Hostname and Ports - - // ("*.example.com", "443"), ("example.com" and "22"), ("example.com" and - // "22,33") etc + // EndpointMatchers: Optional. An array of conditions to match the + // application's network endpoint. Each element in the array is an + // EndpointMatcher object, which defines a specific combination of a hostname + // pattern and one or more ports. The application is considered matched if at + // least one of the EndpointMatcher conditions in this array is met (the + // conditions are combined using OR logic). Each EndpointMatcher must contain a + // hostname pattern, such as "example.com", and one or more port numbers + // specified as a string, such as "443". Hostname and port number examples: + // "*.example.com", "443" "example.com" and "22" "example.com" and "22,33" EndpointMatchers []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher `json:"endpointMatchers,omitempty"` // Name: Identifier. Name of the resource. Name string `json:"name,omitempty"` @@ -2688,19 +2689,19 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationUpstreamNetwork) // GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeaders: Contextual // headers configuration. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeaders struct { - // DeviceInfo: Optional. Device info configuration. + // DeviceInfo: Optional. The device information configuration. DeviceInfo *GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedDeviceInfo `json:"deviceInfo,omitempty"` - // GroupInfo: Optional. Group info configuration. + // GroupInfo: Optional. Group details. GroupInfo *GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedGroupInfo `json:"groupInfo,omitempty"` // OutputType: Optional. Default output type for all enabled headers. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. OutputType string `json:"outputType,omitempty"` - // UserInfo: Optional. User info configuration. + // UserInfo: Optional. User details. UserInfo *GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedUserInfo `json:"userInfo,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceInfo") to // unconditionally include in API requests. By default, fields with empty or @@ -2721,12 +2722,12 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeaders) MarshalJS } // GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedDeviceI -// nfo: Delegated device info configuration. +// nfo: The delegated device information configuration. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedDeviceInfo struct { - // OutputType: Optional. The output type of the delegated device info. + // OutputType: Optional. The output type details for the delegated device. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. @@ -2750,12 +2751,12 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedDe } // GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedGroupIn -// fo: Delegated group info configuration. +// fo: The delegated group configuration details. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedGroupInfo struct { - // OutputType: Optional. The output type of the delegated group info. + // OutputType: Optional. The output type of the delegated group information. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. @@ -2779,12 +2780,12 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedGr } // GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedUserInf -// o: Delegated user info configuration. +// o: The configuration information for the delegated user. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeadersDelegatedUserInfo struct { - // OutputType: Optional. The output type of the delegated user info. + // OutputType: Optional. The delegated user's information. // // Possible values: - // "OUTPUT_TYPE_UNSPECIFIED" - Unspecified output type. + // "OUTPUT_TYPE_UNSPECIFIED" - The unspecified output type. // "PROTOBUF" - Protobuf output type. // "JSON" - JSON output type. // "NONE" - Explicitly disable header output. @@ -2860,7 +2861,7 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpoint) MarshalJSON() ([]b type GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher struct { // Hostname: Required. Hostname of the application. Hostname string `json:"hostname,omitempty"` - // Ports: Required. Ports of the application. + // Ports: Required. The ports of the application. Ports []int64 `json:"ports,omitempty"` // ForceSendFields is a list of field names (e.g. "Hostname") to // unconditionally include in API requests. By default, fields with empty or @@ -2998,7 +2999,7 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1alphaProxyProtocolConfig struct { ClientIp bool `json:"clientIp,omitempty"` // ContextualHeaders: Optional. Configuration for the contextual headers. ContextualHeaders *GoogleCloudBeyondcorpSecuritygatewaysV1alphaContextualHeaders `json:"contextualHeaders,omitempty"` - // GatewayIdentity: Optional. Gateway identity configuration. + // GatewayIdentity: Optional. The security gateway identity configuration. // // Possible values: // "GATEWAY_IDENTITY_UNSPECIFIED" - Unspecified gateway identity. @@ -3007,9 +3008,9 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1alphaProxyProtocolConfig struct { // way_id} GatewayIdentity string `json:"gatewayIdentity,omitempty"` // MetadataHeaders: Optional. Custom resource specific headers along with the - // values. The names should conform to RFC 9110: > Field names SHOULD constrain - // themselves to alphanumeric characters, "-", and ".", and SHOULD begin with a - // letter. Field values SHOULD contain only ASCII printable characters and tab. + // values. The names should conform to RFC 9110: >Field names can contain + // alphanumeric characters, hyphens, and periods, can contain only + // ASCII-printable characters and tabs, and must start with a letter. MetadataHeaders map[string]string `json:"metadataHeaders,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedClientHeaders") to // unconditionally include in API requests. By default, fields with empty or @@ -3177,7 +3178,7 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaServiceDiscoveryApiGateway) // GoogleCloudBeyondcorpSecuritygatewaysV1alphaServiceDiscoveryApiGatewayOperati // onDescriptor: API operation descriptor. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaServiceDiscoveryApiGatewayOperationDescriptor struct { - // Path: Required. Contains uri path fragment where HTTP request is sent. + // Path: Required. Contains the URI path fragment where HTTP request is sent. Path string `json:"path,omitempty"` // ForceSendFields is a list of field names (e.g. "Path") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -6538,9 +6539,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index 9e2def7a9e1..766b87a6943 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -418,7 +418,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -1488,7 +1488,7 @@ } } }, - "revision": "20251020", + "revision": "20251105", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index b1796d23b70..8272d5cbe5c 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -2090,9 +2090,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index aa6bd5a4937..df2c8932087 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -1535,7 +1535,7 @@ } } }, - "revision": "20251029", + "revision": "20251109", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { @@ -1802,7 +1802,7 @@ "readOnly": true }, "name": { - "description": "Optional. Resource name of the attachment, in the form `spaces/{space}/messages/{message}/attachments/{attachment}`.", + "description": "Identifier. Resource name of the attachment. Format: `spaces/{space}/messages/{message}/attachments/{attachment}`.", "type": "string" }, "source": { @@ -2649,7 +2649,7 @@ "type": "string" }, "expressionData": { - "description": "The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "The expression data for the card. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "items": { "$ref": "GoogleAppsCardV1ExpressionData" }, @@ -2961,7 +2961,7 @@ "type": "object" }, "GoogleAppsCardV1CommonWidgetAction": { - "description": "Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Represents an action that is not specific to a widget. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1CommonWidgetAction", "properties": { "updateVisibilityAction": { @@ -2972,7 +2972,7 @@ "type": "object" }, "GoogleAppsCardV1Condition": { - "description": "Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Represents a condition that can be used to trigger an action. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1Condition", "properties": { "actionRuleId": { @@ -2987,7 +2987,7 @@ "type": "object" }, "GoogleAppsCardV1DataSourceConfig": { - "description": "A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "A configuration object that helps configure the data sources for a widget. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1DataSourceConfig", "properties": { "platformDataSource": { @@ -3007,7 +3007,7 @@ "properties": { "hostAppDataSource": { "$ref": "HostAppDataSourceMarkup", - "description": "A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons." + "description": "A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps." }, "label": { "description": "The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.", @@ -3131,7 +3131,7 @@ "type": "object" }, "GoogleAppsCardV1EventAction": { - "description": "Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Represents an actionthat can be performed on an ui element. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1EventAction", "properties": { "actionRuleId": { @@ -3153,7 +3153,7 @@ "type": "object" }, "GoogleAppsCardV1ExpressionData": { - "description": "Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Represents the data that is used to evaluate an expression. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1ExpressionData", "properties": { "conditions": { @@ -3182,7 +3182,7 @@ "type": "object" }, "GoogleAppsCardV1ExpressionDataCondition": { - "description": "Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Represents a condition that is evaluated using CEL. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1ExpressionDataCondition", "properties": { "conditionType": { @@ -3560,7 +3560,7 @@ "type": "string" }, "id": { - "description": "A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "type": "string" }, "uncollapsibleWidgetsCount": { @@ -3583,7 +3583,7 @@ "id": "GoogleAppsCardV1SelectionInput", "properties": { "dataSourceConfigs": { - "description": "Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "items": { "$ref": "GoogleAppsCardV1DataSourceConfig" }, @@ -3594,7 +3594,7 @@ "description": "An external data source, such as a relational database." }, "hintText": { - "description": "Optional. Text that appears below the selection input field meant to assist users by prompting them to enter a certain value. This text is always visible. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.", + "description": "Optional. Text that appears below the selection input field meant to assist users by prompting them to enter a certain value. This text is always visible. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "type": "string" }, "items": { @@ -3753,7 +3753,7 @@ }, "hostAppDataSource": { "$ref": "HostAppDataSourceMarkup", - "description": "A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons." + "description": "A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps." }, "initialSuggestions": { "$ref": "GoogleAppsCardV1Suggestions", @@ -3829,7 +3829,7 @@ "type": "object" }, "GoogleAppsCardV1Trigger": { - "description": "Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Represents a trigger. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1Trigger", "properties": { "actionRuleId": { @@ -3840,7 +3840,7 @@ "type": "object" }, "GoogleAppsCardV1UpdateVisibilityAction": { - "description": "Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Represents an action that updates the visibility of a widget. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "id": "GoogleAppsCardV1UpdateVisibilityAction", "properties": { "visibility": { @@ -3925,7 +3925,7 @@ "description": "Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` \"divider\": { } ```" }, "eventActions": { - "description": "Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Specifies the event actions that can be performed on the widget. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "items": { "$ref": "GoogleAppsCardV1EventAction" }, @@ -3952,7 +3952,7 @@ "type": "string" }, "id": { - "description": "A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "type": "string" }, "image": { @@ -3972,7 +3972,7 @@ "description": "Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` \"textParagraph\": { \"text\": \" *bold text*\" } ```" }, "visibility": { - "description": "Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.", + "description": "Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Available for Google Workspace add-ons that extend Google Workspace flows, which is available as part of the [Gemini Alpha program](https://support.google.com/a/answer/14170809). Unavailable for Google Chat apps.", "enum": [ "VISIBILITY_UNSPECIFIED", "VISIBLE", diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index d881e480fc2..993a110e153 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -818,7 +818,7 @@ type Attachment struct { // DriveDataRef: Output only. A reference to the Google Drive attachment. This // field is used with the Google Drive API. DriveDataRef *DriveDataRef `json:"driveDataRef,omitempty"` - // Name: Optional. Resource name of the attachment, in the form + // Name: Identifier. Resource name of the attachment. Format: // `spaces/{space}/messages/{message}/attachments/{attachment}`. Name string `json:"name,omitempty"` // Source: Output only. The source of the attachment. @@ -2245,8 +2245,11 @@ type GoogleAppsCardV1Card struct { // "REPLACE" - Default value. The card is shown by replacing the view of the // top card in the card stack. DisplayStyle string `json:"displayStyle,omitempty"` - // ExpressionData: The expression data for the card. Only supported by Google - // Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. + // ExpressionData: The expression data for the card. Available for Google + // Workspace add-ons that extend Google Workspace flows, which is available as + // part of the Gemini Alpha program + // (https://support.google.com/a/answer/14170809). Unavailable for Google Chat + // apps. ExpressionData []*GoogleAppsCardV1ExpressionData `json:"expressionData,omitempty"` // FixedFooter: The fixed footer shown at the bottom of this card. Setting // `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` @@ -2686,8 +2689,10 @@ func (s GoogleAppsCardV1Columns) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1CommonWidgetAction: Represents an action that is not -// specific to a widget. Only supported by Google Workspace Workflow, but not -// Google Chat apps or Google Workspace add-ons. +// specific to a widget. Available for Google Workspace add-ons that extend +// Google Workspace flows, which is available as part of the Gemini Alpha +// program (https://support.google.com/a/answer/14170809). Unavailable for +// Google Chat apps. type GoogleAppsCardV1CommonWidgetAction struct { // UpdateVisibilityAction: The action to update the visibility of a widget. UpdateVisibilityAction *GoogleAppsCardV1UpdateVisibilityAction `json:"updateVisibilityAction,omitempty"` @@ -2710,8 +2715,10 @@ func (s GoogleAppsCardV1CommonWidgetAction) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1Condition: Represents a condition that can be used to -// trigger an action. Only supported by Google Workspace Workflow, but not -// Google Chat apps or Google Workspace add-ons. +// trigger an action. Available for Google Workspace add-ons that extend Google +// Workspace flows, which is available as part of the Gemini Alpha program +// (https://support.google.com/a/answer/14170809). Unavailable for Google Chat +// apps. type GoogleAppsCardV1Condition struct { // ActionRuleId: The unique identifier of the ActionRule. ActionRuleId string `json:"actionRuleId,omitempty"` @@ -2737,8 +2744,10 @@ func (s GoogleAppsCardV1Condition) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1DataSourceConfig: A configuration object that helps -// configure the data sources for a widget. Only supported by Google Workspace -// Workflow, but not Google Chat apps or Google Workspace add-ons. +// configure the data sources for a widget. Available for Google Workspace +// add-ons that extend Google Workspace flows, which is available as part of +// the Gemini Alpha program (https://support.google.com/a/answer/14170809). +// Unavailable for Google Chat apps. type GoogleAppsCardV1DataSourceConfig struct { // PlatformDataSource: The data is from a Google Workspace application. PlatformDataSource *GoogleAppsCardV1PlatformDataSource `json:"platformDataSource,omitempty"` @@ -2776,8 +2785,10 @@ func (s GoogleAppsCardV1DataSourceConfig) MarshalJSON() ([]byte, error) { type GoogleAppsCardV1DateTimePicker struct { // HostAppDataSource: A data source that's unique to a Google Workspace host // application, such as Gmail emails, Google Calendar events, or Google Chat - // messages. Only supported by Google Workspace Workflows, but not Google Chat - // API or Google Workspace Add-ons. + // messages. Available for Google Workspace add-ons that extend Google + // Workspace flows, which is available as part of the Gemini Alpha program + // (https://support.google.com/a/answer/14170809). Unavailable for Google Chat + // apps. HostAppDataSource *HostAppDataSourceMarkup `json:"hostAppDataSource,omitempty"` // Label: The text that prompts users to input a date, a time, or a date and // time. For example, if users are scheduling an appointment, use a label such @@ -2920,8 +2931,10 @@ type GoogleAppsCardV1Divider struct { } // GoogleAppsCardV1EventAction: Represents an actionthat can be performed on an -// ui element. Only supported by Google Workspace Workflow, but not Google Chat -// apps or Google Workspace add-ons. +// ui element. Available for Google Workspace add-ons that extend Google +// Workspace flows, which is available as part of the Gemini Alpha program +// (https://support.google.com/a/answer/14170809). Unavailable for Google Chat +// apps. type GoogleAppsCardV1EventAction struct { // ActionRuleId: The unique identifier of the ActionRule. ActionRuleId string `json:"actionRuleId,omitempty"` @@ -2949,8 +2962,10 @@ func (s GoogleAppsCardV1EventAction) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1ExpressionData: Represents the data that is used to evaluate -// an expression. Only supported by Google Workspace Workflow, but not Google -// Chat apps or Google Workspace add-ons. +// an expression. Available for Google Workspace add-ons that extend Google +// Workspace flows, which is available as part of the Gemini Alpha program +// (https://support.google.com/a/answer/14170809). Unavailable for Google Chat +// apps. type GoogleAppsCardV1ExpressionData struct { // Conditions: The list of conditions that are determined by the expression // evaluation result. @@ -2980,8 +2995,10 @@ func (s GoogleAppsCardV1ExpressionData) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1ExpressionDataCondition: Represents a condition that is -// evaluated using CEL. Only supported by Google Workspace Workflow, but not -// Google Chat apps or Google Workspace add-ons. +// evaluated using CEL. Available for Google Workspace add-ons that extend +// Google Workspace flows, which is available as part of the Gemini Alpha +// program (https://support.google.com/a/answer/14170809). Unavailable for +// Google Chat apps. type GoogleAppsCardV1ExpressionDataCondition struct { // ConditionType: The type of the condition. // @@ -3553,8 +3570,10 @@ type GoogleAppsCardV1Section struct { Header string `json:"header,omitempty"` // Id: A unique ID assigned to the section that's used to identify the section // to be mutated. The ID has a character limit of 64 characters and should be - // in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace - // Workflow, but not Google Chat apps or Google Workspace add-ons. + // in the format of `[a-zA-Z0-9-]+`. Available for Google Workspace add-ons + // that extend Google Workspace flows, which is available as part of the Gemini + // Alpha program (https://support.google.com/a/answer/14170809). Unavailable + // for Google Chat apps. Id string `json:"id,omitempty"` // UncollapsibleWidgetsCount: The number of uncollapsible widgets which remain // visible even when a section is collapsed. For example, when a section @@ -3603,15 +3622,19 @@ type GoogleAppsCardV1SelectionInput struct { // control. This field provides more fine-grained control over the data source. // If specified, the `multi_select_max_selected_items` field, // `multi_select_min_query_length` field, `external_data_source` field and - // `platform_data_source` field are ignored. Only supported by Google Workspace - // Workflow, but not Google Chat apps or Google Workspace add-ons. + // `platform_data_source` field are ignored. Available for Google Workspace + // add-ons that extend Google Workspace flows, which is available as part of + // the Gemini Alpha program (https://support.google.com/a/answer/14170809). + // Unavailable for Google Chat apps. DataSourceConfigs []*GoogleAppsCardV1DataSourceConfig `json:"dataSourceConfigs,omitempty"` // ExternalDataSource: An external data source, such as a relational database. ExternalDataSource *GoogleAppsCardV1Action `json:"externalDataSource,omitempty"` // HintText: Optional. Text that appears below the selection input field meant // to assist users by prompting them to enter a certain value. This text is - // always visible. Only supported by Google Workspace Workflows, but not Google - // Chat API or Google Workspace Add-ons. + // always visible. Available for Google Workspace add-ons that extend Google + // Workspace flows, which is available as part of the Gemini Alpha program + // (https://support.google.com/a/answer/14170809). Unavailable for Google Chat + // apps. HintText string `json:"hintText,omitempty"` // Items: An array of selectable items. For example, an array of radio buttons // or checkboxes. Supports up to 100 items. @@ -3858,8 +3881,10 @@ type GoogleAppsCardV1TextInput struct { HintText string `json:"hintText,omitempty"` // HostAppDataSource: A data source that's unique to a Google Workspace host // application, such as Gmail emails, Google Calendar events, or Google Chat - // messages. Only supported by Google Workspace Workflow, but not Google Chat - // apps or Google Workspace add-ons. + // messages. Available for Google Workspace add-ons that extend Google + // Workspace flows, which is available as part of the Gemini Alpha program + // (https://support.google.com/a/answer/14170809). Unavailable for Google Chat + // apps. HostAppDataSource *HostAppDataSourceMarkup `json:"hostAppDataSource,omitempty"` // InitialSuggestions: Suggested values that users can enter. These values // appear when users click inside the text input field. As users type, the @@ -3974,8 +3999,11 @@ func (s GoogleAppsCardV1TextParagraph) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAppsCardV1Trigger: Represents a trigger. Only supported by Google -// Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. +// GoogleAppsCardV1Trigger: Represents a trigger. Available for Google +// Workspace add-ons that extend Google Workspace flows, which is available as +// part of the Gemini Alpha program +// (https://support.google.com/a/answer/14170809). Unavailable for Google Chat +// apps. type GoogleAppsCardV1Trigger struct { // ActionRuleId: The unique identifier of the ActionRule. ActionRuleId string `json:"actionRuleId,omitempty"` @@ -3998,8 +4026,10 @@ func (s GoogleAppsCardV1Trigger) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1UpdateVisibilityAction: Represents an action that updates -// the visibility of a widget. Only supported by Google Workspace Workflow, but -// not Google Chat apps or Google Workspace add-ons. +// the visibility of a widget. Available for Google Workspace add-ons that +// extend Google Workspace flows, which is available as part of the Gemini +// Alpha program (https://support.google.com/a/answer/14170809). Unavailable +// for Google Chat apps. type GoogleAppsCardV1UpdateVisibilityAction struct { // Visibility: The new visibility. // @@ -4114,8 +4144,10 @@ type GoogleAppsCardV1Widget struct { // the following JSON creates a divider: ``` "divider": { } ``` Divider *GoogleAppsCardV1Divider `json:"divider,omitempty"` // EventActions: Specifies the event actions that can be performed on the - // widget. Only supported by Google Workspace Workflow, but not Google Chat - // apps or Google Workspace add-ons. + // widget. Available for Google Workspace add-ons that extend Google Workspace + // flows, which is available as part of the Gemini Alpha program + // (https://support.google.com/a/answer/14170809). Unavailable for Google Chat + // apps. EventActions []*GoogleAppsCardV1EventAction `json:"eventActions,omitempty"` // Grid: Displays a grid with a collection of items. A grid supports any number // of columns and items. The number of rows is determined by the upper bounds @@ -4146,8 +4178,10 @@ type GoogleAppsCardV1Widget struct { HorizontalAlignment string `json:"horizontalAlignment,omitempty"` // Id: A unique ID assigned to the widget that's used to identify the widget to // be mutated. The ID has a character limit of 64 characters and should be in - // the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace - // Workflow, but not Google Chat apps or Google Workspace add-ons. + // the format of `[a-zA-Z0-9-]+` and. Available for Google Workspace add-ons + // that extend Google Workspace flows, which is available as part of the Gemini + // Alpha program (https://support.google.com/a/answer/14170809). Unavailable + // for Google Chat apps. Id string `json:"id,omitempty"` // Image: Displays an image. For example, the following JSON creates an image // with alternative text: ``` "image": { "imageUrl": @@ -4182,8 +4216,10 @@ type GoogleAppsCardV1Widget struct { // { "text": " *bold text*" } ``` TextParagraph *GoogleAppsCardV1TextParagraph `json:"textParagraph,omitempty"` // Visibility: Specifies whether the widget is visible or hidden. The default - // value is `VISIBLE`. Only supported by Google Workspace Workflow, but not - // Google Chat apps or Google Workspace add-ons. + // value is `VISIBLE`. Available for Google Workspace add-ons that extend + // Google Workspace flows, which is available as part of the Gemini Alpha + // program (https://support.google.com/a/answer/14170809). Unavailable for + // Google Chat apps. // // Possible values: // "VISIBILITY_UNSPECIFIED" - Unspecified visibility. Do not use. diff --git a/checks/v1alpha/checks-api.json b/checks/v1alpha/checks-api.json index 006fdb95064..5d3b45fed3c 100644 --- a/checks/v1alpha/checks-api.json +++ b/checks/v1alpha/checks-api.json @@ -261,7 +261,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -557,7 +557,7 @@ } } }, - "revision": "20250925", + "revision": "20251112", "rootUrl": "https://checks.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -2410,7 +2410,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/checks/v1alpha/checks-gen.go b/checks/v1alpha/checks-gen.go index 2daf20395cb..6e1316d9a76 100644 --- a/checks/v1alpha/checks-gen.go +++ b/checks/v1alpha/checks-gen.go @@ -2536,8 +2536,8 @@ type ListOperationsResponse struct { Operations []*Operation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -3287,9 +3287,9 @@ func (c *AccountsAppsOperationsListCall) PageToken(pageToken string) *AccountsAp // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *AccountsAppsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AccountsAppsOperationsListCall { diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 153803183e1..a298e992b32 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1773,7 +1773,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -1786,7 +1786,7 @@ } } }, - "revision": "20251105", + "revision": "20251112", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -6795,7 +6795,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index 9cb7ba7e699..122d1afa2fd 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -5447,8 +5447,8 @@ type GoogleLongrunningListOperationsResponse struct { Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -11432,9 +11432,9 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *OperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OperationsListCall { diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 346959e7a92..a3793e3d186 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20250711", + "revision": "20251102", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -4660,6 +4660,13 @@ "description": "Resource representation as defined by the corresponding service providing the resource for a given API version.", "id": "VersionedResource", "properties": { + "assetExceptions": { + "description": "The exceptions of a resource.", + "items": { + "$ref": "AssetException" + }, + "type": "array" + }, "resource": { "additionalProperties": { "description": "Properties of the object.", diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index ef4f2855756..1ac701ebd46 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -5727,6 +5727,8 @@ func (s VersionedPackage) MarshalJSON() ([]byte, error) { // VersionedResource: Resource representation as defined by the corresponding // service providing the resource for a given API version. type VersionedResource struct { + // AssetExceptions: The exceptions of a resource. + AssetExceptions []*AssetException `json:"assetExceptions,omitempty"` // Resource: JSON representation of the resource as defined by the // corresponding service providing this resource. Example: If the resource is // an instance provided by Compute Engine, this field will contain the JSON @@ -5740,15 +5742,15 @@ type VersionedResource struct { // `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, version // will be "v1". Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resource") to + // ForceSendFields is a list of field names (e.g. "AssetExceptions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AssetExceptions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index 2e8ce184669..7d6ec26790a 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -2573,7 +2573,7 @@ } } }, - "revision": "20250930", + "revision": "20251111", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -3721,6 +3721,11 @@ "description": "An image built by the pipeline.", "id": "BuiltImage", "properties": { + "artifactRegistryPackage": { + "description": "Output only. Path to the artifact in Artifact Registry.", + "readOnly": true, + "type": "string" + }, "digest": { "description": "Docker Registry 2.0 digest.", "type": "string" @@ -5712,6 +5717,11 @@ "description": "A Go module artifact uploaded to Artifact Registry using the GoModule directive.", "id": "UploadedGoModule", "properties": { + "artifactRegistryPackage": { + "description": "Output only. Path to the artifact in Artifact Registry.", + "readOnly": true, + "type": "string" + }, "fileHashes": { "$ref": "FileHashes", "description": "Hash types and values of the Go Module Artifact." @@ -5732,6 +5742,11 @@ "description": "A Maven artifact uploaded using the MavenArtifact directive.", "id": "UploadedMavenArtifact", "properties": { + "artifactRegistryPackage": { + "description": "Output only. Path to the artifact in Artifact Registry.", + "readOnly": true, + "type": "string" + }, "fileHashes": { "$ref": "FileHashes", "description": "Hash types and values of the Maven Artifact." @@ -5752,6 +5767,11 @@ "description": "An npm package uploaded to Artifact Registry using the NpmPackage directive.", "id": "UploadedNpmPackage", "properties": { + "artifactRegistryPackage": { + "description": "Output only. Path to the artifact in Artifact Registry.", + "readOnly": true, + "type": "string" + }, "fileHashes": { "$ref": "FileHashes", "description": "Hash types and values of the npm package." @@ -5772,6 +5792,11 @@ "description": "Artifact uploaded using the PythonPackage directive.", "id": "UploadedPythonPackage", "properties": { + "artifactRegistryPackage": { + "description": "Output only. Path to the artifact in Artifact Registry.", + "readOnly": true, + "type": "string" + }, "fileHashes": { "$ref": "FileHashes", "description": "Hash types and values of the Python Artifact." diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index 6e9fe9b12bc..346a9be6767 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -1578,6 +1578,9 @@ func (s BuildTrigger) MarshalJSON() ([]byte, error) { // BuiltImage: An image built by the pipeline. type BuiltImage struct { + // ArtifactRegistryPackage: Output only. Path to the artifact in Artifact + // Registry. + ArtifactRegistryPackage string `json:"artifactRegistryPackage,omitempty"` // Digest: Docker Registry 2.0 digest. Digest string `json:"digest,omitempty"` // Name: Name used to push the container image to Google Container Registry, as @@ -1586,15 +1589,15 @@ type BuiltImage struct { // PushTiming: Output only. Stores timing information for pushing the specified // image. PushTiming *TimeSpan `json:"pushTiming,omitempty"` - // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "ArtifactRegistryPackage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Digest") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ArtifactRegistryPackage") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4297,6 +4300,9 @@ func (s UpdateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { // UploadedGoModule: A Go module artifact uploaded to Artifact Registry using // the GoModule directive. type UploadedGoModule struct { + // ArtifactRegistryPackage: Output only. Path to the artifact in Artifact + // Registry. + ArtifactRegistryPackage string `json:"artifactRegistryPackage,omitempty"` // FileHashes: Hash types and values of the Go Module Artifact. FileHashes *FileHashes `json:"fileHashes,omitempty"` // PushTiming: Output only. Stores timing information for pushing the specified @@ -4304,15 +4310,15 @@ type UploadedGoModule struct { PushTiming *TimeSpan `json:"pushTiming,omitempty"` // Uri: URI of the uploaded artifact. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "FileHashes") to + // ForceSendFields is a list of field names (e.g. "ArtifactRegistryPackage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FileHashes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ArtifactRegistryPackage") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4325,6 +4331,9 @@ func (s UploadedGoModule) MarshalJSON() ([]byte, error) { // UploadedMavenArtifact: A Maven artifact uploaded using the MavenArtifact // directive. type UploadedMavenArtifact struct { + // ArtifactRegistryPackage: Output only. Path to the artifact in Artifact + // Registry. + ArtifactRegistryPackage string `json:"artifactRegistryPackage,omitempty"` // FileHashes: Hash types and values of the Maven Artifact. FileHashes *FileHashes `json:"fileHashes,omitempty"` // PushTiming: Output only. Stores timing information for pushing the specified @@ -4332,15 +4341,15 @@ type UploadedMavenArtifact struct { PushTiming *TimeSpan `json:"pushTiming,omitempty"` // Uri: URI of the uploaded artifact. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "FileHashes") to + // ForceSendFields is a list of field names (e.g. "ArtifactRegistryPackage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FileHashes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ArtifactRegistryPackage") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4353,6 +4362,9 @@ func (s UploadedMavenArtifact) MarshalJSON() ([]byte, error) { // UploadedNpmPackage: An npm package uploaded to Artifact Registry using the // NpmPackage directive. type UploadedNpmPackage struct { + // ArtifactRegistryPackage: Output only. Path to the artifact in Artifact + // Registry. + ArtifactRegistryPackage string `json:"artifactRegistryPackage,omitempty"` // FileHashes: Hash types and values of the npm package. FileHashes *FileHashes `json:"fileHashes,omitempty"` // PushTiming: Output only. Stores timing information for pushing the specified @@ -4360,15 +4372,15 @@ type UploadedNpmPackage struct { PushTiming *TimeSpan `json:"pushTiming,omitempty"` // Uri: URI of the uploaded npm package. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "FileHashes") to + // ForceSendFields is a list of field names (e.g. "ArtifactRegistryPackage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FileHashes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ArtifactRegistryPackage") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4380,6 +4392,9 @@ func (s UploadedNpmPackage) MarshalJSON() ([]byte, error) { // UploadedPythonPackage: Artifact uploaded using the PythonPackage directive. type UploadedPythonPackage struct { + // ArtifactRegistryPackage: Output only. Path to the artifact in Artifact + // Registry. + ArtifactRegistryPackage string `json:"artifactRegistryPackage,omitempty"` // FileHashes: Hash types and values of the Python Artifact. FileHashes *FileHashes `json:"fileHashes,omitempty"` // PushTiming: Output only. Stores timing information for pushing the specified @@ -4387,15 +4402,15 @@ type UploadedPythonPackage struct { PushTiming *TimeSpan `json:"pushTiming,omitempty"` // Uri: URI of the uploaded artifact. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "FileHashes") to + // ForceSendFields is a list of field names (e.g. "ArtifactRegistryPackage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FileHashes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ArtifactRegistryPackage") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 6fadb145251..d5507080080 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -2185,7 +2185,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2294,7 +2294,7 @@ } } }, - "revision": "20250929", + "revision": "20251115", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -5858,7 +5858,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index dbd00506290..f0e14f76ade 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -4915,8 +4915,8 @@ type GoogleLongrunningListOperationsResponse struct { Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -13502,9 +13502,9 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *OperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OperationsListCall { diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 1bd9ad8a503..f09ac509f14 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -2359,7 +2359,7 @@ } } }, - "revision": "20251022", + "revision": "20251105", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -5437,6 +5437,10 @@ "readOnly": true, "type": "array" }, + "toolVersions": { + "$ref": "ToolVersions", + "description": "Optional. The tool versions to use for this release and all subsequent operations involving this release. If unset, then it will freeze the tool versions at the time of release creation." + }, "uid": { "description": "Output only. Unique identifier of the `Release`.", "readOnly": true, @@ -5449,6 +5453,31 @@ "description": "ReleaseCondition contains all conditions relevant to a Release.", "id": "ReleaseCondition", "properties": { + "dockerVersionSupportedCondition": { + "$ref": "ToolVersionSupportedCondition", + "description": "Output only. Details around the support state of the release's Docker version.", + "readOnly": true + }, + "helmVersionSupportedCondition": { + "$ref": "ToolVersionSupportedCondition", + "description": "Output only. Details around the support state of the release's Helm version.", + "readOnly": true + }, + "kptVersionSupportedCondition": { + "$ref": "ToolVersionSupportedCondition", + "description": "Output only. Details around the support state of the release's Kpt version.", + "readOnly": true + }, + "kubectlVersionSupportedCondition": { + "$ref": "ToolVersionSupportedCondition", + "description": "Output only. Details around the support state of the release's Kubectl version.", + "readOnly": true + }, + "kustomizeVersionSupportedCondition": { + "$ref": "ToolVersionSupportedCondition", + "description": "Output only. Details around the support state of the release's Kustomize version.", + "readOnly": true + }, "releaseReadyCondition": { "$ref": "ReleaseReadyCondition", "description": "Details around the Releases's overall status." @@ -5456,6 +5485,11 @@ "skaffoldSupportedCondition": { "$ref": "SkaffoldSupportedCondition", "description": "Details around the support state of the release's Skaffold version." + }, + "skaffoldVersionSupportedCondition": { + "$ref": "ToolVersionSupportedCondition", + "description": "Output only. Details around the support state of the release's Skaffold version.", + "readOnly": true } }, "type": "object" @@ -7237,6 +7271,78 @@ }, "type": "object" }, + "ToolVersionSupportedCondition": { + "description": "ToolVersionSupportedCondition contains information about when support for the release's version of a Tool ends.", + "id": "ToolVersionSupportedCondition", + "properties": { + "maintenanceModeTime": { + "description": "Output only. The time at which this release's version of the Tool will enter maintenance mode.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Output only. True if the version of Tool used by this release is supported.", + "readOnly": true, + "type": "boolean" + }, + "supportExpirationTime": { + "description": "Output only. The time at which this release's version of the Tool will no longer be supported.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "toolVersionSupportState": { + "description": "Output only. The Tool support state for this release's version of the Tool.", + "enum": [ + "TOOL_VERSION_SUPPORT_STATE_UNSPECIFIED", + "TOOL_VERSION_SUPPORT_STATE_SUPPORTED", + "TOOL_VERSION_SUPPORT_STATE_MAINTENANCE_MODE", + "TOOL_VERSION_SUPPORT_STATE_UNSUPPORTED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "This Tool version is currently supported.", + "This Tool version is in maintenance mode.", + "This Tool version is no longer supported." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ToolVersions": { + "description": "Details of ToolVersions for the release.", + "id": "ToolVersions", + "properties": { + "docker": { + "description": "Optional. The docker version to use for Cloud Deploy operations.", + "type": "string" + }, + "helm": { + "description": "Optional. The helm version to use for Cloud Deploy operations.", + "type": "string" + }, + "kpt": { + "description": "Optional. The kpt version to use for Cloud Deploy operations.", + "type": "string" + }, + "kubectl": { + "description": "Optional. The kubectl version to use for Cloud Deploy operations.", + "type": "string" + }, + "kustomize": { + "description": "Optional. The kustomize version to use for Cloud Deploy operations.", + "type": "string" + }, + "skaffold": { + "description": "Optional. The skaffold version to use for Cloud Deploy operations.", + "type": "string" + } + }, + "type": "object" + }, "VerifyJob": { "description": "A verify Job.", "id": "VerifyJob", diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index 25e7ac72a4d..f73e6896293 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -3914,6 +3914,10 @@ type Release struct { // TargetSnapshots: Output only. Snapshot of the targets taken at release // creation time. TargetSnapshots []*Target `json:"targetSnapshots,omitempty"` + // ToolVersions: Optional. The tool versions to use for this release and all + // subsequent operations involving this release. If unset, then it will freeze + // the tool versions at the time of release creation. + ToolVersions *ToolVersions `json:"toolVersions,omitempty"` // Uid: Output only. Unique identifier of the `Release`. Uid string `json:"uid,omitempty"` @@ -3940,19 +3944,38 @@ func (s Release) MarshalJSON() ([]byte, error) { // ReleaseCondition: ReleaseCondition contains all conditions relevant to a // Release. type ReleaseCondition struct { + // DockerVersionSupportedCondition: Output only. Details around the support + // state of the release's Docker version. + DockerVersionSupportedCondition *ToolVersionSupportedCondition `json:"dockerVersionSupportedCondition,omitempty"` + // HelmVersionSupportedCondition: Output only. Details around the support state + // of the release's Helm version. + HelmVersionSupportedCondition *ToolVersionSupportedCondition `json:"helmVersionSupportedCondition,omitempty"` + // KptVersionSupportedCondition: Output only. Details around the support state + // of the release's Kpt version. + KptVersionSupportedCondition *ToolVersionSupportedCondition `json:"kptVersionSupportedCondition,omitempty"` + // KubectlVersionSupportedCondition: Output only. Details around the support + // state of the release's Kubectl version. + KubectlVersionSupportedCondition *ToolVersionSupportedCondition `json:"kubectlVersionSupportedCondition,omitempty"` + // KustomizeVersionSupportedCondition: Output only. Details around the support + // state of the release's Kustomize version. + KustomizeVersionSupportedCondition *ToolVersionSupportedCondition `json:"kustomizeVersionSupportedCondition,omitempty"` // ReleaseReadyCondition: Details around the Releases's overall status. ReleaseReadyCondition *ReleaseReadyCondition `json:"releaseReadyCondition,omitempty"` // SkaffoldSupportedCondition: Details around the support state of the // release's Skaffold version. SkaffoldSupportedCondition *SkaffoldSupportedCondition `json:"skaffoldSupportedCondition,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReleaseReadyCondition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // SkaffoldVersionSupportedCondition: Output only. Details around the support + // state of the release's Skaffold version. + SkaffoldVersionSupportedCondition *ToolVersionSupportedCondition `json:"skaffoldVersionSupportedCondition,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "DockerVersionSupportedCondition") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReleaseReadyCondition") to - // include in API requests with the JSON null value. By default, fields with + // NullFields is a list of field names (e.g. "DockerVersionSupportedCondition") + // to include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` @@ -5889,6 +5912,82 @@ func (s TimedPromoteReleaseRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ToolVersionSupportedCondition: ToolVersionSupportedCondition contains +// information about when support for the release's version of a Tool ends. +type ToolVersionSupportedCondition struct { + // MaintenanceModeTime: Output only. The time at which this release's version + // of the Tool will enter maintenance mode. + MaintenanceModeTime string `json:"maintenanceModeTime,omitempty"` + // Status: Output only. True if the version of Tool used by this release is + // supported. + Status bool `json:"status,omitempty"` + // SupportExpirationTime: Output only. The time at which this release's version + // of the Tool will no longer be supported. + SupportExpirationTime string `json:"supportExpirationTime,omitempty"` + // ToolVersionSupportState: Output only. The Tool support state for this + // release's version of the Tool. + // + // Possible values: + // "TOOL_VERSION_SUPPORT_STATE_UNSPECIFIED" - Default value. This value is + // unused. + // "TOOL_VERSION_SUPPORT_STATE_SUPPORTED" - This Tool version is currently + // supported. + // "TOOL_VERSION_SUPPORT_STATE_MAINTENANCE_MODE" - This Tool version is in + // maintenance mode. + // "TOOL_VERSION_SUPPORT_STATE_UNSUPPORTED" - This Tool version is no longer + // supported. + ToolVersionSupportState string `json:"toolVersionSupportState,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaintenanceModeTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaintenanceModeTime") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ToolVersionSupportedCondition) MarshalJSON() ([]byte, error) { + type NoMethod ToolVersionSupportedCondition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ToolVersions: Details of ToolVersions for the release. +type ToolVersions struct { + // Docker: Optional. The docker version to use for Cloud Deploy operations. + Docker string `json:"docker,omitempty"` + // Helm: Optional. The helm version to use for Cloud Deploy operations. + Helm string `json:"helm,omitempty"` + // Kpt: Optional. The kpt version to use for Cloud Deploy operations. + Kpt string `json:"kpt,omitempty"` + // Kubectl: Optional. The kubectl version to use for Cloud Deploy operations. + Kubectl string `json:"kubectl,omitempty"` + // Kustomize: Optional. The kustomize version to use for Cloud Deploy + // operations. + Kustomize string `json:"kustomize,omitempty"` + // Skaffold: Optional. The skaffold version to use for Cloud Deploy operations. + Skaffold string `json:"skaffold,omitempty"` + // ForceSendFields is a list of field names (e.g. "Docker") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Docker") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ToolVersions) MarshalJSON() ([]byte, error) { + type NoMethod ToolVersions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VerifyJob: A verify Job. type VerifyJob struct { } diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index 1fbcaf69ec4..2a8033b511f 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -755,7 +755,7 @@ } } }, - "revision": "20251023", + "revision": "20251106", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -2160,7 +2160,8 @@ "REDIRECT_FUNCTION_UPGRADE_TRAFFIC_SUCCESSFUL", "REDIRECT_FUNCTION_UPGRADE_TRAFFIC_ERROR", "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR", - "COMMIT_FUNCTION_UPGRADE_ERROR" + "COMMIT_FUNCTION_UPGRADE_ERROR", + "COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE" ], "enumDescriptions": [ "Unspecified state. Most functions are in this upgrade state.", @@ -2173,7 +2174,8 @@ "RedirectFunctionUpgradeTraffic API was successful and traffic is served by 2nd Gen function stack.", "RedirectFunctionUpgradeTraffic API was un-successful.", "RollbackFunctionUpgradeTraffic API was un-successful.", - "CommitFunctionUpgrade API was un-successful." + "CommitFunctionUpgrade API was un-successful and 1st gen function might have broken.", + "CommitFunctionUpgrade API was un-successful but safe to rollback traffic or abort." ], "type": "string" } diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index 0c332d757c1..0b4652691c0 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -1997,7 +1997,9 @@ type UpgradeInfo struct { // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR" - RollbackFunctionUpgradeTraffic // API was un-successful. // "COMMIT_FUNCTION_UPGRADE_ERROR" - CommitFunctionUpgrade API was - // un-successful. + // un-successful and 1st gen function might have broken. + // "COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE" - CommitFunctionUpgrade API + // was un-successful but safe to rollback traffic or abort. UpgradeState string `json:"upgradeState,omitempty"` // ForceSendFields is a list of field names (e.g. "BuildConfig") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 7458a71c8f5..9c3dc32f46a 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -755,7 +755,7 @@ } } }, - "revision": "20251023", + "revision": "20251106", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -2203,7 +2203,8 @@ "REDIRECT_FUNCTION_UPGRADE_TRAFFIC_SUCCESSFUL", "REDIRECT_FUNCTION_UPGRADE_TRAFFIC_ERROR", "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR", - "COMMIT_FUNCTION_UPGRADE_ERROR" + "COMMIT_FUNCTION_UPGRADE_ERROR", + "COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE" ], "enumDescriptions": [ "Unspecified state. Most functions are in this upgrade state.", @@ -2216,7 +2217,8 @@ "RedirectFunctionUpgradeTraffic API was successful and traffic is served by 2nd Gen function stack.", "RedirectFunctionUpgradeTraffic API was un-successful.", "RollbackFunctionUpgradeTraffic API was un-successful.", - "CommitFunctionUpgrade API was un-successful." + "CommitFunctionUpgrade API was un-successful and 1st gen function might have broken.", + "CommitFunctionUpgrade API was un-successful but safe to rollback traffic or abort." ], "type": "string" } diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index de1ec450606..3a38feec151 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -2043,7 +2043,9 @@ type UpgradeInfo struct { // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR" - RollbackFunctionUpgradeTraffic // API was un-successful. // "COMMIT_FUNCTION_UPGRADE_ERROR" - CommitFunctionUpgrade API was - // un-successful. + // un-successful and 1st gen function might have broken. + // "COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE" - CommitFunctionUpgrade API + // was un-successful but safe to rollback traffic or abort. UpgradeState string `json:"upgradeState,omitempty"` // ForceSendFields is a list of field names (e.g. "BuildConfig") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index 510e1a9035e..c1cc0fc9c37 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -755,7 +755,7 @@ } } }, - "revision": "20251023", + "revision": "20251106", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -2203,7 +2203,8 @@ "REDIRECT_FUNCTION_UPGRADE_TRAFFIC_SUCCESSFUL", "REDIRECT_FUNCTION_UPGRADE_TRAFFIC_ERROR", "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR", - "COMMIT_FUNCTION_UPGRADE_ERROR" + "COMMIT_FUNCTION_UPGRADE_ERROR", + "COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE" ], "enumDescriptions": [ "Unspecified state. Most functions are in this upgrade state.", @@ -2216,7 +2217,8 @@ "RedirectFunctionUpgradeTraffic API was successful and traffic is served by 2nd Gen function stack.", "RedirectFunctionUpgradeTraffic API was un-successful.", "RollbackFunctionUpgradeTraffic API was un-successful.", - "CommitFunctionUpgrade API was un-successful." + "CommitFunctionUpgrade API was un-successful and 1st gen function might have broken.", + "CommitFunctionUpgrade API was un-successful but safe to rollback traffic or abort." ], "type": "string" } diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 21fecc76535..d24e2aa23f0 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -2043,7 +2043,9 @@ type UpgradeInfo struct { // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR" - RollbackFunctionUpgradeTraffic // API was un-successful. // "COMMIT_FUNCTION_UPGRADE_ERROR" - CommitFunctionUpgrade API was - // un-successful. + // un-successful and 1st gen function might have broken. + // "COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE" - CommitFunctionUpgrade API + // was un-successful but safe to rollback traffic or abort. UpgradeState string `json:"upgradeState,omitempty"` // ForceSendFields is a list of field names (e.g. "BuildConfig") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudresourcemanager/v1/cloudresourcemanager-api.json b/cloudresourcemanager/v1/cloudresourcemanager-api.json index a71c2da34a4..ac77db5321d 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1171,7 +1171,7 @@ } } }, - "revision": "20250606", + "revision": "20251103", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1567,7 +1567,8 @@ "CYCLE_INTRODUCED_VIOLATION", "FOLDER_BEING_MOVED_VIOLATION", "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" + "DELETED_FOLDER_HEIGHT_VIOLATION", + "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" ], "enumDescriptions": [ "The error type was unrecognized or unspecified.", @@ -1579,7 +1580,8 @@ "The attempted action would introduce cycle in resource path.", "The attempted action would move a folder that is already being moved.", "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth constraint." + "The attempted action would violate the max deleted folder depth constraint.", + "The folder being deleted has a configured capability." ], "type": "string" } diff --git a/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1/cloudresourcemanager-gen.go index 9e2e6e09ab3..c5066c7a9cd 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -839,6 +839,8 @@ type FolderOperationError struct { // to delete contains active resources. // "DELETED_FOLDER_HEIGHT_VIOLATION" - The attempted action would violate the // max deleted folder depth constraint. + // "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" - The folder being + // deleted has a configured capability. ErrorMessageId string `json:"errorMessageId,omitempty"` // ForceSendFields is a list of field names (e.g. "ErrorMessageId") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index 1776c55a6de..6068c41b42b 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -568,7 +568,7 @@ } } }, - "revision": "20250606", + "revision": "20251103", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -885,7 +885,8 @@ "CYCLE_INTRODUCED_VIOLATION", "FOLDER_BEING_MOVED_VIOLATION", "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" + "DELETED_FOLDER_HEIGHT_VIOLATION", + "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" ], "enumDescriptions": [ "The error type was unrecognized or unspecified.", @@ -897,7 +898,8 @@ "The attempted action would introduce cycle in resource path.", "The attempted action would move a folder that is already being moved.", "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth constraint." + "The attempted action would violate the max deleted folder depth constraint.", + "The folder being deleted has a configured capability." ], "type": "string" } diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go index c7a81e7ac4f..522adb624f7 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go @@ -667,6 +667,8 @@ type FolderOperationError struct { // to delete contains active resources. // "DELETED_FOLDER_HEIGHT_VIOLATION" - The attempted action would violate the // max deleted folder depth constraint. + // "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" - The folder being + // deleted has a configured capability. ErrorMessageId string `json:"errorMessageId,omitempty"` // ForceSendFields is a list of field names (e.g. "ErrorMessageId") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudresourcemanager/v2/cloudresourcemanager-api.json b/cloudresourcemanager/v2/cloudresourcemanager-api.json index dc97568c361..1efcfe84e3f 100644 --- a/cloudresourcemanager/v2/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v2/cloudresourcemanager-api.json @@ -450,7 +450,7 @@ } } }, - "revision": "20250417", + "revision": "20251103", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -811,7 +811,8 @@ "CYCLE_INTRODUCED_VIOLATION", "FOLDER_BEING_MOVED_VIOLATION", "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" + "DELETED_FOLDER_HEIGHT_VIOLATION", + "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" ], "enumDescriptions": [ "The error type was unrecognized or unspecified.", @@ -823,7 +824,8 @@ "The attempted action would introduce cycle in resource path.", "The attempted action would move a folder that is already being moved.", "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth constraint." + "The attempted action would violate the max deleted folder depth constraint.", + "The folder being deleted has a configured capability." ], "type": "string" } diff --git a/cloudresourcemanager/v2/cloudresourcemanager-gen.go b/cloudresourcemanager/v2/cloudresourcemanager-gen.go index 66dbdad65d6..726a37c5678 100644 --- a/cloudresourcemanager/v2/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v2/cloudresourcemanager-gen.go @@ -697,6 +697,8 @@ type FolderOperationError struct { // to delete contains active resources. // "DELETED_FOLDER_HEIGHT_VIOLATION" - The attempted action would violate the // max deleted folder depth constraint. + // "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" - The folder being + // deleted has a configured capability. ErrorMessageId string `json:"errorMessageId,omitempty"` // ForceSendFields is a list of field names (e.g. "ErrorMessageId") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json b/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json index ff545830c15..445a6abbf04 100644 --- a/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json @@ -450,7 +450,7 @@ } } }, - "revision": "20250417", + "revision": "20251103", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -811,7 +811,8 @@ "CYCLE_INTRODUCED_VIOLATION", "FOLDER_BEING_MOVED_VIOLATION", "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" + "DELETED_FOLDER_HEIGHT_VIOLATION", + "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" ], "enumDescriptions": [ "The error type was unrecognized or unspecified.", @@ -823,7 +824,8 @@ "The attempted action would introduce cycle in resource path.", "The attempted action would move a folder that is already being moved.", "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth constraint." + "The attempted action would violate the max deleted folder depth constraint.", + "The folder being deleted has a configured capability." ], "type": "string" } diff --git a/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go index 4fdb5b60c50..a5a2eb9edf1 100644 --- a/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go @@ -697,6 +697,8 @@ type FolderOperationError struct { // to delete contains active resources. // "DELETED_FOLDER_HEIGHT_VIOLATION" - The attempted action would violate the // max deleted folder depth constraint. + // "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" - The folder being + // deleted has a configured capability. ErrorMessageId string `json:"errorMessageId,omitempty"` // ForceSendFields is a list of field names (e.g. "ErrorMessageId") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudresourcemanager/v3/cloudresourcemanager-api.json b/cloudresourcemanager/v3/cloudresourcemanager-api.json index 5f91dc7e037..feb9973d7cf 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v3/cloudresourcemanager-api.json @@ -697,11 +697,11 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ] }, - "update": { - "description": "Updates tag bindings directly attached to a GCP resource.", + "patch": { + "description": "Updates tag bindings directly attached to a GCP resource. Update_mask can be kept empty or \"*\".", "flatPath": "v3/locations/{locationsId}/tagBindingCollections/{tagBindingCollectionsId}", - "httpMethod": "PUT", - "id": "cloudresourcemanager.locations.tagBindingCollections.update", + "httpMethod": "PATCH", + "id": "cloudresourcemanager.locations.tagBindingCollections.patch", "parameterOrder": [ "name" ], @@ -712,6 +712,12 @@ "pattern": "^locations/[^/]+/tagBindingCollections/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Optional. An update mask to selectively update fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, "path": "v3/{+name}", @@ -1962,7 +1968,7 @@ } } }, - "revision": "20250606", + "revision": "20251103", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -2413,7 +2419,8 @@ "CYCLE_INTRODUCED_VIOLATION", "FOLDER_BEING_MOVED_VIOLATION", "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" + "DELETED_FOLDER_HEIGHT_VIOLATION", + "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" ], "enumDescriptions": [ "The error type was unrecognized or unspecified.", @@ -2425,7 +2432,8 @@ "The attempted action would introduce cycle in resource path.", "The attempted action would move a folder that is already being moved.", "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth constraint." + "The attempted action would violate the max deleted folder depth constraint.", + "The folder being deleted has a configured capability." ], "type": "string" } @@ -2621,7 +2629,7 @@ "id": "ListTagValuesResponse", "properties": { "nextPageToken": { - "description": "A pagination token returned from a previous call to `ListTagValues` that indicates from where listing should continue. This is currently not used, but the server may at any point start supplying a valid token.", + "description": "A pagination token returned from a previous call to `ListTagValues` that indicates from where listing should continue.", "type": "string" }, "tagValues": { @@ -3091,6 +3099,10 @@ "description": "A TagKey, used to group a set of TagValues.", "id": "TagKey", "properties": { + "allowedValuesRegex": { + "description": "Optional. Regular expression constraint for freeform tag values. If present, it implicitly allows freeform values (constrained by the regex).", + "type": "string" + }, "createTime": { "description": "Output only. Creation time.", "format": "google-datetime", diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index 2ed3366a18d..20dedca26de 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -974,6 +974,8 @@ type FolderOperationError struct { // to delete contains active resources. // "DELETED_FOLDER_HEIGHT_VIOLATION" - The attempted action would violate the // max deleted folder depth constraint. + // "FOLDER_TO_DELETE_CONFIGURED_CAPABILITY_VIOLATION" - The folder being + // deleted has a configured capability. ErrorMessageId string `json:"errorMessageId,omitempty"` // ForceSendFields is a list of field names (e.g. "ErrorMessageId") to // unconditionally include in API requests. By default, fields with empty or @@ -1322,9 +1324,7 @@ func (s ListTagKeysResponse) MarshalJSON() ([]byte, error) { // ListTagValuesResponse: The ListTagValues response. type ListTagValuesResponse struct { // NextPageToken: A pagination token returned from a previous call to - // `ListTagValues` that indicates from where listing should continue. This is - // currently not used, but the server may at any point start supplying a valid - // token. + // `ListTagValues` that indicates from where listing should continue. NextPageToken string `json:"nextPageToken,omitempty"` // TagValues: A possibly paginated list of TagValues that are direct // descendants of the specified parent TagKey. @@ -2023,6 +2023,10 @@ func (s TagHold) MarshalJSON() ([]byte, error) { // TagKey: A TagKey, used to group a set of TagValues. type TagKey struct { + // AllowedValuesRegex: Optional. Regular expression constraint for freeform tag + // values. If present, it implicitly allows freeform values (constrained by the + // regex). + AllowedValuesRegex string `json:"allowedValuesRegex,omitempty"` // CreateTime: Output only. Creation time. CreateTime string `json:"createTime,omitempty"` // Description: Optional. User-assigned description of the TagKey. Must not @@ -2080,15 +2084,15 @@ type TagKey struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "AllowedValuesRegex") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AllowedValuesRegex") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4642,7 +4646,7 @@ func (c *LocationsTagBindingCollectionsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type LocationsTagBindingCollectionsUpdateCall struct { +type LocationsTagBindingCollectionsPatchCall struct { s *Service name string tagbindingcollection *TagBindingCollection @@ -4651,7 +4655,8 @@ type LocationsTagBindingCollectionsUpdateCall struct { header_ http.Header } -// Update: Updates tag bindings directly attached to a GCP resource. +// Patch: Updates tag bindings directly attached to a GCP resource. Update_mask +// can be kept empty or "*". // // - name: Identifier. The name of the TagBindingCollection, following the // convention: @@ -4660,37 +4665,44 @@ type LocationsTagBindingCollectionsUpdateCall struct { // resource the TagBindings are bound to. // "locations/global/tagBindingCollections/%2f%2fcloudresourcemanager.googleap // is.com%2fprojects%2f123". -func (r *LocationsTagBindingCollectionsService) Update(name string, tagbindingcollection *TagBindingCollection) *LocationsTagBindingCollectionsUpdateCall { - c := &LocationsTagBindingCollectionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LocationsTagBindingCollectionsService) Patch(name string, tagbindingcollection *TagBindingCollection) *LocationsTagBindingCollectionsPatchCall { + c := &LocationsTagBindingCollectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name c.tagbindingcollection = tagbindingcollection return c } +// UpdateMask sets the optional parameter "updateMask": An update mask to +// selectively update fields. +func (c *LocationsTagBindingCollectionsPatchCall) UpdateMask(updateMask string) *LocationsTagBindingCollectionsPatchCall { + 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 // details. -func (c *LocationsTagBindingCollectionsUpdateCall) Fields(s ...googleapi.Field) *LocationsTagBindingCollectionsUpdateCall { +func (c *LocationsTagBindingCollectionsPatchCall) Fields(s ...googleapi.Field) *LocationsTagBindingCollectionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsTagBindingCollectionsUpdateCall) Context(ctx context.Context) *LocationsTagBindingCollectionsUpdateCall { +func (c *LocationsTagBindingCollectionsPatchCall) Context(ctx context.Context) *LocationsTagBindingCollectionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsTagBindingCollectionsUpdateCall) Header() http.Header { +func (c *LocationsTagBindingCollectionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsTagBindingCollectionsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsTagBindingCollectionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tagbindingcollection) if err != nil { @@ -4700,7 +4712,7 @@ func (c *LocationsTagBindingCollectionsUpdateCall) doRequest(alt string) (*http. c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -4708,16 +4720,16 @@ func (c *LocationsTagBindingCollectionsUpdateCall) doRequest(alt string) (*http. googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "cloudresourcemanager.locations.tagBindingCollections.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "cloudresourcemanager.locations.tagBindingCollections.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudresourcemanager.locations.tagBindingCollections.update" call. +// Do executes the "cloudresourcemanager.locations.tagBindingCollections.patch" call. // 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 *LocationsTagBindingCollectionsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *LocationsTagBindingCollectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4747,7 +4759,7 @@ func (c *LocationsTagBindingCollectionsUpdateCall) Do(opts ...googleapi.CallOpti if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "cloudresourcemanager.locations.tagBindingCollections.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "cloudresourcemanager.locations.tagBindingCollections.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 0e0ded73d53..66fb1c98631 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -53529,7 +53529,7 @@ } } }, - "revision": "20251031", + "revision": "20251110", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -60208,6 +60208,7 @@ "ACCELERATOR_OPTIMIZED_A3_ULTRA", "ACCELERATOR_OPTIMIZED_A4", "ACCELERATOR_OPTIMIZED_A4X", + "ACCELERATOR_OPTIMIZED_A4X_MAX", "COMPUTE_OPTIMIZED", "COMPUTE_OPTIMIZED_C2D", "COMPUTE_OPTIMIZED_C3", @@ -60271,6 +60272,7 @@ "", "", "", + "", "Note for internal users: When adding a new enum Type for v1, make sure\nto also add it in the comment for the `optional Type type` definition.\nThis ensures that the public documentation displays the new enum Type." ], "type": "string" diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 334851c5d64..d5b0377272a 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -11960,6 +11960,7 @@ type Commitment struct { // "ACCELERATOR_OPTIMIZED_A3_ULTRA" // "ACCELERATOR_OPTIMIZED_A4" // "ACCELERATOR_OPTIMIZED_A4X" + // "ACCELERATOR_OPTIMIZED_A4X_MAX" // "COMPUTE_OPTIMIZED" // "COMPUTE_OPTIMIZED_C2D" // "COMPUTE_OPTIMIZED_C3" diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 60006534ccd..94ba8828961 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -1968,7 +1968,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -4326,7 +4326,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -5378,7 +5378,7 @@ } } }, - "revision": "20251023", + "revision": "20251112", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -7321,7 +7321,10 @@ "CLIENT_SENTIMENT_CATEGORY", "AGENT_VERSION_ID", "AGENT_DEPLOYMENT_ID", - "AGENT_ASSIST_SUPERVISOR_ID" + "AGENT_ASSIST_SUPERVISOR_ID", + "LABEL_KEY", + "LABEL_VALUE", + "LABEL_KEY_AND_VALUE" ], "enumDescriptions": [ "The key of the dimension is unspecified.", @@ -7341,7 +7344,10 @@ "The dimension is keyed by the client sentiment category.", "The dimension is keyed by the agent version ID.", "The dimension is keyed by the agent deployment ID.", - "The dimension is keyed by the supervisor ID of the assigned human supervisor for virtual agents." + "The dimension is keyed by the supervisor ID of the assigned human supervisor for virtual agents.", + "The dimension is keyed by label keys.", + "The dimension is keyed by label values.", + "The dimension is keyed by label key-value pairs." ], "type": "string" }, @@ -7350,6 +7356,11 @@ "description": "Output only. Metadata about the issue dimension.", "readOnly": true }, + "labelDimensionMetadata": { + "$ref": "GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata", + "description": "Output only. Metadata about conversation labels.", + "readOnly": true + }, "mediumDimensionMetadata": { "$ref": "GoogleCloudContactcenterinsightsV1DimensionMediumDimensionMetadata", "description": "Output only. Metadata about the conversation medium dimension.", @@ -7479,6 +7490,21 @@ }, "type": "object" }, + "GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata": { + "description": "Metadata about conversation labels.", + "id": "GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata", + "properties": { + "labelKey": { + "description": "Optional. The label key.", + "type": "string" + }, + "labelValue": { + "description": "Optional. The label value.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1DimensionMediumDimensionMetadata": { "description": "Metadata about the conversation medium dimension.", "id": "GoogleCloudContactcenterinsightsV1DimensionMediumDimensionMetadata", @@ -11958,7 +11984,10 @@ "CLIENT_SENTIMENT_CATEGORY", "AGENT_VERSION_ID", "AGENT_DEPLOYMENT_ID", - "AGENT_ASSIST_SUPERVISOR_ID" + "AGENT_ASSIST_SUPERVISOR_ID", + "LABEL_KEY", + "LABEL_VALUE", + "LABEL_KEY_AND_VALUE" ], "enumDescriptions": [ "The key of the dimension is unspecified.", @@ -11978,7 +12007,10 @@ "The dimension is keyed by the client sentiment category.", "The dimension is keyed by the agent version ID.", "The dimension is keyed by the agent deployment ID.", - "The dimension is keyed by the supervisor ID of the assigned human supervisor for virtual agents." + "The dimension is keyed by the supervisor ID of the assigned human supervisor for virtual agents.", + "The dimension is keyed by label keys.", + "The dimension is keyed by label values.", + "The dimension is keyed by label key-value pairs." ], "type": "string" }, @@ -11987,6 +12019,11 @@ "description": "Output only. Metadata about the issue dimension.", "readOnly": true }, + "labelDimensionMetadata": { + "$ref": "GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata", + "description": "Output only. Metadata about conversation labels.", + "readOnly": true + }, "mediumDimensionMetadata": { "$ref": "GoogleCloudContactcenterinsightsV1alpha1DimensionMediumDimensionMetadata", "description": "Output only. Metadata about the conversation medium dimension.", @@ -12116,6 +12153,21 @@ }, "type": "object" }, + "GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata": { + "description": "Metadata about conversation labels.", + "id": "GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata", + "properties": { + "labelKey": { + "description": "Optional. The label key.", + "type": "string" + }, + "labelValue": { + "description": "Optional. The label value.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1alpha1DimensionMediumDimensionMetadata": { "description": "Metadata about the conversation medium dimension.", "id": "GoogleCloudContactcenterinsightsV1alpha1DimensionMediumDimensionMetadata", @@ -14265,7 +14317,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index e60167bcd56..16e33039772 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -2902,9 +2902,14 @@ type GoogleCloudContactcenterinsightsV1Dimension struct { // "AGENT_DEPLOYMENT_ID" - The dimension is keyed by the agent deployment ID. // "AGENT_ASSIST_SUPERVISOR_ID" - The dimension is keyed by the supervisor ID // of the assigned human supervisor for virtual agents. + // "LABEL_KEY" - The dimension is keyed by label keys. + // "LABEL_VALUE" - The dimension is keyed by label values. + // "LABEL_KEY_AND_VALUE" - The dimension is keyed by label key-value pairs. DimensionKey string `json:"dimensionKey,omitempty"` // IssueDimensionMetadata: Output only. Metadata about the issue dimension. IssueDimensionMetadata *GoogleCloudContactcenterinsightsV1DimensionIssueDimensionMetadata `json:"issueDimensionMetadata,omitempty"` + // LabelDimensionMetadata: Output only. Metadata about conversation labels. + LabelDimensionMetadata *GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata `json:"labelDimensionMetadata,omitempty"` // MediumDimensionMetadata: Output only. Metadata about the conversation medium // dimension. MediumDimensionMetadata *GoogleCloudContactcenterinsightsV1DimensionMediumDimensionMetadata `json:"mediumDimensionMetadata,omitempty"` @@ -3104,6 +3109,31 @@ func (s GoogleCloudContactcenterinsightsV1DimensionIssueDimensionMetadata) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata: Metadata +// about conversation labels. +type GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata struct { + // LabelKey: Optional. The label key. + LabelKey string `json:"labelKey,omitempty"` + // LabelValue: Optional. The label value. + LabelValue string `json:"labelValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "LabelKey") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LabelKey") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudContactcenterinsightsV1DimensionMediumDimensionMetadata: Metadata // about the conversation medium dimension. type GoogleCloudContactcenterinsightsV1DimensionMediumDimensionMetadata struct { @@ -9012,9 +9042,14 @@ type GoogleCloudContactcenterinsightsV1alpha1Dimension struct { // "AGENT_DEPLOYMENT_ID" - The dimension is keyed by the agent deployment ID. // "AGENT_ASSIST_SUPERVISOR_ID" - The dimension is keyed by the supervisor ID // of the assigned human supervisor for virtual agents. + // "LABEL_KEY" - The dimension is keyed by label keys. + // "LABEL_VALUE" - The dimension is keyed by label values. + // "LABEL_KEY_AND_VALUE" - The dimension is keyed by label key-value pairs. DimensionKey string `json:"dimensionKey,omitempty"` // IssueDimensionMetadata: Output only. Metadata about the issue dimension. IssueDimensionMetadata *GoogleCloudContactcenterinsightsV1alpha1DimensionIssueDimensionMetadata `json:"issueDimensionMetadata,omitempty"` + // LabelDimensionMetadata: Output only. Metadata about conversation labels. + LabelDimensionMetadata *GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata `json:"labelDimensionMetadata,omitempty"` // MediumDimensionMetadata: Output only. Metadata about the conversation medium // dimension. MediumDimensionMetadata *GoogleCloudContactcenterinsightsV1alpha1DimensionMediumDimensionMetadata `json:"mediumDimensionMetadata,omitempty"` @@ -9215,6 +9250,31 @@ func (s GoogleCloudContactcenterinsightsV1alpha1DimensionIssueDimensionMetadata) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata: +// Metadata about conversation labels. +type GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata struct { + // LabelKey: Optional. The label key. + LabelKey string `json:"labelKey,omitempty"` + // LabelValue: Optional. The label value. + LabelValue string `json:"labelValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "LabelKey") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LabelKey") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1alpha1DimensionLabelDimensionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudContactcenterinsightsV1alpha1DimensionMediumDimensionMetadata: // Metadata about the conversation medium dimension. type GoogleCloudContactcenterinsightsV1alpha1DimensionMediumDimensionMetadata struct { @@ -12237,8 +12297,8 @@ type GoogleLongrunningListOperationsResponse struct { Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -19202,9 +19262,9 @@ func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsOperationsListCall) P // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsOperationsListCall { @@ -27729,9 +27789,9 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 86a70f66b3f..c2fad032b3c 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2660,7 +2660,7 @@ } } }, - "revision": "20251028", + "revision": "20251104", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -4153,6 +4153,10 @@ ], "type": "string" }, + "desiredPrivilegedAdmissionConfig": { + "$ref": "PrivilegedAdmissionConfig", + "description": "The desired privileged admission config for the cluster." + }, "desiredRbacBindingConfig": { "$ref": "RBACBindingConfig", "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." @@ -5647,7 +5651,7 @@ "additionalProperties": { "type": "string" }, - "description": "The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. The following parameters are supported. net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog net.core.rmem_max net.core.rmem_default net.core.wmem_default net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_max_orphans net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets net.netfilter.nf_conntrack_tcp_timeout_close_wait net.netfilter.nf_conntrack_tcp_timeout_time_wait net.netfilter.nf_conntrack_tcp_timeout_established net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall fs.aio-max-nr fs.file-max fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor vm.min_free_kbytes", + "description": "The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. The following parameters are supported. net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog net.core.rmem_max net.core.rmem_default net.core.wmem_default net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_mtu_probing net.ipv4.tcp_max_orphans net.ipv4.tcp_max_tw_buckets net.ipv4.tcp_syn_retries net.ipv4.tcp_ecn net.ipv4.tcp_congestion_control net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets net.netfilter.nf_conntrack_tcp_timeout_close_wait net.netfilter.nf_conntrack_tcp_timeout_time_wait net.netfilter.nf_conntrack_tcp_timeout_established net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall kernel.perf_event_paranoid kernel.sched_rt_runtime_us kernel.softlockup_panic kernel.yama.ptrace_scope kernel.kptr_restrict kernel.dmesg_restrict kernel.sysrq fs.aio-max-nr fs.file-max fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio vm.dirty_background_bytes vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_bytes vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor vm.min_free_kbytes", "type": "object" }, "transparentHugepageDefrag": { @@ -9413,6 +9417,14 @@ "description": "The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control plane nodes.", "type": "string" }, + "controlPlaneDiskEncryptionKeyVersions": { + "description": "Output only. All of the versions of the Cloud KMS cryptoKey that are used by Confidential Hyperdisks on the control plane nodes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "etcdApiCa": { "description": "Resource path of the Certificate Authority Service caPool to use for the etcd API CA in this cluster.", "type": "string" diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 67f047085dc..0631289b2fb 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -1951,6 +1951,9 @@ type ClusterUpdate struct { // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access // to and from Google Services DesiredPrivateIpv6GoogleAccess string `json:"desiredPrivateIpv6GoogleAccess,omitempty"` + // DesiredPrivilegedAdmissionConfig: The desired privileged admission config + // for the cluster. + DesiredPrivilegedAdmissionConfig *PrivilegedAdmissionConfig `json:"desiredPrivilegedAdmissionConfig,omitempty"` // DesiredRbacBindingConfig: RBACBindingConfig allows user to restrict // ClusterRoleBindings an RoleBindings that can be created. DesiredRbacBindingConfig *RBACBindingConfig `json:"desiredRbacBindingConfig,omitempty"` @@ -3971,18 +3974,23 @@ type LinuxNodeConfig struct { // net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog // net.core.rmem_max net.core.rmem_default net.core.wmem_default // net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem - // net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_max_orphans + // net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_mtu_probing + // net.ipv4.tcp_max_orphans net.ipv4.tcp_max_tw_buckets + // net.ipv4.tcp_syn_retries net.ipv4.tcp_ecn net.ipv4.tcp_congestion_control // net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets // net.netfilter.nf_conntrack_tcp_timeout_close_wait // net.netfilter.nf_conntrack_tcp_timeout_time_wait // net.netfilter.nf_conntrack_tcp_timeout_established // net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall - // fs.aio-max-nr fs.file-max fs.inotify.max_user_instances - // fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio - // vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_writeback_centisecs - // vm.max_map_count vm.overcommit_memory vm.overcommit_ratio - // vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor - // vm.min_free_kbytes + // kernel.perf_event_paranoid kernel.sched_rt_runtime_us + // kernel.softlockup_panic kernel.yama.ptrace_scope kernel.kptr_restrict + // kernel.dmesg_restrict kernel.sysrq fs.aio-max-nr fs.file-max + // fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open + // vm.dirty_background_ratio vm.dirty_background_bytes + // vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_bytes + // vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory + // vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness + // vm.watermark_scale_factor vm.min_free_kbytes Sysctls map[string]string `json:"sysctls,omitempty"` // TransparentHugepageDefrag: Optional. Defines the transparent hugepage defrag // configuration on the node. VM hugepage allocation can be managed by either @@ -8826,6 +8834,10 @@ type UserManagedKeysConfig struct { // ControlPlaneDiskEncryptionKey: The Cloud KMS cryptoKey to use for // Confidential Hyperdisk on the control plane nodes. ControlPlaneDiskEncryptionKey string `json:"controlPlaneDiskEncryptionKey,omitempty"` + // ControlPlaneDiskEncryptionKeyVersions: Output only. All of the versions of + // the Cloud KMS cryptoKey that are used by Confidential Hyperdisks on the + // control plane nodes. + ControlPlaneDiskEncryptionKeyVersions []string `json:"controlPlaneDiskEncryptionKeyVersions,omitempty"` // EtcdApiCa: Resource path of the Certificate Authority Service caPool to use // for the etcd API CA in this cluster. EtcdApiCa string `json:"etcdApiCa,omitempty"` diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index b94570c5e4d..a622ccafa07 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2741,7 +2741,7 @@ } } }, - "revision": "20251028", + "revision": "20251104", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -4417,6 +4417,10 @@ ], "type": "string" }, + "desiredPrivilegedAdmissionConfig": { + "$ref": "PrivilegedAdmissionConfig", + "description": "The desired privileged admission config for the cluster." + }, "desiredProtectConfig": { "$ref": "ProtectConfig", "deprecated": true, @@ -6119,7 +6123,7 @@ "additionalProperties": { "type": "string" }, - "description": "The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. The following parameters are supported. net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog net.core.rmem_max net.core.rmem_default net.core.wmem_default net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_max_orphans net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets net.netfilter.nf_conntrack_tcp_timeout_close_wait net.netfilter.nf_conntrack_tcp_timeout_time_wait net.netfilter.nf_conntrack_tcp_timeout_established net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall fs.aio-max-nr fs.file-max fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor vm.min_free_kbytes", + "description": "The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. The following parameters are supported. net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog net.core.rmem_max net.core.rmem_default net.core.wmem_default net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_mtu_probing net.ipv4.tcp_max_orphans net.ipv4.tcp_max_tw_buckets net.ipv4.tcp_syn_retries net.ipv4.tcp_ecn net.ipv4.tcp_congestion_control net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets net.netfilter.nf_conntrack_tcp_timeout_close_wait net.netfilter.nf_conntrack_tcp_timeout_time_wait net.netfilter.nf_conntrack_tcp_timeout_established net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall kernel.perf_event_paranoid kernel.sched_rt_runtime_us kernel.softlockup_panic kernel.yama.ptrace_scope kernel.kptr_restrict kernel.dmesg_restrict kernel.sysrq fs.aio-max-nr fs.file-max fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio vm.dirty_background_bytes vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_bytes vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor vm.min_free_kbytes", "type": "object" }, "transparentHugepageDefrag": { @@ -10238,6 +10242,14 @@ "description": "The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control plane nodes.", "type": "string" }, + "controlPlaneDiskEncryptionKeyVersions": { + "description": "Output only. All of the versions of the Cloud KMS cryptoKey that are used by Confidential Hyperdisks on the control plane nodes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "etcdApiCa": { "description": "Resource path of the Certificate Authority Service caPool to use for the etcd API CA in this cluster.", "type": "string" diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index b9e50b6ec58..aab9197b6f6 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -2143,6 +2143,9 @@ type ClusterUpdate struct { // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access // to and from Google Services DesiredPrivateIpv6GoogleAccess string `json:"desiredPrivateIpv6GoogleAccess,omitempty"` + // DesiredPrivilegedAdmissionConfig: The desired privileged admission config + // for the cluster. + DesiredPrivilegedAdmissionConfig *PrivilegedAdmissionConfig `json:"desiredPrivilegedAdmissionConfig,omitempty"` // DesiredProtectConfig: Deprecated: Use DesiredSecurityPostureConfig instead. // Enable/Disable Protect API features for the cluster. DesiredProtectConfig *ProtectConfig `json:"desiredProtectConfig,omitempty"` @@ -4482,18 +4485,23 @@ type LinuxNodeConfig struct { // net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog // net.core.rmem_max net.core.rmem_default net.core.wmem_default // net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem - // net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_max_orphans + // net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_mtu_probing + // net.ipv4.tcp_max_orphans net.ipv4.tcp_max_tw_buckets + // net.ipv4.tcp_syn_retries net.ipv4.tcp_ecn net.ipv4.tcp_congestion_control // net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets // net.netfilter.nf_conntrack_tcp_timeout_close_wait // net.netfilter.nf_conntrack_tcp_timeout_time_wait // net.netfilter.nf_conntrack_tcp_timeout_established // net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall - // fs.aio-max-nr fs.file-max fs.inotify.max_user_instances - // fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio - // vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_writeback_centisecs - // vm.max_map_count vm.overcommit_memory vm.overcommit_ratio - // vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor - // vm.min_free_kbytes + // kernel.perf_event_paranoid kernel.sched_rt_runtime_us + // kernel.softlockup_panic kernel.yama.ptrace_scope kernel.kptr_restrict + // kernel.dmesg_restrict kernel.sysrq fs.aio-max-nr fs.file-max + // fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open + // vm.dirty_background_ratio vm.dirty_background_bytes + // vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_bytes + // vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory + // vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness + // vm.watermark_scale_factor vm.min_free_kbytes Sysctls map[string]string `json:"sysctls,omitempty"` // TransparentHugepageDefrag: Optional. Defines the transparent hugepage defrag // configuration on the node. VM hugepage allocation can be managed by either @@ -9772,6 +9780,10 @@ type UserManagedKeysConfig struct { // ControlPlaneDiskEncryptionKey: The Cloud KMS cryptoKey to use for // Confidential Hyperdisk on the control plane nodes. ControlPlaneDiskEncryptionKey string `json:"controlPlaneDiskEncryptionKey,omitempty"` + // ControlPlaneDiskEncryptionKeyVersions: Output only. All of the versions of + // the Cloud KMS cryptoKey that are used by Confidential Hyperdisks on the + // control plane nodes. + ControlPlaneDiskEncryptionKeyVersions []string `json:"controlPlaneDiskEncryptionKeyVersions,omitempty"` // EtcdApiCa: Resource path of the Certificate Authority Service caPool to use // for the etcd API CA in this cluster. EtcdApiCa string `json:"etcdApiCa,omitempty"` diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 5903ffad66d..c0dcc67ba4f 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -3872,294 +3872,6 @@ } } }, - "returnaddress": { - "methods": { - "custombatch": { - "description": "Batches multiple return address related calls in a single request.", - "flatPath": "returnaddress/batch", - "httpMethod": "POST", - "id": "content.returnaddress.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "returnaddress/batch", - "request": { - "$ref": "ReturnaddressCustomBatchRequest" - }, - "response": { - "$ref": "ReturnaddressCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a return address for the given Merchant Center account.", - "flatPath": "{merchantId}/returnaddress/{returnAddressId}", - "httpMethod": "DELETE", - "id": "content.returnaddress.delete", - "parameterOrder": [ - "merchantId", - "returnAddressId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account from which to delete the given return address.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnAddressId": { - "description": "Return address ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress/{returnAddressId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets a return address of the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress/{returnAddressId}", - "httpMethod": "GET", - "id": "content.returnaddress.get", - "parameterOrder": [ - "merchantId", - "returnAddressId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to get a return address for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnAddressId": { - "description": "Return address ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress/{returnAddressId}", - "response": { - "$ref": "ReturnAddress" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "insert": { - "description": "Inserts a return address for the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress", - "httpMethod": "POST", - "id": "content.returnaddress.insert", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to insert a return address for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress", - "request": { - "$ref": "ReturnAddress" - }, - "response": { - "$ref": "ReturnAddress" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the return addresses of the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress", - "httpMethod": "GET", - "id": "content.returnaddress.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "country": { - "description": "List only return addresses applicable to the given country of sale. When omitted, all return addresses are listed.", - "location": "query", - "type": "string" - }, - "maxResults": { - "description": "The maximum number of addresses in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account to list return addresses for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/returnaddress", - "response": { - "$ref": "ReturnaddressListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "returnpolicy": { - "methods": { - "custombatch": { - "description": "Batches multiple return policy related calls in a single request.", - "flatPath": "returnpolicy/batch", - "httpMethod": "POST", - "id": "content.returnpolicy.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "returnpolicy/batch", - "request": { - "$ref": "ReturnpolicyCustomBatchRequest" - }, - "response": { - "$ref": "ReturnpolicyCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a return policy for the given Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", - "httpMethod": "DELETE", - "id": "content.returnpolicy.delete", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account from which to delete the given return policy.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Return policy ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy/{returnPolicyId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets a return policy of the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", - "httpMethod": "GET", - "id": "content.returnpolicy.get", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to get a return policy for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Return policy ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy/{returnPolicyId}", - "response": { - "$ref": "ReturnPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "insert": { - "description": "Inserts a return policy for the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy", - "httpMethod": "POST", - "id": "content.returnpolicy.insert", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to insert a return policy for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy", - "request": { - "$ref": "ReturnPolicy" - }, - "response": { - "$ref": "ReturnPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the return policies of the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy", - "httpMethod": "GET", - "id": "content.returnpolicy.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to list return policies for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy", - "response": { - "$ref": "ReturnpolicyListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, "returnpolicyonline": { "methods": { "create": { @@ -4570,7 +4282,7 @@ } } }, - "revision": "20251104", + "revision": "20251112", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -12752,119 +12464,6 @@ }, "type": "object" }, - "ReturnAddress": { - "description": "Return address resource.", - "id": "ReturnAddress", - "properties": { - "address": { - "$ref": "ReturnAddressAddress", - "description": "Required. The address." - }, - "country": { - "description": "Required. The country of sale where the return address is applicable.", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnAddress`\"", - "type": "string" - }, - "label": { - "description": "Required. The user-defined label of the return address. For the default address, use the label \"default\".", - "type": "string" - }, - "phoneNumber": { - "description": "Required. The merchant's contact phone number regarding the return.", - "type": "string" - }, - "returnAddressId": { - "description": "Return address ID generated by Google.", - "type": "string" - } - }, - "type": "object" - }, - "ReturnAddressAddress": { - "id": "ReturnAddressAddress", - "properties": { - "country": { - "description": "CLDR country code (for example, \"US\").", - "type": "string" - }, - "locality": { - "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", - "type": "string" - }, - "postalCode": { - "description": "Postal code or ZIP (for example, \"94043\").", - "type": "string" - }, - "recipientName": { - "description": "Name of the recipient to address returns to.", - "type": "string" - }, - "region": { - "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", - "type": "string" - }, - "streetAddress": { - "description": "Street-level part of the address. May be up to two lines, each line specified as an array element.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReturnPolicy": { - "description": "Return policy resource.", - "id": "ReturnPolicy", - "properties": { - "country": { - "description": "Required. The country of sale where the return policy is applicable.", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnPolicy`\"", - "type": "string" - }, - "label": { - "description": "Required. The user-defined label of the return policy. For the default policy, use the label \"default\".", - "type": "string" - }, - "name": { - "description": "Required. The name of the policy as shown in Merchant Center.", - "type": "string" - }, - "nonFreeReturnReasons": { - "description": "Return reasons that will incur return fees.", - "items": { - "type": "string" - }, - "type": "array" - }, - "policy": { - "$ref": "ReturnPolicyPolicy", - "description": "Required. The policy." - }, - "returnPolicyId": { - "description": "Return policy ID generated by Google.", - "type": "string" - }, - "returnShippingFee": { - "$ref": "Price", - "description": "The return shipping fee that will apply to non free return reasons." - }, - "seasonalOverrides": { - "description": "An optional list of seasonal overrides.", - "items": { - "$ref": "ReturnPolicySeasonalOverride" - }, - "type": "array" - } - }, - "type": "object" - }, "ReturnPolicyOnline": { "description": "Return policy online object. This is currently used to represent return policies for ads and free listings programs.", "id": "ReturnPolicyOnline", @@ -13057,245 +12656,6 @@ }, "type": "object" }, - "ReturnPolicyPolicy": { - "id": "ReturnPolicyPolicy", - "properties": { - "lastReturnDate": { - "description": "Required. Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to \"lastReturnDate\". Use this for seasonal overrides only.", - "type": "string" - }, - "numberOfDays": { - "description": "The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to \"numberOfDaysAfterDelivery\". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "Policy type. Use \"lastReturnDate\" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items. Acceptable values are: - \"`lastReturnDate`\" - \"`lifetimeReturns`\" - \"`noReturns`\" - \"`numberOfDaysAfterDelivery`\" ", - "type": "string" - } - }, - "type": "object" - }, - "ReturnPolicySeasonalOverride": { - "id": "ReturnPolicySeasonalOverride", - "properties": { - "endDate": { - "description": "Required. Last day on which the override applies. In ISO 8601 format.", - "type": "string" - }, - "name": { - "description": "Required. The name of the seasonal override as shown in Merchant Center.", - "type": "string" - }, - "policy": { - "$ref": "ReturnPolicyPolicy", - "description": "Required. The policy which is in effect during that time." - }, - "startDate": { - "description": "Required. First day on which the override applies. In ISO 8601 format.", - "type": "string" - } - }, - "type": "object" - }, - "ReturnaddressCustomBatchRequest": { - "id": "ReturnaddressCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "ReturnaddressCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReturnaddressCustomBatchRequestEntry": { - "id": "ReturnaddressCustomBatchRequestEntry", - "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account ID.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "Method of the batch request entry. Acceptable values are: - \"`delete`\" - \"`get`\" - \"`insert`\" ", - "type": "string" - }, - "returnAddress": { - "$ref": "ReturnAddress", - "description": "The return address to submit. This should be set only if the method is `insert`." - }, - "returnAddressId": { - "description": "The return address ID. This should be set only if the method is `delete` or `get`.", - "type": "string" - } - }, - "type": "object" - }, - "ReturnaddressCustomBatchResponse": { - "id": "ReturnaddressCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "ReturnaddressCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnaddressCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "ReturnaddressCustomBatchResponseEntry": { - "id": "ReturnaddressCustomBatchResponseEntry", - "properties": { - "batchId": { - "description": "The ID of the request entry to which this entry responds.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors defined if, and only if, the request failed." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnaddressCustomBatchResponseEntry`\"", - "type": "string" - }, - "returnAddress": { - "$ref": "ReturnAddress", - "description": "The retrieved return address." - } - }, - "type": "object" - }, - "ReturnaddressListResponse": { - "id": "ReturnaddressListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnaddressListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of addresses.", - "type": "string" - }, - "resources": { - "items": { - "$ref": "ReturnAddress" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReturnpolicyCustomBatchRequest": { - "id": "ReturnpolicyCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "ReturnpolicyCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReturnpolicyCustomBatchRequestEntry": { - "id": "ReturnpolicyCustomBatchRequestEntry", - "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account ID.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "Method of the batch request entry. Acceptable values are: - \"`delete`\" - \"`get`\" - \"`insert`\" ", - "type": "string" - }, - "returnPolicy": { - "$ref": "ReturnPolicy", - "description": "The return policy to submit. This should be set only if the method is `insert`." - }, - "returnPolicyId": { - "description": "The return policy ID. This should be set only if the method is `delete` or `get`.", - "type": "string" - } - }, - "type": "object" - }, - "ReturnpolicyCustomBatchResponse": { - "id": "ReturnpolicyCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "ReturnpolicyCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnpolicyCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "ReturnpolicyCustomBatchResponseEntry": { - "id": "ReturnpolicyCustomBatchResponseEntry", - "properties": { - "batchId": { - "description": "The ID of the request entry to which this entry responds.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors defined if, and only if, the request failed." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnpolicyCustomBatchResponseEntry`\"", - "type": "string" - }, - "returnPolicy": { - "$ref": "ReturnPolicy", - "description": "The retrieved return policy." - } - }, - "type": "object" - }, - "ReturnpolicyListResponse": { - "id": "ReturnpolicyListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#returnpolicyListResponse`\".", - "type": "string" - }, - "resources": { - "items": { - "$ref": "ReturnPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, "Row": { "id": "Row", "properties": { diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index a871892f701..9450df6733c 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -143,8 +143,6 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, s.Regionalinventory = NewRegionalinventoryService(s) s.Regions = NewRegionsService(s) s.Reports = NewReportsService(s) - s.Returnaddress = NewReturnaddressService(s) - s.Returnpolicy = NewReturnpolicyService(s) s.Returnpolicyonline = NewReturnpolicyonlineService(s) s.Shippingsettings = NewShippingsettingsService(s) s.Shoppingadsprogram = NewShoppingadsprogramService(s) @@ -222,10 +220,6 @@ type APIService struct { Reports *ReportsService - Returnaddress *ReturnaddressService - - Returnpolicy *ReturnpolicyService - Returnpolicyonline *ReturnpolicyonlineService Shippingsettings *ShippingsettingsService @@ -513,24 +507,6 @@ type ReportsService struct { s *APIService } -func NewReturnaddressService(s *APIService) *ReturnaddressService { - rs := &ReturnaddressService{s: s} - return rs -} - -type ReturnaddressService struct { - s *APIService -} - -func NewReturnpolicyService(s *APIService) *ReturnpolicyService { - rs := &ReturnpolicyService{s: s} - return rs -} - -type ReturnpolicyService struct { - s *APIService -} - func NewReturnpolicyonlineService(s *APIService) *ReturnpolicyonlineService { rs := &ReturnpolicyonlineService{s: s} return rs @@ -10997,124 +10973,6 @@ func (s RequestReviewShoppingAdsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ReturnAddress: Return address resource. -type ReturnAddress struct { - // Address: Required. The address. - Address *ReturnAddressAddress `json:"address,omitempty"` - // Country: Required. The country of sale where the return address is - // applicable. - Country string `json:"country,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnAddress" - Kind string `json:"kind,omitempty"` - // Label: Required. The user-defined label of the return address. For the - // default address, use the label "default". - Label string `json:"label,omitempty"` - // PhoneNumber: Required. The merchant's contact phone number regarding the - // return. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ReturnAddressId: Return address ID generated by Google. - ReturnAddressId string `json:"returnAddressId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnAddress) MarshalJSON() ([]byte, error) { - type NoMethod ReturnAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnAddressAddress struct { - // Country: CLDR country code (for example, "US"). - Country string `json:"country,omitempty"` - // Locality: City, town or commune. May also include dependent localities or - // sublocalities (for example, neighborhoods or suburbs). - Locality string `json:"locality,omitempty"` - // PostalCode: Postal code or ZIP (for example, "94043"). - PostalCode string `json:"postalCode,omitempty"` - // RecipientName: Name of the recipient to address returns to. - RecipientName string `json:"recipientName,omitempty"` - // Region: Top-level administrative subdivision of the country. For example, a - // state like California ("CA") or a province like Quebec ("QC"). - Region string `json:"region,omitempty"` - // StreetAddress: Street-level part of the address. May be up to two lines, - // each line specified as an array element. - StreetAddress []string `json:"streetAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnAddressAddress) MarshalJSON() ([]byte, error) { - type NoMethod ReturnAddressAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicy: Return policy resource. -type ReturnPolicy struct { - // Country: Required. The country of sale where the return policy is - // applicable. - Country string `json:"country,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnPolicy" - Kind string `json:"kind,omitempty"` - // Label: Required. The user-defined label of the return policy. For the - // default policy, use the label "default". - Label string `json:"label,omitempty"` - // Name: Required. The name of the policy as shown in Merchant Center. - Name string `json:"name,omitempty"` - // NonFreeReturnReasons: Return reasons that will incur return fees. - NonFreeReturnReasons []string `json:"nonFreeReturnReasons,omitempty"` - // Policy: Required. The policy. - Policy *ReturnPolicyPolicy `json:"policy,omitempty"` - // ReturnPolicyId: Return policy ID generated by Google. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ReturnShippingFee: The return shipping fee that will apply to non free - // return reasons. - ReturnShippingFee *Price `json:"returnShippingFee,omitempty"` - // SeasonalOverrides: An optional list of seasonal overrides. - SeasonalOverrides []*ReturnPolicySeasonalOverride `json:"seasonalOverrides,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ReturnPolicyOnline: Return policy online object. This is currently used to // represent return policies for ads and free listings programs. type ReturnPolicyOnline struct { @@ -11317,214 +11175,394 @@ func (s ReturnPolicyOnlineReturnShippingFee) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnPolicyPolicy struct { - // LastReturnDate: Required. Last day for returning the items. In ISO 8601 - // format. When specifying the return window like this, set the policy type to - // "lastReturnDate". Use this for seasonal overrides only. - LastReturnDate string `json:"lastReturnDate,omitempty"` - // NumberOfDays: The number of days items can be returned after delivery, where - // one day is defined to be 24 hours after the delivery timestamp. When - // specifying the return window like this, set the policy type to - // "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, - // 270 and 365 for the default policy. Additional policies further allow 14, - // 15, 21 and 28 days, but note that for most items a minimum of 30 days is - // required for returns. Exceptions may be made for electronics. A policy of - // less than 30 days can only be applied to those items. - NumberOfDays int64 `json:"numberOfDays,omitempty,string"` - // Type: Policy type. Use "lastReturnDate" for seasonal overrides only. Note - // that for most items a minimum of 30 days is required for returns. Exceptions - // may be made for electronics or non-returnable items such as food, - // perishables, and living things. A policy of less than 30 days can only be - // applied to those items. Acceptable values are: - "lastReturnDate" - - // "lifetimeReturns" - "noReturns" - "numberOfDaysAfterDelivery" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastReturnDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +type Row struct { + // Cells: The list of cells that constitute the row. Must have the same length + // as `columnHeaders` for two-dimensional tables, a length of 1 for + // one-dimensional tables. Required. + Cells []*Value `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastReturnDate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnPolicyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyPolicy +func (s Row) MarshalJSON() ([]byte, error) { + type NoMethod Row return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnPolicySeasonalOverride struct { - // EndDate: Required. Last day on which the override applies. In ISO 8601 - // format. - EndDate string `json:"endDate,omitempty"` - // Name: Required. The name of the seasonal override as shown in Merchant - // Center. - Name string `json:"name,omitempty"` - // Policy: Required. The policy which is in effect during that time. - Policy *ReturnPolicyPolicy `json:"policy,omitempty"` - // StartDate: Required. First day on which the override applies. In ISO 8601 - // format. - StartDate string `json:"startDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// SearchRequest: Request message for the ReportService.Search method. +type SearchRequest struct { + // PageSize: Number of ReportRows to retrieve in a single page. Defaults to + // 1000. Values above 5000 are coerced to 5000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: Token of the page to retrieve. If not specified, the first page + // of results is returned. In order to request the next page of results, the + // value obtained from `next_page_token` in the previous response should be + // used. + PageToken string `json:"pageToken,omitempty"` + // Query: Required. Query that defines performance metrics to retrieve and + // dimensions according to which the metrics are to be segmented. For details + // on how to construct your query, see the Query Language guide + // (https://developers.google.com/shopping-content/guides/reports/query-language/overview). + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSize") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndDate") to include in API + // NullFields is a list of field names (e.g. "PageSize") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnPolicySeasonalOverride) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicySeasonalOverride +func (s SearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod SearchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnaddressCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ReturnaddressCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// SearchResponse: Response message for the ReportService.Search method. +type SearchResponse struct { + // NextPageToken: Token which can be sent as `page_token` to retrieve the next + // page. If omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Results: Rows that matched the search query. + Results []*ReportRow `json:"results,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API + // NullFields is a list of field names (e.g. "NextPageToken") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnaddressCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchRequest +func (s SearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod SearchResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnaddressCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The Merchant Center account ID. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "delete" - "get" - "insert" - Method string `json:"method,omitempty"` - // ReturnAddress: The return address to submit. This should be set only if the - // method is `insert`. - ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` - // ReturnAddressId: The return address ID. This should be set only if the - // method is `delete` or `get`. - ReturnAddressId string `json:"returnAddressId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally +// Segments: Dimensions according to which metrics are segmented in the +// response. Values of product dimensions, such as `offer_id`, reflect the +// state of a product at the time of the corresponding event, for example, +// impression or order. Segment fields cannot be selected in queries without +// also selecting at least one metric field. Values are only set for dimensions +// requested explicitly in the request's search query. +type Segments struct { + // Brand: Brand of the product. + Brand string `json:"brand,omitempty"` + // CategoryL1: Product category (1st level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL1 string `json:"categoryL1,omitempty"` + // CategoryL2: Product category (2nd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL2 string `json:"categoryL2,omitempty"` + // CategoryL3: Product category (3rd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL3 string `json:"categoryL3,omitempty"` + // CategoryL4: Product category (4th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL4 string `json:"categoryL4,omitempty"` + // CategoryL5: Product category (5th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL5 string `json:"categoryL5,omitempty"` + // CurrencyCode: Currency in which price metrics are represented, for example, + // if you select `ordered_item_sales_micros`, the returned value will be + // represented by this currency. + CurrencyCode string `json:"currencyCode,omitempty"` + // CustomLabel0: Custom label 0 for custom grouping of products. + CustomLabel0 string `json:"customLabel0,omitempty"` + // CustomLabel1: Custom label 1 for custom grouping of products. + CustomLabel1 string `json:"customLabel1,omitempty"` + // CustomLabel2: Custom label 2 for custom grouping of products. + CustomLabel2 string `json:"customLabel2,omitempty"` + // CustomLabel3: Custom label 3 for custom grouping of products. + CustomLabel3 string `json:"customLabel3,omitempty"` + // CustomLabel4: Custom label 4 for custom grouping of products. + CustomLabel4 string `json:"customLabel4,omitempty"` + // CustomerCountryCode: Code of the country where the customer is located at + // the time of the event. Represented in the ISO 3166 format. If the customer + // country cannot be determined, a special 'ZZ' code is returned. + CustomerCountryCode string `json:"customerCountryCode,omitempty"` + // Date: Date in the merchant timezone to which metrics apply. + Date *Date `json:"date,omitempty"` + // OfferId: Merchant-provided id of the product. + OfferId string `json:"offerId,omitempty"` + // ProductTypeL1: Product type (1st level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL1 string `json:"productTypeL1,omitempty"` + // ProductTypeL2: Product type (2nd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL2 string `json:"productTypeL2,omitempty"` + // ProductTypeL3: Product type (3rd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL3 string `json:"productTypeL3,omitempty"` + // ProductTypeL4: Product type (4th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL4 string `json:"productTypeL4,omitempty"` + // ProductTypeL5: Product type (5th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL5 string `json:"productTypeL5,omitempty"` + // Program: Program to which metrics apply, for example, Free Product Listing. + // + // Possible values: + // "PROGRAM_UNSPECIFIED" - Not specified. + // "SHOPPING_ADS" - Shopping Ads. + // "FREE_PRODUCT_LISTING" - Free Product Listing. + // "FREE_LOCAL_PRODUCT_LISTING" - Free Local Product Listing. + // "BUY_ON_GOOGLE_LISTING" - *Deprecated*: This value is no longer supported. + // Retrieving all metrics for the `BUY_ON_GOOGLE_LISTING` program returns 0 + // starting from May 2024. Buy on Google Listing. + Program string `json:"program,omitempty"` + // Title: Title of the product. + Title string `json:"title,omitempty"` + // Week: First day of the week (Monday) of the metrics date in the merchant + // timezone. + Week *Date `json:"week,omitempty"` + // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API + // NullFields is a list of field names (e.g. "Brand") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnaddressCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchRequestEntry +func (s Segments) MarshalJSON() ([]byte, error) { + type NoMethod Segments return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnaddressCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ReturnaddressCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally +type Service struct { + // Active: A boolean exposing the active status of the shipping service. + // Required. + Active bool `json:"active,omitempty"` + // Currency: The CLDR code of the currency to which this service applies. Must + // match that of the prices in rate groups. + Currency string `json:"currency,omitempty"` + // DeliveryCountry: The CLDR territory code of the country to which the service + // applies. Required. + DeliveryCountry string `json:"deliveryCountry,omitempty"` + // DeliveryTime: Time spent in various aspects from order to the delivery of + // the product. Required. + DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` + // Eligibility: Eligibility for this service. Acceptable values are: - "All + // scenarios" - "All scenarios except Shopping Actions" - "Shopping + // Actions" + Eligibility string `json:"eligibility,omitempty"` + // MinimumOrderValue: Minimum order value for this service. If set, indicates + // that customers will have to spend at least this amount. All prices within a + // service must have the same currency. Cannot be set together with + // minimum_order_value_table. + MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` + // MinimumOrderValueTable: Table of per store minimum order values for the + // pickup fulfillment type. Cannot be set together with minimum_order_value. + MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` + // Name: Free-form name of the service. Must be unique within target account. + // Required. + Name string `json:"name,omitempty"` + // PickupService: The carrier-service pair delivering items to collection + // points. The list of supported pickup services can be retrieved through the + // `getSupportedPickupServices` method. Required if and only if the service + // delivery type is `pickup`. + PickupService *PickupCarrierService `json:"pickupService,omitempty"` + // RateGroups: Shipping rate group definitions. Only the last one is allowed to + // have an empty `applicableShippingLabels`, which means "everything else". The + // other `applicableShippingLabels` must not overlap. + RateGroups []*RateGroup `json:"rateGroups,omitempty"` + // ShipmentType: Type of locations this service ships orders to. Acceptable + // values are: - "delivery" - "pickup` (deprecated)" - "local_delivery" - + // "collection_point" + ShipmentType string `json:"shipmentType,omitempty"` + // StoreConfig: A list of stores your products are delivered from. This is only + // available for the local delivery shipment type. + StoreConfig *ServiceStoreConfig `json:"storeConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Active") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API + // NullFields is a list of field names (e.g. "Active") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnaddressCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchResponse +func (s Service) MarshalJSON() ([]byte, error) { + type NoMethod Service return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnaddressCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ReturnAddress: The retrieved return address. - ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// ServiceStoreConfig: Stores that provide local delivery. Only valid with +// local delivery fulfillment. +type ServiceStoreConfig struct { + // CutoffConfig: Time local delivery ends for the day. This can be either + // `local_cutoff_time` or `store_close_offset_hours`, if both are provided an + // error is thrown. + CutoffConfig *ServiceStoreConfigCutoffConfig `json:"cutoffConfig,omitempty"` + // ServiceRadius: Maximum delivery radius. Only needed for local delivery + // fulfillment type. + ServiceRadius *Distance `json:"serviceRadius,omitempty"` + // StoreCodes: A list of store codes that provide local delivery. If empty, + // then `store_service_type` must be `all_stores`, or an error is thrown. If + // not empty, then `store_service_type` must be `selected_stores`, or an error + // is thrown. + StoreCodes []string `json:"storeCodes,omitempty"` + // StoreServiceType: Indicates whether all stores listed by this merchant + // provide local delivery or not. Acceptable values are `all stores` and + // `selected stores` + StoreServiceType string `json:"storeServiceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CutoffConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API + // NullFields is a list of field names (e.g. "CutoffConfig") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnaddressCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchResponseEntry +func (s ServiceStoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnaddressListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of addresses. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ReturnAddress `json:"resources,omitempty"` +// ServiceStoreConfigCutoffConfig: Time local delivery ends for the day based +// on the local timezone of the store. `local_cutoff_time` and +// `store_close_offset_hours` are mutually exclusive. +type ServiceStoreConfigCutoffConfig struct { + // LocalCutoffTime: Time in hours and minutes in the local timezone when local + // delivery ends. + LocalCutoffTime *ServiceStoreConfigCutoffConfigLocalCutoffTime `json:"localCutoffTime,omitempty"` + // NoDeliveryPostCutoff: Merchants can opt-out of showing n+1 day local + // delivery when they have a shipping service configured to n day local + // delivery. For example, if the shipping service defines same-day delivery, + // and it's past the cut-off, setting this field to `true` results in the + // calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the + // same example, setting this field to `false` results in the calculated + // shipping time being one day. This is only for local delivery. + NoDeliveryPostCutoff bool `json:"noDeliveryPostCutoff,omitempty"` + // StoreCloseOffsetHours: Represents cutoff time as the number of hours before + // store closing. Mutually exclusive with other fields (hour and minute). + StoreCloseOffsetHours int64 `json:"storeCloseOffsetHours,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "LocalCutoffTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocalCutoffTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally +func (s ServiceStoreConfigCutoffConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfigCutoffConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ServiceStoreConfigCutoffConfigLocalCutoffTime: Time in hours and minutes in +// the local timezone when local delivery ends. +type ServiceStoreConfigCutoffConfigLocalCutoffTime struct { + // Hour: Hour local delivery orders must be placed by to process the same day. + Hour int64 `json:"hour,omitempty,string"` + // Minute: Minute local delivery orders must be placed by to process the same + // day. + Minute int64 `json:"minute,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests + // NullFields is a list of field names (e.g. "Hour") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnaddressListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressListResponse +func (s ServiceStoreConfigCutoffConfigLocalCutoffTime) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfigCutoffConfigLocalCutoffTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ShippingSettings: The merchant account's shipping settings. All methods +// except getsupportedcarriers and getsupportedholidays require the admin role. +type ShippingSettings struct { + // AccountId: The ID of the account to which these account shipping settings + // belong. Ignored upon update, always present in get request responses. + AccountId uint64 `json:"accountId,omitempty,string"` + // PostalCodeGroups: A list of postal code groups that can be referred to in + // `services`. Optional. + PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` + // Services: The target account's list of services. Optional. + Services []*Service `json:"services,omitempty"` + // Warehouses: Optional. A list of warehouses which can be referred to in + // `services`. + Warehouses []*Warehouse `json:"warehouses,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AccountId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ShippingSettings) MarshalJSON() ([]byte, error) { + type NoMethod ShippingSettings return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnpolicyCustomBatchRequest struct { +type ShippingsettingsCustomBatchRequest struct { // Entries: The request entries to be processed in the batch. - Entries []*ReturnpolicyCustomBatchRequestEntry `json:"entries,omitempty"` + Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -11538,48 +11576,50 @@ type ReturnpolicyCustomBatchRequest struct { NullFields []string `json:"-"` } -func (s ReturnpolicyCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchRequest +func (s ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnpolicyCustomBatchRequestEntry struct { +// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a single +// non-batch shippingsettings request. +type ShippingsettingsCustomBatchRequestEntry struct { + // AccountId: The ID of the account for which to get/update account shipping + // settings. + AccountId uint64 `json:"accountId,omitempty,string"` // BatchId: An entry ID, unique within the batch request. BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The Merchant Center account ID. + // MerchantId: The ID of the managing account. MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "delete" - "get" - "insert" + // Method: The method of the batch entry. Acceptable values are: - "get" - + // "update" Method string `json:"method,omitempty"` - // ReturnPolicy: The return policy to submit. This should be set only if the - // method is `insert`. - ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` - // ReturnPolicyId: The return policy ID. This should be set only if the method - // is `delete` or `get`. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ShippingSettings: The account shipping settings to update. Only defined if + // the method is `update`. + ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccountId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API + // NullFields is a list of field names (e.g. "AccountId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnpolicyCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchRequestEntry +func (s ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchRequestEntry return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnpolicyCustomBatchResponse struct { +type ShippingsettingsCustomBatchResponse struct { // Entries: The result of the execution of the batch requests. - Entries []*ReturnpolicyCustomBatchResponseEntry `json:"entries,omitempty"` + Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyCustomBatchResponse". + // "content#shippingsettingsCustomBatchResponse". Kind string `json:"kind,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -11597,21 +11637,24 @@ type ReturnpolicyCustomBatchResponse struct { NullFields []string `json:"-"` } -func (s ReturnpolicyCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchResponse +func (s ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnpolicyCustomBatchResponseEntry struct { +// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a single +// non-batch shipping settings response. +type ShippingsettingsCustomBatchResponseEntry struct { // BatchId: The ID of the request entry to which this entry responds. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyCustomBatchResponseEntry" + // "content#shippingsettingsCustomBatchResponseEntry" Kind string `json:"kind,omitempty"` - // ReturnPolicy: The retrieved return policy. - ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` + // ShippingSettings: The retrieved or updated account shipping settings. + ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -11625,2531 +11668,928 @@ type ReturnpolicyCustomBatchResponseEntry struct { NullFields []string `json:"-"` } -func (s ReturnpolicyCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchResponseEntry +func (s ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchResponseEntry return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ReturnpolicyListResponse struct { +type ShippingsettingsGetSupportedCarriersResponse struct { + // Carriers: A list of supported carriers. May be empty. + Carriers []*CarriersCarrier `json:"carriers,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyListResponse". - Kind string `json:"kind,omitempty"` - Resources []*ReturnPolicy `json:"resources,omitempty"` + // "content#shippingsettingsGetSupportedCarriersResponse". + Kind string `json:"kind,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Carriers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Carriers") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ReturnpolicyListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyListResponse +func (s ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedCarriersResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type Row struct { - // Cells: The list of cells that constitute the row. Must have the same length - // as `columnHeaders` for two-dimensional tables, a length of 1 for - // one-dimensional tables. Required. - Cells []*Value `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Row) MarshalJSON() ([]byte, error) { - type NoMethod Row - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} +type ShippingsettingsGetSupportedHolidaysResponse struct { + // Holidays: A list of holidays applicable for delivery guarantees. May be + // empty. + Holidays []*HolidaysHoliday `json:"holidays,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedHolidaysResponse". + Kind string `json:"kind,omitempty"` -// SearchRequest: Request message for the ReportService.Search method. -type SearchRequest struct { - // PageSize: Number of ReportRows to retrieve in a single page. Defaults to - // 1000. Values above 5000 are coerced to 5000. - PageSize int64 `json:"pageSize,omitempty"` - // PageToken: Token of the page to retrieve. If not specified, the first page - // of results is returned. In order to request the next page of results, the - // value obtained from `next_page_token` in the previous response should be - // used. - PageToken string `json:"pageToken,omitempty"` - // Query: Required. Query that defines performance metrics to retrieve and - // dimensions according to which the metrics are to be segmented. For details - // on how to construct your query, see the Query Language guide - // (https://developers.google.com/shopping-content/guides/reports/query-language/overview). - Query string `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSize") to + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Holidays") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSize") to include in API + // NullFields is a list of field names (e.g. "Holidays") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s SearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod SearchRequest +func (s ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedHolidaysResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// SearchResponse: Response message for the ReportService.Search method. -type SearchResponse struct { - // NextPageToken: Token which can be sent as `page_token` to retrieve the next - // page. If omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // Results: Rows that matched the search query. - Results []*ReportRow `json:"results,omitempty"` +type ShippingsettingsGetSupportedPickupServicesResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedPickupServicesResponse". + Kind string `json:"kind,omitempty"` + // PickupServices: A list of supported pickup services. May be empty. + PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s SearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod SearchResponse +func (s ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedPickupServicesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Segments: Dimensions according to which metrics are segmented in the -// response. Values of product dimensions, such as `offer_id`, reflect the -// state of a product at the time of the corresponding event, for example, -// impression or order. Segment fields cannot be selected in queries without -// also selecting at least one metric field. Values are only set for dimensions -// requested explicitly in the request's search query. -type Segments struct { - // Brand: Brand of the product. - Brand string `json:"brand,omitempty"` - // CategoryL1: Product category (1st level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL1 string `json:"categoryL1,omitempty"` - // CategoryL2: Product category (2nd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL2 string `json:"categoryL2,omitempty"` - // CategoryL3: Product category (3rd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL3 string `json:"categoryL3,omitempty"` - // CategoryL4: Product category (4th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL4 string `json:"categoryL4,omitempty"` - // CategoryL5: Product category (5th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL5 string `json:"categoryL5,omitempty"` - // CurrencyCode: Currency in which price metrics are represented, for example, - // if you select `ordered_item_sales_micros`, the returned value will be - // represented by this currency. - CurrencyCode string `json:"currencyCode,omitempty"` - // CustomLabel0: Custom label 0 for custom grouping of products. - CustomLabel0 string `json:"customLabel0,omitempty"` - // CustomLabel1: Custom label 1 for custom grouping of products. - CustomLabel1 string `json:"customLabel1,omitempty"` - // CustomLabel2: Custom label 2 for custom grouping of products. - CustomLabel2 string `json:"customLabel2,omitempty"` - // CustomLabel3: Custom label 3 for custom grouping of products. - CustomLabel3 string `json:"customLabel3,omitempty"` - // CustomLabel4: Custom label 4 for custom grouping of products. - CustomLabel4 string `json:"customLabel4,omitempty"` - // CustomerCountryCode: Code of the country where the customer is located at - // the time of the event. Represented in the ISO 3166 format. If the customer - // country cannot be determined, a special 'ZZ' code is returned. - CustomerCountryCode string `json:"customerCountryCode,omitempty"` - // Date: Date in the merchant timezone to which metrics apply. - Date *Date `json:"date,omitempty"` - // OfferId: Merchant-provided id of the product. - OfferId string `json:"offerId,omitempty"` - // ProductTypeL1: Product type (1st level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL1 string `json:"productTypeL1,omitempty"` - // ProductTypeL2: Product type (2nd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL2 string `json:"productTypeL2,omitempty"` - // ProductTypeL3: Product type (3rd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL3 string `json:"productTypeL3,omitempty"` - // ProductTypeL4: Product type (4th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL4 string `json:"productTypeL4,omitempty"` - // ProductTypeL5: Product type (5th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL5 string `json:"productTypeL5,omitempty"` - // Program: Program to which metrics apply, for example, Free Product Listing. - // - // Possible values: - // "PROGRAM_UNSPECIFIED" - Not specified. - // "SHOPPING_ADS" - Shopping Ads. - // "FREE_PRODUCT_LISTING" - Free Product Listing. - // "FREE_LOCAL_PRODUCT_LISTING" - Free Local Product Listing. - // "BUY_ON_GOOGLE_LISTING" - *Deprecated*: This value is no longer supported. - // Retrieving all metrics for the `BUY_ON_GOOGLE_LISTING` program returns 0 - // starting from May 2024. Buy on Google Listing. - Program string `json:"program,omitempty"` - // Title: Title of the product. - Title string `json:"title,omitempty"` - // Week: First day of the week (Monday) of the metrics date in the merchant - // timezone. - Week *Date `json:"week,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally +type ShippingsettingsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of shipping + // settings. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*ShippingSettings `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Brand") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s Segments) MarshalJSON() ([]byte, error) { - type NoMethod Segments +func (s ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsListResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type Service struct { - // Active: A boolean exposing the active status of the shipping service. - // Required. - Active bool `json:"active,omitempty"` - // Currency: The CLDR code of the currency to which this service applies. Must - // match that of the prices in rate groups. - Currency string `json:"currency,omitempty"` - // DeliveryCountry: The CLDR territory code of the country to which the service - // applies. Required. - DeliveryCountry string `json:"deliveryCountry,omitempty"` - // DeliveryTime: Time spent in various aspects from order to the delivery of - // the product. Required. - DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` - // Eligibility: Eligibility for this service. Acceptable values are: - "All - // scenarios" - "All scenarios except Shopping Actions" - "Shopping - // Actions" - Eligibility string `json:"eligibility,omitempty"` - // MinimumOrderValue: Minimum order value for this service. If set, indicates - // that customers will have to spend at least this amount. All prices within a - // service must have the same currency. Cannot be set together with - // minimum_order_value_table. - MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` - // MinimumOrderValueTable: Table of per store minimum order values for the - // pickup fulfillment type. Cannot be set together with minimum_order_value. - MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` - // Name: Free-form name of the service. Must be unique within target account. - // Required. - Name string `json:"name,omitempty"` - // PickupService: The carrier-service pair delivering items to collection - // points. The list of supported pickup services can be retrieved through the - // `getSupportedPickupServices` method. Required if and only if the service - // delivery type is `pickup`. - PickupService *PickupCarrierService `json:"pickupService,omitempty"` - // RateGroups: Shipping rate group definitions. Only the last one is allowed to - // have an empty `applicableShippingLabels`, which means "everything else". The - // other `applicableShippingLabels` must not overlap. - RateGroups []*RateGroup `json:"rateGroups,omitempty"` - // ShipmentType: Type of locations this service ships orders to. Acceptable - // values are: - "delivery" - "pickup` (deprecated)" - "local_delivery" - - // "collection_point" - ShipmentType string `json:"shipmentType,omitempty"` - // StoreConfig: A list of stores your products are delivered from. This is only - // available for the local delivery shipment type. - StoreConfig *ServiceStoreConfig `json:"storeConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Active") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// ShoppingAdsProgramStatus: Response message for GetShoppingAdsProgramStatus. +type ShoppingAdsProgramStatus struct { + // GlobalState: State of the program. `ENABLED` if there are offers for at + // least one region. + // + // Possible values: + // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. + // "NOT_ENABLED" - Program is not enabled for any country. + // "NO_OFFERS_UPLOADED" - No products have been uploaded for any region. + // Upload products to Merchant Center. + // "ENABLED" - Program is enabled and offers are uploaded for at least one + // country. + GlobalState string `json:"globalState,omitempty"` + // RegionStatuses: Status of the program in each region. Regions with the same + // status and review eligibility are grouped together in `regionCodes`. + RegionStatuses []*ShoppingAdsProgramStatusRegionStatus `json:"regionStatuses,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GlobalState") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Active") to include in API + // NullFields is a list of field names (e.g. "GlobalState") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s Service) MarshalJSON() ([]byte, error) { - type NoMethod Service +func (s ShoppingAdsProgramStatus) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatus return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ServiceStoreConfig: Stores that provide local delivery. Only valid with -// local delivery fulfillment. -type ServiceStoreConfig struct { - // CutoffConfig: Time local delivery ends for the day. This can be either - // `local_cutoff_time` or `store_close_offset_hours`, if both are provided an - // error is thrown. - CutoffConfig *ServiceStoreConfigCutoffConfig `json:"cutoffConfig,omitempty"` - // ServiceRadius: Maximum delivery radius. Only needed for local delivery - // fulfillment type. - ServiceRadius *Distance `json:"serviceRadius,omitempty"` - // StoreCodes: A list of store codes that provide local delivery. If empty, - // then `store_service_type` must be `all_stores`, or an error is thrown. If - // not empty, then `store_service_type` must be `selected_stores`, or an error - // is thrown. - StoreCodes []string `json:"storeCodes,omitempty"` - // StoreServiceType: Indicates whether all stores listed by this merchant - // provide local delivery or not. Acceptable values are `all stores` and - // `selected stores` - StoreServiceType string `json:"storeServiceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CutoffConfig") to +// ShoppingAdsProgramStatusRegionStatus: Status of program and region. +type ShoppingAdsProgramStatusRegionStatus struct { + // DisapprovalDate: Date by which eligibilityStatus will go from `WARNING` to + // `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In ISO + // 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. + DisapprovalDate string `json:"disapprovalDate,omitempty"` + // EligibilityStatus: Eligibility status of the Shopping Ads program. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not known. + // "APPROVED" - If the account has no issues and review is completed + // successfully. + // "DISAPPROVED" - There are one or more issues that needs to be resolved for + // account to be active for the program. Detailed list of account issues are + // available in + // [accountstatuses](https://developers.google.com/shopping-content/reference/re + // st/v2.1/accountstatuses) API. + // "WARNING" - If account has issues but offers are servable. Some of the + // issue can make account DISAPPROVED after a certain deadline. + // "UNDER_REVIEW" - Account is under review. + // "PENDING_REVIEW" - Account is waiting for review to start. + // "ONBOARDING" - Program is currently onboarding. Upload valid offers to + // complete onboarding. + EligibilityStatus string `json:"eligibilityStatus,omitempty"` + // OnboardingIssues: Issues that must be fixed to be eligible for review. + OnboardingIssues []string `json:"onboardingIssues,omitempty"` + // RegionCodes: The two-letter ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions + // with the same `eligibilityStatus` and `reviewEligibility`. + RegionCodes []string `json:"regionCodes,omitempty"` + // ReviewEligibilityStatus: If a program is eligible for review in a specific + // region. Only visible if `eligibilityStatus` is `DISAPPROVED`. + // + // Possible values: + // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is unknown. + // "ELIGIBLE" - Account is eligible for review for a specified region code. + // "INELIGIBLE" - Account is not eligible for review for a specified region + // code. + ReviewEligibilityStatus string `json:"reviewEligibilityStatus,omitempty"` + // ReviewIneligibilityReason: Review ineligibility reason if account is not + // eligible for review. + // + // Possible values: + // "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" - Requesting a review from + // Google is not possible. + // "ONBOARDING_ISSUES" - All onboarding issues needs to be fixed. + // "NOT_ENOUGH_OFFERS" - Not enough offers uploaded for this country. + // "IN_COOLDOWN_PERIOD" - Cooldown period applies. Wait until cooldown period + // ends. + // "ALREADY_UNDER_REVIEW" - Account is already under review. + // "NO_REVIEW_REQUIRED" - No issues available to review. + // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically reviewed + // at the end of the grace period. + // "IS_RETIRED" - Account is retired. Should not appear in MC. + // "ALREADY_REVIEWED" - Account has already been reviewed. You can't request + // further reviews. + ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` + // ReviewIneligibilityReasonDescription: Reason a program in a specific region + // isn’t eligible for review. Only visible if `reviewEligibilityStatus` is + // `INELIGIBLE`. + ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` + // ReviewIneligibilityReasonDetails: Additional information for ineligibility. + // If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the + // end of the cooldown period is provided. + ReviewIneligibilityReasonDetails *ShoppingAdsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` + // ReviewIssues: Issues evaluated in the review process. Fix all issues before + // requesting a review. + ReviewIssues []string `json:"reviewIssues,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisapprovalDate") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CutoffConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DisapprovalDate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ServiceStoreConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfig +func (s ShoppingAdsProgramStatusRegionStatus) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatusRegionStatus return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ServiceStoreConfigCutoffConfig: Time local delivery ends for the day based -// on the local timezone of the store. `local_cutoff_time` and -// `store_close_offset_hours` are mutually exclusive. -type ServiceStoreConfigCutoffConfig struct { - // LocalCutoffTime: Time in hours and minutes in the local timezone when local - // delivery ends. - LocalCutoffTime *ServiceStoreConfigCutoffConfigLocalCutoffTime `json:"localCutoffTime,omitempty"` - // NoDeliveryPostCutoff: Merchants can opt-out of showing n+1 day local - // delivery when they have a shipping service configured to n day local - // delivery. For example, if the shipping service defines same-day delivery, - // and it's past the cut-off, setting this field to `true` results in the - // calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the - // same example, setting this field to `false` results in the calculated - // shipping time being one day. This is only for local delivery. - NoDeliveryPostCutoff bool `json:"noDeliveryPostCutoff,omitempty"` - // StoreCloseOffsetHours: Represents cutoff time as the number of hours before - // store closing. Mutually exclusive with other fields (hour and minute). - StoreCloseOffsetHours int64 `json:"storeCloseOffsetHours,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "LocalCutoffTime") to +// ShoppingAdsProgramStatusReviewIneligibilityReasonDetails: Additional details +// for review ineligibility reasons. +type ShoppingAdsProgramStatusReviewIneligibilityReasonDetails struct { + // CooldownTime: This timestamp represents end of cooldown period for review + // ineligbility reason `IN_COOLDOWN_PERIOD`. + CooldownTime string `json:"cooldownTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CooldownTime") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocalCutoffTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "CooldownTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ServiceStoreConfigCutoffConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfigCutoffConfig +func (s ShoppingAdsProgramStatusReviewIneligibilityReasonDetails) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatusReviewIneligibilityReasonDetails return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ServiceStoreConfigCutoffConfigLocalCutoffTime: Time in hours and minutes in -// the local timezone when local delivery ends. -type ServiceStoreConfigCutoffConfigLocalCutoffTime struct { - // Hour: Hour local delivery orders must be placed by to process the same day. - Hour int64 `json:"hour,omitempty,string"` - // Minute: Minute local delivery orders must be placed by to process the same - // day. - Minute int64 `json:"minute,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +type Table struct { + // ColumnHeaders: Headers of the table's columns. Optional: if not set then the + // table has only one dimension. + ColumnHeaders *Headers `json:"columnHeaders,omitempty"` + // Name: Name of the table. Required for subtables, ignored for the main table. + Name string `json:"name,omitempty"` + // RowHeaders: Headers of the table's rows. Required. + RowHeaders *Headers `json:"rowHeaders,omitempty"` + // Rows: The list of rows that constitute the table. Must have the same length + // as `rowHeaders`. Required. + Rows []*Row `json:"rows,omitempty"` + // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hour") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "ColumnHeaders") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ServiceStoreConfigCutoffConfigLocalCutoffTime) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfigCutoffConfigLocalCutoffTime +func (s Table) MarshalJSON() ([]byte, error) { + type NoMethod Table return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ShippingSettings: The merchant account's shipping settings. All methods -// except getsupportedcarriers and getsupportedholidays require the admin role. -type ShippingSettings struct { - // AccountId: The ID of the account to which these account shipping settings - // belong. Ignored upon update, always present in get request responses. - AccountId uint64 `json:"accountId,omitempty,string"` - // PostalCodeGroups: A list of postal code groups that can be referred to in - // `services`. Optional. - PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` - // Services: The target account's list of services. Optional. - Services []*Service `json:"services,omitempty"` - // Warehouses: Optional. A list of warehouses which can be referred to in - // `services`. - Warehouses []*Warehouse `json:"warehouses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccountId") to +// TextWithTooltip: Block of text that may contain a tooltip with more +// information. +type TextWithTooltip struct { + // SimpleTooltipValue: Value of the tooltip as a simple text. + SimpleTooltipValue string `json:"simpleTooltipValue,omitempty"` + // SimpleValue: Value of the message as a simple text. + SimpleValue string `json:"simpleValue,omitempty"` + // TooltipIconStyle: The suggested type of an icon for tooltip, if a tooltip is + // present. + // + // Possible values: + // "TOOLTIP_ICON_STYLE_UNSPECIFIED" - Default value. Will never be provided + // by the API. + // "INFO" - Used when the tooltip adds additional information to the context, + // the 'i' can be used as an icon. + // "QUESTION" - Used when the tooltip shows helpful information, the '?' can + // be used as an icon. + TooltipIconStyle string `json:"tooltipIconStyle,omitempty"` + // ForceSendFields is a list of field names (e.g. "SimpleTooltipValue") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "SimpleTooltipValue") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingSettings) MarshalJSON() ([]byte, error) { - type NoMethod ShippingSettings +func (s TextWithTooltip) MarshalJSON() ([]byte, error) { + type NoMethod TextWithTooltip return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ShippingsettingsCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally +// TimePeriod: A message that represents a time period. +type TimePeriod struct { + // EndTime: The ending timestamp. + EndTime string `json:"endTime,omitempty"` + // StartTime: The starting timestamp. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API + // NullFields is a list of field names (e.g. "EndTime") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchRequest +func (s TimePeriod) MarshalJSON() ([]byte, error) { + type NoMethod TimePeriod return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a single -// non-batch shippingsettings request. -type ShippingsettingsCustomBatchRequestEntry struct { - // AccountId: The ID of the account for which to get/update account shipping - // settings. - AccountId uint64 `json:"accountId,omitempty,string"` - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "get" - - // "update" - Method string `json:"method,omitempty"` - // ShippingSettings: The account shipping settings to update. Only defined if - // the method is `update`. - ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccountId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See +// TimeZone: Represents a time zone from the IANA Time Zone Database +// (https://www.iana.org/time-zones). +type TimeZone struct { + // Id: IANA Time Zone Database time zone. For example "America/New_York". + Id string `json:"id,omitempty"` + // Version: Optional. IANA Time Zone Database version number. For example + // "2019a". + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchRequestEntry +func (s TimeZone) MarshalJSON() ([]byte, error) { + type NoMethod TimeZone return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ShippingsettingsCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsCustomBatchResponse". - Kind string `json:"kind,omitempty"` +// TopicTrends: Topic trends fields requested by the merchant in the query. +// Field values are only set if the merchant queries `TopicTrendsView`. +// Forecast data can be queried up to 13 weeks by passing a future date in the +// `date` field. Historical data is measured daily, and forecasted data is +// projected weekly. All data points are normalized based on the highest data +// points returned in the response. If you make separate queries with different +// date ranges, you might see different values for the same date in each +// response. The recommended way to get a trend score of a topic is +// `last7_days_search_interest / last{$day}_days_search_interest - 1`. You can +// view trends for up to eight topics at a time. +type TopicTrends struct { + // CustomerCountryCode: Country trends are calculated for. Must be a two-letter + // country code (ISO 3166-1-alpha-2 code), for example, `“US”`. + CustomerCountryCode string `json:"customerCountryCode,omitempty"` + // Date: Date the trend score was retrieved. + Date *Date `json:"date,omitempty"` + // Last120DaysSearchInterest: Search interest in the last 120 days, with the + // same normalization as search_interest. This field is only present for a past + // date. + Last120DaysSearchInterest float64 `json:"last120DaysSearchInterest,omitempty"` + // Last30DaysSearchInterest: Search interest in the last 30 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last30DaysSearchInterest float64 `json:"last30DaysSearchInterest,omitempty"` + // Last7DaysSearchInterest: Search interest in the last 7 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last7DaysSearchInterest float64 `json:"last7DaysSearchInterest,omitempty"` + // Last90DaysSearchInterest: Search interest in the last 90 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last90DaysSearchInterest float64 `json:"last90DaysSearchInterest,omitempty"` + // Next7DaysSearchInterest: Estimated search interest in the next 7 days, with + // the same normalization as search_interest. This field is only present for a + // future date. + Next7DaysSearchInterest float64 `json:"next7DaysSearchInterest,omitempty"` + // SearchInterest: Daily search interest, normalized to the time and country to + // make comparisons easier, with 100 representing peak popularity (from 0 to + // 100) for the requested time period and location. + SearchInterest float64 `json:"searchInterest,omitempty"` + // Topic: Google-provided topic trends are calculated for. Only top eight + // topics are returned. Topic is what shoppers are searching for on Google, + // grouped by the same concept. + Topic string `json:"topic,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomerCountryCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomerCountryCode") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +func (s TopicTrends) MarshalJSON() ([]byte, error) { + type NoMethod TopicTrends + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *TopicTrends) UnmarshalJSON(data []byte) error { + type NoMethod TopicTrends + var s1 struct { + Last120DaysSearchInterest gensupport.JSONFloat64 `json:"last120DaysSearchInterest"` + Last30DaysSearchInterest gensupport.JSONFloat64 `json:"last30DaysSearchInterest"` + Last7DaysSearchInterest gensupport.JSONFloat64 `json:"last7DaysSearchInterest"` + Last90DaysSearchInterest gensupport.JSONFloat64 `json:"last90DaysSearchInterest"` + Next7DaysSearchInterest gensupport.JSONFloat64 `json:"next7DaysSearchInterest"` + SearchInterest gensupport.JSONFloat64 `json:"searchInterest"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Last120DaysSearchInterest = float64(s1.Last120DaysSearchInterest) + s.Last30DaysSearchInterest = float64(s1.Last30DaysSearchInterest) + s.Last7DaysSearchInterest = float64(s1.Last7DaysSearchInterest) + s.Last90DaysSearchInterest = float64(s1.Last90DaysSearchInterest) + s.Next7DaysSearchInterest = float64(s1.Next7DaysSearchInterest) + s.SearchInterest = float64(s1.SearchInterest) + return nil +} + +type TransitTable struct { + // PostalCodeGroupNames: A list of postal group names. The last value can be + // "all other locations". Example: `["zone 1", "zone 2", "all other + // locations"]`. The referred postal code groups must match the delivery + // country of the service. + PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` + Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` + // TransitTimeLabels: A list of transit time labels. The last value can be + // "all other labels". Example: `["food", "electronics", "all other + // labels"]`. + TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostalCodeGroupNames") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PostalCodeGroupNames") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchResponse +func (s TransitTable) MarshalJSON() ([]byte, error) { + type NoMethod TransitTable return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a single -// non-batch shipping settings response. -type ShippingsettingsCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ShippingSettings: The retrieved or updated account shipping settings. - ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally +type TransitTableTransitTimeRow struct { + Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Values") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API + // NullFields is a list of field names (e.g. "Values") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchResponseEntry +func (s TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { + type NoMethod TransitTableTransitTimeRow return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ShippingsettingsGetSupportedCarriersResponse struct { - // Carriers: A list of supported carriers. May be empty. - Carriers []*CarriersCarrier `json:"carriers,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedCarriersResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Carriers") to +type TransitTableTransitTimeRowTransitTimeValue struct { + // MaxTransitTimeInDays: Must be greater than or equal to + // `minTransitTimeInDays`. + MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` + // MinTransitTimeInDays: Transit time range (min-max) in business days. 0 means + // same day delivery, 1 means next day delivery. + MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxTransitTimeInDays") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carriers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "MaxTransitTimeInDays") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedCarriersResponse +func (s TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { + type NoMethod TransitTableTransitTimeRowTransitTimeValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ShippingsettingsGetSupportedHolidaysResponse struct { - // Holidays: A list of holidays applicable for delivery guarantees. May be - // empty. - Holidays []*HolidaysHoliday `json:"holidays,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedHolidaysResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Holidays") to +// TriggerActionPayload: The payload for the triggered action. +type TriggerActionPayload struct { + // ActionContext: Required. The context from the selected action. The value is + // obtained from rendered issues and needs to be sent back to identify the + // action that is being triggered. + ActionContext string `json:"actionContext,omitempty"` + // ActionInput: Required. Input provided by the merchant. + ActionInput *ActionInput `json:"actionInput,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActionContext") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Holidays") to include in API + // NullFields is a list of field names (e.g. "ActionContext") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedHolidaysResponse +func (s TriggerActionPayload) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionPayload return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ShippingsettingsGetSupportedPickupServicesResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedPickupServicesResponse". - Kind string `json:"kind,omitempty"` - // PickupServices: A list of supported pickup services. May be empty. - PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` +// TriggerActionResponse: Response informing about the started action. +type TriggerActionResponse struct { + // Message: The message for merchant. + Message string `json:"message,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // ForceSendFields is a list of field names (e.g. "Message") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Message") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedPickupServicesResponse +func (s TriggerActionResponse) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ShippingsettingsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of shipping - // settings. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ShippingSettings `json:"resources,omitempty"` +// UndeleteConversionSourceRequest: Request message for the +// UndeleteConversionSource method. +type UndeleteConversionSourceRequest struct { +} - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// UrlSettings: Specifications related to the `Checkout` URL. The `UriTemplate` +// is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` +// will be automatically replaced with data from the merchant account with this +// attribute offer_id +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id) +type UrlSettings struct { + // CartUriTemplate: URL template when the placeholders are expanded will + // redirect the buyer to the cart page on the merchant website with the + // selected item in cart. + CartUriTemplate string `json:"cartUriTemplate,omitempty"` + // CheckoutUriTemplate: URL template when the placeholders are expanded will + // redirect the buyer to the merchant checkout page with the item in the cart. + CheckoutUriTemplate string `json:"checkoutUriTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "CartUriTemplate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "CartUriTemplate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsListResponse +func (s UrlSettings) MarshalJSON() ([]byte, error) { + type NoMethod UrlSettings return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ShoppingAdsProgramStatus: Response message for GetShoppingAdsProgramStatus. -type ShoppingAdsProgramStatus struct { - // GlobalState: State of the program. `ENABLED` if there are offers for at - // least one region. - // - // Possible values: - // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. - // "NOT_ENABLED" - Program is not enabled for any country. - // "NO_OFFERS_UPLOADED" - No products have been uploaded for any region. - // Upload products to Merchant Center. - // "ENABLED" - Program is enabled and offers are uploaded for at least one - // country. - GlobalState string `json:"globalState,omitempty"` - // RegionStatuses: Status of the program in each region. Regions with the same - // status and review eligibility are grouped together in `regionCodes`. - RegionStatuses []*ShoppingAdsProgramStatusRegionStatus `json:"regionStatuses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "GlobalState") to +// Value: The single value of a rate group or the value of a rate group table's +// cell. Exactly one of `noShipping`, `flatRate`, `pricePercentage`, +// `carrierRateName`, `subtableName` must be set. +type Value struct { + // CarrierRateName: The name of a carrier rate referring to a carrier rate + // defined in the same rate group. Can only be set if all other fields are not + // set. + CarrierRateName string `json:"carrierRateName,omitempty"` + // FlatRate: A flat rate. Can only be set if all other fields are not set. + FlatRate *Price `json:"flatRate,omitempty"` + // NoShipping: If true, then the product can't ship. Must be true when set, can + // only be set if all other fields are not set. + NoShipping bool `json:"noShipping,omitempty"` + // PricePercentage: A percentage of the price represented as a number in + // decimal notation (for example, "5.4"). Can only be set if all other fields + // are not set. + PricePercentage string `json:"pricePercentage,omitempty"` + // SubtableName: The name of a subtable. Can only be set in table cells (not + // for single values), and only if all other fields are not set. + SubtableName string `json:"subtableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CarrierRateName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GlobalState") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "CarrierRateName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShoppingAdsProgramStatus) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatus +func (s Value) MarshalJSON() ([]byte, error) { + type NoMethod Value return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ShoppingAdsProgramStatusRegionStatus: Status of program and region. -type ShoppingAdsProgramStatusRegionStatus struct { - // DisapprovalDate: Date by which eligibilityStatus will go from `WARNING` to - // `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In ISO - // 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. - DisapprovalDate string `json:"disapprovalDate,omitempty"` - // EligibilityStatus: Eligibility status of the Shopping Ads program. - // - // Possible values: - // "STATE_UNSPECIFIED" - State is not known. - // "APPROVED" - If the account has no issues and review is completed - // successfully. - // "DISAPPROVED" - There are one or more issues that needs to be resolved for - // account to be active for the program. Detailed list of account issues are - // available in - // [accountstatuses](https://developers.google.com/shopping-content/reference/re - // st/v2.1/accountstatuses) API. - // "WARNING" - If account has issues but offers are servable. Some of the - // issue can make account DISAPPROVED after a certain deadline. - // "UNDER_REVIEW" - Account is under review. - // "PENDING_REVIEW" - Account is waiting for review to start. - // "ONBOARDING" - Program is currently onboarding. Upload valid offers to - // complete onboarding. - EligibilityStatus string `json:"eligibilityStatus,omitempty"` - // OnboardingIssues: Issues that must be fixed to be eligible for review. - OnboardingIssues []string `json:"onboardingIssues,omitempty"` - // RegionCodes: The two-letter ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions - // with the same `eligibilityStatus` and `reviewEligibility`. - RegionCodes []string `json:"regionCodes,omitempty"` - // ReviewEligibilityStatus: If a program is eligible for review in a specific - // region. Only visible if `eligibilityStatus` is `DISAPPROVED`. - // - // Possible values: - // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is unknown. - // "ELIGIBLE" - Account is eligible for review for a specified region code. - // "INELIGIBLE" - Account is not eligible for review for a specified region +// VerifyPhoneNumberRequest: Request message for the VerifyPhoneNumber method. +type VerifyPhoneNumberRequest struct { + // PhoneVerificationMethod: Verification method used to receive verification // code. - ReviewEligibilityStatus string `json:"reviewEligibilityStatus,omitempty"` - // ReviewIneligibilityReason: Review ineligibility reason if account is not - // eligible for review. // // Possible values: - // "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" - Requesting a review from - // Google is not possible. - // "ONBOARDING_ISSUES" - All onboarding issues needs to be fixed. - // "NOT_ENOUGH_OFFERS" - Not enough offers uploaded for this country. - // "IN_COOLDOWN_PERIOD" - Cooldown period applies. Wait until cooldown period - // ends. - // "ALREADY_UNDER_REVIEW" - Account is already under review. - // "NO_REVIEW_REQUIRED" - No issues available to review. - // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically reviewed - // at the end of the grace period. - // "IS_RETIRED" - Account is retired. Should not appear in MC. - // "ALREADY_REVIEWED" - Account has already been reviewed. You can't request - // further reviews. - ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` - // ReviewIneligibilityReasonDescription: Reason a program in a specific region - // isn’t eligible for review. Only visible if `reviewEligibilityStatus` is - // `INELIGIBLE`. - ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` - // ReviewIneligibilityReasonDetails: Additional information for ineligibility. - // If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the - // end of the cooldown period is provided. - ReviewIneligibilityReasonDetails *ShoppingAdsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` - // ReviewIssues: Issues evaluated in the review process. Fix all issues before - // requesting a review. - ReviewIssues []string `json:"reviewIssues,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisapprovalDate") to + // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. + // "SMS" - Receive verification code by SMS. + // "PHONE_CALL" - Receive verification code by phone call. + PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` + // VerificationCode: The verification code that was sent to the phone number + // for validation. + VerificationCode string `json:"verificationCode,omitempty"` + // VerificationId: The verification ID returned by `requestphoneverification`. + VerificationId string `json:"verificationId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PhoneVerificationMethod") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisapprovalDate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PhoneVerificationMethod") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShoppingAdsProgramStatusRegionStatus) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatusRegionStatus +func (s VerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) { + type NoMethod VerifyPhoneNumberRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ShoppingAdsProgramStatusReviewIneligibilityReasonDetails: Additional details -// for review ineligibility reasons. -type ShoppingAdsProgramStatusReviewIneligibilityReasonDetails struct { - // CooldownTime: This timestamp represents end of cooldown period for review - // ineligbility reason `IN_COOLDOWN_PERIOD`. - CooldownTime string `json:"cooldownTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CooldownTime") to +// VerifyPhoneNumberResponse: Response message for the VerifyPhoneNumber +// method. +type VerifyPhoneNumberResponse struct { + // VerifiedPhoneNumber: Verified phone number if verification is successful. + // This phone number can only be replaced by another verified phone number. + VerifiedPhoneNumber string `json:"verifiedPhoneNumber,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "VerifiedPhoneNumber") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CooldownTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "VerifiedPhoneNumber") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ShoppingAdsProgramStatusReviewIneligibilityReasonDetails) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatusReviewIneligibilityReasonDetails +func (s VerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) { + type NoMethod VerifyPhoneNumberResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type Table struct { - // ColumnHeaders: Headers of the table's columns. Optional: if not set then the - // table has only one dimension. - ColumnHeaders *Headers `json:"columnHeaders,omitempty"` - // Name: Name of the table. Required for subtables, ignored for the main table. +// Warehouse: A fulfillment warehouse, which stores and handles inventory. +type Warehouse struct { + // BusinessDayConfig: Business days of the warehouse. If not set, will be + // Monday to Friday by default. + BusinessDayConfig *BusinessDayConfig `json:"businessDayConfig,omitempty"` + // CutoffTime: Required. The latest time of day that an order can be accepted + // and begin processing. Later orders will be processed in the next day. The + // time is based on the warehouse postal code. + CutoffTime *WarehouseCutoffTime `json:"cutoffTime,omitempty"` + // HandlingDays: Required. The number of days it takes for this warehouse to + // pack up and ship an item. This is on the warehouse level, but can be + // overridden on the offer level based on the attributes of an item. + HandlingDays int64 `json:"handlingDays,omitempty,string"` + // Name: Required. The name of the warehouse. Must be unique within account. Name string `json:"name,omitempty"` - // RowHeaders: Headers of the table's rows. Required. - RowHeaders *Headers `json:"rowHeaders,omitempty"` - // Rows: The list of rows that constitute the table. Must have the same length - // as `rowHeaders`. Required. - Rows []*Row `json:"rows,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to + // ShippingAddress: Required. Shipping address of the warehouse. + ShippingAddress *Address `json:"shippingAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "BusinessDayConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ColumnHeaders") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "BusinessDayConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s Table) MarshalJSON() ([]byte, error) { - type NoMethod Table +func (s Warehouse) MarshalJSON() ([]byte, error) { + type NoMethod Warehouse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// TextWithTooltip: Block of text that may contain a tooltip with more -// information. -type TextWithTooltip struct { - // SimpleTooltipValue: Value of the tooltip as a simple text. - SimpleTooltipValue string `json:"simpleTooltipValue,omitempty"` - // SimpleValue: Value of the message as a simple text. - SimpleValue string `json:"simpleValue,omitempty"` - // TooltipIconStyle: The suggested type of an icon for tooltip, if a tooltip is - // present. - // - // Possible values: - // "TOOLTIP_ICON_STYLE_UNSPECIFIED" - Default value. Will never be provided - // by the API. - // "INFO" - Used when the tooltip adds additional information to the context, - // the 'i' can be used as an icon. - // "QUESTION" - Used when the tooltip shows helpful information, the '?' can - // be used as an icon. - TooltipIconStyle string `json:"tooltipIconStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "SimpleTooltipValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SimpleTooltipValue") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TextWithTooltip) MarshalJSON() ([]byte, error) { - type NoMethod TextWithTooltip - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TimePeriod: A message that represents a time period. -type TimePeriod struct { - // EndTime: The ending timestamp. - EndTime string `json:"endTime,omitempty"` - // StartTime: The starting timestamp. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally +type WarehouseBasedDeliveryTime struct { + // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of + // supported carriers can be retrieved through the `listSupportedCarriers` + // method. + Carrier string `json:"carrier,omitempty"` + // CarrierService: Required. Carrier service, such as "ground" or "2 days". + // The list of supported services for a carrier can be retrieved through the + // `listSupportedCarriers` method. The name of the service must be in the + // eddSupportedServices list. + CarrierService string `json:"carrierService,omitempty"` + // OriginAdministrativeArea: Shipping origin's state. + OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` + // OriginCity: Shipping origin's city. + OriginCity string `json:"originCity,omitempty"` + // OriginCountry: Shipping origin's country represented as a CLDR territory + // code (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + OriginCountry string `json:"originCountry,omitempty"` + // OriginPostalCode: Shipping origin. + OriginPostalCode string `json:"originPostalCode,omitempty"` + // OriginStreetAddress: Shipping origin's street address. + OriginStreetAddress string `json:"originStreetAddress,omitempty"` + // WarehouseName: The name of the warehouse. Warehouse name need to be matched + // with name. If warehouseName is set, the below fields will be ignored. The + // warehouse info will be read from warehouse. + WarehouseName string `json:"warehouseName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API + // NullFields is a list of field names (e.g. "Carrier") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s TimePeriod) MarshalJSON() ([]byte, error) { - type NoMethod TimePeriod +func (s WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod WarehouseBasedDeliveryTime return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// TimeZone: Represents a time zone from the IANA Time Zone Database -// (https://www.iana.org/time-zones). -type TimeZone struct { - // Id: IANA Time Zone Database time zone. For example "America/New_York". - Id string `json:"id,omitempty"` - // Version: Optional. IANA Time Zone Database version number. For example - // "2019a". - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally +type WarehouseCutoffTime struct { + // Hour: Required. Hour (24-hour clock) of the cutoff time until which an order + // has to be placed to be processed in the same day by the warehouse. Hour is + // based on the timezone of warehouse. + Hour int64 `json:"hour,omitempty"` + // Minute: Required. Minute of the cutoff time until which an order has to be + // placed to be processed in the same day by the warehouse. Minute is based on + // the timezone of warehouse. + Minute int64 `json:"minute,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests + // NullFields is a list of field names (e.g. "Hour") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s TimeZone) MarshalJSON() ([]byte, error) { - type NoMethod TimeZone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TopicTrends: Topic trends fields requested by the merchant in the query. -// Field values are only set if the merchant queries `TopicTrendsView`. -// Forecast data can be queried up to 13 weeks by passing a future date in the -// `date` field. Historical data is measured daily, and forecasted data is -// projected weekly. All data points are normalized based on the highest data -// points returned in the response. If you make separate queries with different -// date ranges, you might see different values for the same date in each -// response. The recommended way to get a trend score of a topic is -// `last7_days_search_interest / last{$day}_days_search_interest - 1`. You can -// view trends for up to eight topics at a time. -type TopicTrends struct { - // CustomerCountryCode: Country trends are calculated for. Must be a two-letter - // country code (ISO 3166-1-alpha-2 code), for example, `“US”`. - CustomerCountryCode string `json:"customerCountryCode,omitempty"` - // Date: Date the trend score was retrieved. - Date *Date `json:"date,omitempty"` - // Last120DaysSearchInterest: Search interest in the last 120 days, with the - // same normalization as search_interest. This field is only present for a past - // date. - Last120DaysSearchInterest float64 `json:"last120DaysSearchInterest,omitempty"` - // Last30DaysSearchInterest: Search interest in the last 30 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last30DaysSearchInterest float64 `json:"last30DaysSearchInterest,omitempty"` - // Last7DaysSearchInterest: Search interest in the last 7 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last7DaysSearchInterest float64 `json:"last7DaysSearchInterest,omitempty"` - // Last90DaysSearchInterest: Search interest in the last 90 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last90DaysSearchInterest float64 `json:"last90DaysSearchInterest,omitempty"` - // Next7DaysSearchInterest: Estimated search interest in the next 7 days, with - // the same normalization as search_interest. This field is only present for a - // future date. - Next7DaysSearchInterest float64 `json:"next7DaysSearchInterest,omitempty"` - // SearchInterest: Daily search interest, normalized to the time and country to - // make comparisons easier, with 100 representing peak popularity (from 0 to - // 100) for the requested time period and location. - SearchInterest float64 `json:"searchInterest,omitempty"` - // Topic: Google-provided topic trends are calculated for. Only top eight - // topics are returned. Topic is what shoppers are searching for on Google, - // grouped by the same concept. - Topic string `json:"topic,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerCountryCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerCountryCode") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TopicTrends) MarshalJSON() ([]byte, error) { - type NoMethod TopicTrends - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *TopicTrends) UnmarshalJSON(data []byte) error { - type NoMethod TopicTrends - var s1 struct { - Last120DaysSearchInterest gensupport.JSONFloat64 `json:"last120DaysSearchInterest"` - Last30DaysSearchInterest gensupport.JSONFloat64 `json:"last30DaysSearchInterest"` - Last7DaysSearchInterest gensupport.JSONFloat64 `json:"last7DaysSearchInterest"` - Last90DaysSearchInterest gensupport.JSONFloat64 `json:"last90DaysSearchInterest"` - Next7DaysSearchInterest gensupport.JSONFloat64 `json:"next7DaysSearchInterest"` - SearchInterest gensupport.JSONFloat64 `json:"searchInterest"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Last120DaysSearchInterest = float64(s1.Last120DaysSearchInterest) - s.Last30DaysSearchInterest = float64(s1.Last30DaysSearchInterest) - s.Last7DaysSearchInterest = float64(s1.Last7DaysSearchInterest) - s.Last90DaysSearchInterest = float64(s1.Last90DaysSearchInterest) - s.Next7DaysSearchInterest = float64(s1.Next7DaysSearchInterest) - s.SearchInterest = float64(s1.SearchInterest) - return nil -} - -type TransitTable struct { - // PostalCodeGroupNames: A list of postal group names. The last value can be - // "all other locations". Example: `["zone 1", "zone 2", "all other - // locations"]`. The referred postal code groups must match the delivery - // country of the service. - PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` - Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` - // TransitTimeLabels: A list of transit time labels. The last value can be - // "all other labels". Example: `["food", "electronics", "all other - // labels"]`. - TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostalCodeGroupNames") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PostalCodeGroupNames") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TransitTable) MarshalJSON() ([]byte, error) { - type NoMethod TransitTable +func (s WarehouseCutoffTime) MarshalJSON() ([]byte, error) { + type NoMethod WarehouseCutoffTime return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type TransitTableTransitTimeRow struct { - Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Values") to unconditionally +type Weight struct { + // Unit: Required. The weight unit. Acceptable values are: - "kg" - "lb" + Unit string `json:"unit,omitempty"` + // Value: Required. The weight represented as a number. The weight can have a + // maximum precision of four decimal places. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Values") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { - type NoMethod TransitTableTransitTimeRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TransitTableTransitTimeRowTransitTimeValue struct { - // MaxTransitTimeInDays: Must be greater than or equal to - // `minTransitTimeInDays`. - MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` - // MinTransitTimeInDays: Transit time range (min-max) in business days. 0 means - // same day delivery, 1 means next day delivery. - MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxTransitTimeInDays") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxTransitTimeInDays") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { - type NoMethod TransitTableTransitTimeRowTransitTimeValue +func (s Weight) MarshalJSON() ([]byte, error) { + type NoMethod Weight return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// TriggerActionPayload: The payload for the triggered action. -type TriggerActionPayload struct { - // ActionContext: Required. The context from the selected action. The value is - // obtained from rendered issues and needs to be sent back to identify the - // action that is being triggered. - ActionContext string `json:"actionContext,omitempty"` - // ActionInput: Required. Input provided by the merchant. - ActionInput *ActionInput `json:"actionInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActionContext") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TriggerActionPayload) MarshalJSON() ([]byte, error) { - type NoMethod TriggerActionPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TriggerActionResponse: Response informing about the started action. -type TriggerActionResponse struct { - // Message: The message for merchant. - Message string `json:"message,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TriggerActionResponse) MarshalJSON() ([]byte, error) { - type NoMethod TriggerActionResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UndeleteConversionSourceRequest: Request message for the -// UndeleteConversionSource method. -type UndeleteConversionSourceRequest struct { -} - -// UrlSettings: Specifications related to the `Checkout` URL. The `UriTemplate` -// is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` -// will be automatically replaced with data from the merchant account with this -// attribute offer_id -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id) -type UrlSettings struct { - // CartUriTemplate: URL template when the placeholders are expanded will - // redirect the buyer to the cart page on the merchant website with the - // selected item in cart. - CartUriTemplate string `json:"cartUriTemplate,omitempty"` - // CheckoutUriTemplate: URL template when the placeholders are expanded will - // redirect the buyer to the merchant checkout page with the item in the cart. - CheckoutUriTemplate string `json:"checkoutUriTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CartUriTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CartUriTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlSettings) MarshalJSON() ([]byte, error) { - type NoMethod UrlSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Value: The single value of a rate group or the value of a rate group table's -// cell. Exactly one of `noShipping`, `flatRate`, `pricePercentage`, -// `carrierRateName`, `subtableName` must be set. -type Value struct { - // CarrierRateName: The name of a carrier rate referring to a carrier rate - // defined in the same rate group. Can only be set if all other fields are not - // set. - CarrierRateName string `json:"carrierRateName,omitempty"` - // FlatRate: A flat rate. Can only be set if all other fields are not set. - FlatRate *Price `json:"flatRate,omitempty"` - // NoShipping: If true, then the product can't ship. Must be true when set, can - // only be set if all other fields are not set. - NoShipping bool `json:"noShipping,omitempty"` - // PricePercentage: A percentage of the price represented as a number in - // decimal notation (for example, "5.4"). Can only be set if all other fields - // are not set. - PricePercentage string `json:"pricePercentage,omitempty"` - // SubtableName: The name of a subtable. Can only be set in table cells (not - // for single values), and only if all other fields are not set. - SubtableName string `json:"subtableName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierRateName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CarrierRateName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Value) MarshalJSON() ([]byte, error) { - type NoMethod Value - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VerifyPhoneNumberRequest: Request message for the VerifyPhoneNumber method. -type VerifyPhoneNumberRequest struct { - // PhoneVerificationMethod: Verification method used to receive verification - // code. - // - // Possible values: - // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. - // "SMS" - Receive verification code by SMS. - // "PHONE_CALL" - Receive verification code by phone call. - PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` - // VerificationCode: The verification code that was sent to the phone number - // for validation. - VerificationCode string `json:"verificationCode,omitempty"` - // VerificationId: The verification ID returned by `requestphoneverification`. - VerificationId string `json:"verificationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "PhoneVerificationMethod") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PhoneVerificationMethod") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) { - type NoMethod VerifyPhoneNumberRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VerifyPhoneNumberResponse: Response message for the VerifyPhoneNumber -// method. -type VerifyPhoneNumberResponse struct { - // VerifiedPhoneNumber: Verified phone number if verification is successful. - // This phone number can only be replaced by another verified phone number. - VerifiedPhoneNumber string `json:"verifiedPhoneNumber,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "VerifiedPhoneNumber") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VerifiedPhoneNumber") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) { - type NoMethod VerifyPhoneNumberResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Warehouse: A fulfillment warehouse, which stores and handles inventory. -type Warehouse struct { - // BusinessDayConfig: Business days of the warehouse. If not set, will be - // Monday to Friday by default. - BusinessDayConfig *BusinessDayConfig `json:"businessDayConfig,omitempty"` - // CutoffTime: Required. The latest time of day that an order can be accepted - // and begin processing. Later orders will be processed in the next day. The - // time is based on the warehouse postal code. - CutoffTime *WarehouseCutoffTime `json:"cutoffTime,omitempty"` - // HandlingDays: Required. The number of days it takes for this warehouse to - // pack up and ship an item. This is on the warehouse level, but can be - // overridden on the offer level based on the attributes of an item. - HandlingDays int64 `json:"handlingDays,omitempty,string"` - // Name: Required. The name of the warehouse. Must be unique within account. - Name string `json:"name,omitempty"` - // ShippingAddress: Required. Shipping address of the warehouse. - ShippingAddress *Address `json:"shippingAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "BusinessDayConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BusinessDayConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Warehouse) MarshalJSON() ([]byte, error) { - type NoMethod Warehouse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WarehouseBasedDeliveryTime struct { - // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of - // supported carriers can be retrieved through the `listSupportedCarriers` - // method. - Carrier string `json:"carrier,omitempty"` - // CarrierService: Required. Carrier service, such as "ground" or "2 days". - // The list of supported services for a carrier can be retrieved through the - // `listSupportedCarriers` method. The name of the service must be in the - // eddSupportedServices list. - CarrierService string `json:"carrierService,omitempty"` - // OriginAdministrativeArea: Shipping origin's state. - OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` - // OriginCity: Shipping origin's city. - OriginCity string `json:"originCity,omitempty"` - // OriginCountry: Shipping origin's country represented as a CLDR territory - // code (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - OriginCountry string `json:"originCountry,omitempty"` - // OriginPostalCode: Shipping origin. - OriginPostalCode string `json:"originPostalCode,omitempty"` - // OriginStreetAddress: Shipping origin's street address. - OriginStreetAddress string `json:"originStreetAddress,omitempty"` - // WarehouseName: The name of the warehouse. Warehouse name need to be matched - // with name. If warehouseName is set, the below fields will be ignored. The - // warehouse info will be read from warehouse. - WarehouseName string `json:"warehouseName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod WarehouseBasedDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WarehouseCutoffTime struct { - // Hour: Required. Hour (24-hour clock) of the cutoff time until which an order - // has to be placed to be processed in the same day by the warehouse. Hour is - // based on the timezone of warehouse. - Hour int64 `json:"hour,omitempty"` - // Minute: Required. Minute of the cutoff time until which an order has to be - // placed to be processed in the same day by the warehouse. Minute is based on - // the timezone of warehouse. - Minute int64 `json:"minute,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hour") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WarehouseCutoffTime) MarshalJSON() ([]byte, error) { - type NoMethod WarehouseCutoffTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Weight struct { - // Unit: Required. The weight unit. Acceptable values are: - "kg" - "lb" - Unit string `json:"unit,omitempty"` - // Value: Required. The weight represented as a number. The weight can have a - // maximum precision of four decimal places. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Weight) MarshalJSON() ([]byte, error) { - type NoMethod Weight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AccountsAuthinfoCall struct { - s *APIService - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Authinfo: Returns information about the authenticated user. -func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { - c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsAuthinfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.authinfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.authinfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsAuthInfoResponse.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 *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &AccountsAuthInfoResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.authinfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AccountsClaimwebsiteCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Claimwebsite: Claims the website of a Merchant Center sub-account. Merchant -// accounts with approved third-party CSSs aren't required to claim a website. -// -// - accountId: The ID of the account whose website is claimed. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { - c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Overwrite sets the optional parameter "overwrite": Only available to -// selected merchants, for example multi-client accounts (MCAs) and their -// sub-accounts. When set to `True`, this option removes any existing claim on -// the requested website and replaces it with a claim from the account that -// makes the request. -func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { - c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsClaimwebsiteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.claimwebsite", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.claimwebsite" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsClaimWebsiteResponse.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 *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &AccountsClaimWebsiteResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.claimwebsite", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AccountsCustombatchCall struct { - s *APIService - accountscustombatchrequest *AccountsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Custombatch: Retrieves, inserts, updates, and deletes multiple Merchant -// Center (sub-)accounts in a single request. -func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { - c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountscustombatchrequest = accountscustombatchrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsCustombatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountscustombatchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsCustomBatchResponse.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 *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &AccountsCustomBatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.custombatch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AccountsDeleteCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Merchant Center sub-account. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. This must be a multi-client -// account, and accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { - c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Force sets the optional parameter "force": Option to delete sub-accounts -// with products. The default value is false. -func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.delete" call. -func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type AccountsGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a Merchant Center account. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { - c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// View sets the optional parameter "view": Controls which fields will be -// populated. Acceptable values are: "merchant" and "css". The default value is -// "merchant". -// -// Possible values: -// -// "MERCHANT" - Default. View is populated with Merchant Center fields. -// "CSS" - View is populated with Comparison Shopping Services fields. -func (c *AccountsGetCall) View(view string) *AccountsGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.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 *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AccountsInsertCall struct { - s *APIService - merchantId uint64 - account *Account - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Merchant Center sub-account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { - c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.account = account - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.account) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.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 *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AccountsLinkCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accountslinkrequest *AccountsLinkRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Link: Performs an action on a link between two Merchant Center accounts, -// namely accountId and linkedAccountId. -// -// - accountId: The ID of the account that should be linked. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { - c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accountslinkrequest = accountslinkrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLinkCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountslinkrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.link", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.link" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsLinkResponse.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 *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &AccountsLinkResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.link", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AccountsListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the sub-accounts in your Merchant Center account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountsService) List(merchantId uint64) *AccountsListCall { - c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// Label sets the optional parameter "label": If view is set to "css", only -// return accounts that are assigned label with given ID. -func (c *AccountsListCall) Label(label uint64) *AccountsListCall { - c.urlParams_.Set("label", fmt.Sprint(label)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// accounts to return in the response, used for paging. -func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// Name sets the optional parameter "name": If set, only the accounts with the -// given name (case sensitive) will be returned. -func (c *AccountsListCall) Name(name string) *AccountsListCall { - c.urlParams_.Set("name", name) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// View sets the optional parameter "view": Controls which fields will be -// populated. Acceptable values are: "merchant" and "css". The default value is -// "merchant". -// -// Possible values: -// -// "MERCHANT" - Default. View is populated with Merchant Center fields. -// "CSS" - View is populated with Comparison Shopping Services fields. -func (c *AccountsListCall) View(view string) *AccountsListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsListResponse.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 *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &AccountsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 AccountsListlinksCall struct { +type AccountsAuthinfoCall struct { s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Listlinks: Returns the list of accounts linked to your Merchant Center -// account. -// -// - accountId: The ID of the account for which to list links. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Listlinks(merchantId uint64, accountId uint64) *AccountsListlinksCall { - c := &AccountsListlinksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// links to return in the response, used for pagination. The minimum allowed -// value is 5 results per page. If provided value is lower than 5, it will be -// automatically increased to 5. -func (c *AccountsListlinksCall) MaxResults(maxResults int64) *AccountsListlinksCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountsListlinksCall) PageToken(pageToken string) *AccountsListlinksCall { - 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 -// details. -func (c *AccountsListlinksCall) Fields(s ...googleapi.Field) *AccountsListlinksCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AccountsListlinksCall) IfNoneMatch(entityTag string) *AccountsListlinksCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsListlinksCall) Context(ctx context.Context) *AccountsListlinksCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsListlinksCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsListlinksCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/listlinks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.listlinks", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.listlinks" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsListLinksResponse.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 *AccountsListlinksCall) Do(opts ...googleapi.CallOption) (*AccountsListLinksResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &AccountsListLinksResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.listlinks", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AccountsListlinksCall) Pages(ctx context.Context, f func(*AccountsListLinksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 AccountsRequestphoneverificationCall struct { - s *APIService - merchantId int64 - accountId int64 - requestphoneverificationrequest *RequestPhoneVerificationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Requestphoneverification: Request verification code to start phone -// verification. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Requestphoneverification(merchantId int64, accountId int64, requestphoneverificationrequest *RequestPhoneVerificationRequest) *AccountsRequestphoneverificationCall { - c := &AccountsRequestphoneverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.requestphoneverificationrequest = requestphoneverificationrequest + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Authinfo: Returns information about the authenticated user. +func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { + c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsRequestphoneverificationCall) Fields(s ...googleapi.Field) *AccountsRequestphoneverificationCall { +func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AccountsRequestphoneverificationCall) Context(ctx context.Context) *AccountsRequestphoneverificationCall { +func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsRequestphoneverificationCall) Header() http.Header { +func (c *AccountsAuthinfoCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsRequestphoneverificationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.requestphoneverificationrequest) - if err != nil { - return nil, err +func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/requestphoneverification") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "accountId": strconv.FormatInt(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.requestphoneverification", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.authinfo", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.requestphoneverification" call. +// Do executes the "content.accounts.authinfo" call. // Any non-2xx status code is an error. Response headers are in either -// *RequestPhoneVerificationResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *AccountsAuthInfoResponse.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 *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) (*RequestPhoneVerificationResponse, error) { +func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14168,7 +12608,7 @@ func (c *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RequestPhoneVerificationResponse{ + ret := &AccountsAuthInfoResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14179,69 +12619,73 @@ func (c *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.requestphoneverification", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.authinfo", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsUpdateCall struct { +type AccountsClaimwebsiteCall struct { s *APIService merchantId uint64 accountId uint64 - account *Account urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Update: Updates a Merchant Center account. Any fields that are not provided -// are deleted from the resource. +// Claimwebsite: Claims the website of a Merchant Center sub-account. Merchant +// accounts with approved third-party CSSs aren't required to claim a website. // -// - accountId: The ID of the account. +// - accountId: The ID of the account whose website is claimed. // - merchantId: The ID of the managing account. If this parameter is not the // same as accountId, then this account must be a multi-client account and // `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { - c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { + c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId - c.account = account + return c +} + +// Overwrite sets the optional parameter "overwrite": Only available to +// selected merchants, for example multi-client accounts (MCAs) and their +// sub-accounts. When set to `True`, this option removes any existing claim on +// the requested website and replaces it with a claim from the account that +// makes the request. +func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { + c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { +func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { +func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsUpdateCall) Header() http.Header { +func (c *AccountsClaimwebsiteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.account) - if err != nil { - return nil, err - } +func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } @@ -14250,16 +12694,17 @@ func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { "merchantId": strconv.FormatUint(c.merchantId, 10), "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.claimwebsite", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.update" call. +// Do executes the "content.accounts.claimwebsite" call. // Any non-2xx status code is an error. Response headers are in either -// *Account.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 *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { +// *AccountsClaimWebsiteResponse.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 *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14278,7 +12723,7 @@ func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Account{ + ret := &AccountsClaimWebsiteResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14289,86 +12734,75 @@ func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.claimwebsite", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsUpdatelabelsCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accountsupdatelabelsrequest *AccountsUpdateLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustombatchCall struct { + s *APIService + accountscustombatchrequest *AccountsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatelabels: Updates labels that are assigned to the Merchant Center -// account by CSS user. -// -// - accountId: The ID of the account whose labels are updated. -// - merchantId: The ID of the managing account. -func (r *AccountsService) Updatelabels(merchantId uint64, accountId uint64, accountsupdatelabelsrequest *AccountsUpdateLabelsRequest) *AccountsUpdatelabelsCall { - c := &AccountsUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accountsupdatelabelsrequest = accountsupdatelabelsrequest +// Custombatch: Retrieves, inserts, updates, and deletes multiple Merchant +// Center (sub-)accounts in a single request. +func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { + c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountscustombatchrequest = accountscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsUpdatelabelsCall) Fields(s ...googleapi.Field) *AccountsUpdatelabelsCall { +func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsUpdatelabelsCall) Context(ctx context.Context) *AccountsUpdatelabelsCall { +func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsUpdatelabelsCall) Header() http.Header { +func (c *AccountsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountsupdatelabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountscustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/updatelabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.updatelabels", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.updatelabels" call. +// Do executes the "content.accounts.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountsUpdateLabelsResponse.ServerResponse.Header or (if a response was +// *AccountsCustomBatchResponse.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 *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUpdateLabelsResponse, error) { +func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14387,7 +12821,7 @@ func (c *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountsUpdateLabelsResponse{ + ret := &AccountsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14398,90 +12832,190 @@ func (c *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUp if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.updatelabels", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsVerifyphonenumberCall struct { - s *APIService - merchantId int64 - accountId int64 - verifyphonenumberrequest *VerifyPhoneNumberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsDeleteCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Merchant Center sub-account. +// +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. This must be a multi-client +// account, and accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { + c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + return c +} + +// Force sets the optional parameter "force": Option to delete sub-accounts +// with products. The default value is false. +func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.accounts.delete" call. +func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return gensupport.WrapError(err) + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -// Verifyphonenumber: Validates verification code to verify phone number for -// the account. If successful this will overwrite the value of -// `accounts.businessinformation.phoneNumber`. Only verified phone number will -// replace an existing verified phone number. +type AccountsGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a Merchant Center account. // // - accountId: The ID of the account. // - merchantId: The ID of the managing account. If this parameter is not the // same as accountId, then this account must be a multi-client account and -// accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Verifyphonenumber(merchantId int64, accountId int64, verifyphonenumberrequest *VerifyPhoneNumberRequest) *AccountsVerifyphonenumberCall { - c := &AccountsVerifyphonenumberCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { + c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId - c.verifyphonenumberrequest = verifyphonenumberrequest + return c +} + +// View sets the optional parameter "view": Controls which fields will be +// populated. Acceptable values are: "merchant" and "css". The default value is +// "merchant". +// +// Possible values: +// +// "MERCHANT" - Default. View is populated with Merchant Center fields. +// "CSS" - View is populated with Comparison Shopping Services fields. +func (c *AccountsGetCall) View(view string) *AccountsGetCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsVerifyphonenumberCall) Fields(s ...googleapi.Field) *AccountsVerifyphonenumberCall { +func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AccountsVerifyphonenumberCall) Context(ctx context.Context) *AccountsVerifyphonenumberCall { +func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsVerifyphonenumberCall) Header() http.Header { +func (c *AccountsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsVerifyphonenumberCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.verifyphonenumberrequest) - if err != nil { - return nil, err +func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/verifyphonenumber") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "accountId": strconv.FormatInt(c.accountId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.verifyphonenumber", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.verifyphonenumber" call. +// Do executes the "content.accounts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *VerifyPhoneNumberResponse.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 *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*VerifyPhoneNumberResponse, error) { +// *Account.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 *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14500,7 +13034,7 @@ func (c *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*Verif if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &VerifyPhoneNumberResponse{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14511,63 +13045,62 @@ func (c *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*Verif if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.verifyphonenumber", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsCredentialsCreateCall struct { - s *APIService - accountId int64 - accountcredentials *AccountCredentials - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsInsertCall struct { + s *APIService + merchantId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Uploads credentials for the Merchant Center account. If credentials -// already exist for this Merchant Center account and purpose, this method -// updates them. +// Insert: Creates a Merchant Center sub-account. // -// - accountId: The merchant id of the account these credentials belong to. -func (r *AccountsCredentialsService) Create(accountId int64, accountcredentials *AccountCredentials) *AccountsCredentialsCreateCall { - c := &AccountsCredentialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.accountcredentials = accountcredentials +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { + c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.account = account return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsCredentialsCreateCall) Fields(s ...googleapi.Field) *AccountsCredentialsCreateCall { +func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsCredentialsCreateCall) Context(ctx context.Context) *AccountsCredentialsCreateCall { +func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsCredentialsCreateCall) Header() http.Header { +func (c *AccountsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCredentialsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountcredentials) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.account) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/credentials") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14575,19 +13108,18 @@ func (c *AccountsCredentialsCreateCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.credentials.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.credentials.create" call. +// Do executes the "content.accounts.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountCredentials.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 *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*AccountCredentials, error) { +// *Account.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 *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14606,7 +13138,7 @@ func (c *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*Accou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountCredentials{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14617,61 +13149,67 @@ func (c *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*Accou if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.credentials.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsLabelsCreateCall struct { - s *APIService - accountId int64 - accountlabel *AccountLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLinkCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accountslinkrequest *AccountsLinkRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new label, not assigned to any account. +// Link: Performs an action on a link between two Merchant Center accounts, +// namely accountId and linkedAccountId. // -// - accountId: The id of the account this label belongs to. -func (r *AccountsLabelsService) Create(accountId int64, accountlabel *AccountLabel) *AccountsLabelsCreateCall { - c := &AccountsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account that should be linked. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { + c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId c.accountId = accountId - c.accountlabel = accountlabel + c.accountslinkrequest = accountslinkrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsLabelsCreateCall) Fields(s ...googleapi.Field) *AccountsLabelsCreateCall { +func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsCreateCall) Context(ctx context.Context) *AccountsLabelsCreateCall { +func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsLabelsCreateCall) Header() http.Header { +func (c *AccountsLinkCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsLabelsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountlabel) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountslinkrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14679,18 +13217,20 @@ func (c *AccountsLabelsCreateCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.link", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.labels.create" call. +// Do executes the "content.accounts.link" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountLabel.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 *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { +// *AccountsLinkResponse.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 *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14709,7 +13249,7 @@ func (c *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLab if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountLabel{ + ret := &AccountsLinkResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14720,120 +13260,219 @@ func (c *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLab if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.link", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsLabelsDeleteCall struct { - s *APIService - accountId int64 - labelId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the sub-accounts in your Merchant Center account. +// +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountsService) List(merchantId uint64) *AccountsListCall { + c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + return c +} + +// Label sets the optional parameter "label": If view is set to "css", only +// return accounts that are assigned label with given ID. +func (c *AccountsListCall) Label(label uint64) *AccountsListCall { + c.urlParams_.Set("label", fmt.Sprint(label)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// accounts to return in the response, used for paging. +func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// Name sets the optional parameter "name": If set, only the accounts with the +// given name (case sensitive) will be returned. +func (c *AccountsListCall) Name(name string) *AccountsListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// Delete: Deletes a label and removes it from all accounts to which it was -// assigned. +// View sets the optional parameter "view": Controls which fields will be +// populated. Acceptable values are: "merchant" and "css". The default value is +// "merchant". // -// - accountId: The id of the account that owns the label. -// - labelId: The id of the label to delete. -func (r *AccountsLabelsService) Delete(accountId int64, labelId int64) *AccountsLabelsDeleteCall { - c := &AccountsLabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.labelId = labelId +// Possible values: +// +// "MERCHANT" - Default. View is populated with Merchant Center fields. +// "CSS" - View is populated with Comparison Shopping Services fields. +func (c *AccountsListCall) View(view string) *AccountsListCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsLabelsDeleteCall) Fields(s ...googleapi.Field) *AccountsLabelsDeleteCall { +func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsDeleteCall) Context(ctx context.Context) *AccountsLabelsDeleteCall { +func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsLabelsDeleteCall) Header() http.Header { +func (c *AccountsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsLabelsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - "labelId": strconv.FormatInt(c.labelId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.labels.delete" call. -func (c *AccountsLabelsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountsListResponse.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 *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.delete", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &AccountsListResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type AccountsLabelsListCall struct { +// 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 *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 AccountsListlinksCall struct { s *APIService - accountId int64 + merchantId uint64 + accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the labels assigned to an account. +// Listlinks: Returns the list of accounts linked to your Merchant Center +// account. // -// - accountId: The account id for whose labels are to be listed. -func (r *AccountsLabelsService) List(accountId int64) *AccountsLabelsListCall { - c := &AccountsLabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to list links. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Listlinks(merchantId uint64, accountId uint64) *AccountsListlinksCall { + c := &AccountsListlinksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId c.accountId = accountId return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// labels to return. The service may return fewer than this value. If -// unspecified, at most 50 labels will be returned. The maximum value is 1000; -// values above 1000 will be coerced to 1000. -func (c *AccountsLabelsListCall) PageSize(pageSize int64) *AccountsLabelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// links to return in the response, used for pagination. The minimum allowed +// value is 5 results per page. If provided value is lower than 5, it will be +// automatically increased to 5. +func (c *AccountsListlinksCall) MaxResults(maxResults int64) *AccountsListlinksCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListAccountLabels` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListAccountLabels` must match the call that provided the page token. -func (c *AccountsLabelsListCall) PageToken(pageToken string) *AccountsLabelsListCall { +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountsListlinksCall) PageToken(pageToken string) *AccountsListlinksCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -14841,7 +13480,7 @@ func (c *AccountsLabelsListCall) PageToken(pageToken string) *AccountsLabelsList // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsLabelsListCall) Fields(s ...googleapi.Field) *AccountsLabelsListCall { +func (c *AccountsListlinksCall) Fields(s ...googleapi.Field) *AccountsListlinksCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14849,34 +13488,34 @@ func (c *AccountsLabelsListCall) Fields(s ...googleapi.Field) *AccountsLabelsLis // IfNoneMatch sets an 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. -func (c *AccountsLabelsListCall) IfNoneMatch(entityTag string) *AccountsLabelsListCall { +func (c *AccountsListlinksCall) IfNoneMatch(entityTag string) *AccountsListlinksCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsListCall) Context(ctx context.Context) *AccountsLabelsListCall { +func (c *AccountsListlinksCall) Context(ctx context.Context) *AccountsListlinksCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsLabelsListCall) Header() http.Header { +func (c *AccountsListlinksCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsLabelsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsListlinksCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/listlinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -14884,19 +13523,20 @@ func (c *AccountsLabelsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.listlinks", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.labels.list" call. +// Do executes the "content.accounts.listlinks" call. // Any non-2xx status code is an error. Response headers are in either -// *ListAccountLabelsResponse.ServerResponse.Header or (if a response was +// *AccountsListLinksResponse.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 *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountLabelsResponse, error) { +func (c *AccountsListlinksCall) Do(opts ...googleapi.CallOption) (*AccountsListLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14915,7 +13555,7 @@ func (c *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListAccountLabelsResponse{ + ret := &AccountsListLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14926,14 +13566,14 @@ func (c *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountL if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.listlinks", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *AccountsLabelsListCall) Pages(ctx context.Context, f func(*ListAccountLabelsResponse) error) error { +func (c *AccountsListlinksCall) Pages(ctx context.Context, f func(*AccountsListLinksResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -14951,80 +13591,84 @@ func (c *AccountsLabelsListCall) Pages(ctx context.Context, f func(*ListAccountL } } -type AccountsLabelsPatchCall struct { - s *APIService - accountId int64 - labelId int64 - accountlabel *AccountLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsRequestphoneverificationCall struct { + s *APIService + merchantId int64 + accountId int64 + requestphoneverificationrequest *RequestPhoneVerificationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a label. +// Requestphoneverification: Request verification code to start phone +// verification. // -// - accountId: The id of the account this label belongs to. -// - labelId: The id of the label to update. -func (r *AccountsLabelsService) Patch(accountId int64, labelId int64, accountlabel *AccountLabel) *AccountsLabelsPatchCall { - c := &AccountsLabelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Requestphoneverification(merchantId int64, accountId int64, requestphoneverificationrequest *RequestPhoneVerificationRequest) *AccountsRequestphoneverificationCall { + c := &AccountsRequestphoneverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId c.accountId = accountId - c.labelId = labelId - c.accountlabel = accountlabel + c.requestphoneverificationrequest = requestphoneverificationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsLabelsPatchCall) Fields(s ...googleapi.Field) *AccountsLabelsPatchCall { +func (c *AccountsRequestphoneverificationCall) Fields(s ...googleapi.Field) *AccountsRequestphoneverificationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsPatchCall) Context(ctx context.Context) *AccountsLabelsPatchCall { +func (c *AccountsRequestphoneverificationCall) Context(ctx context.Context) *AccountsRequestphoneverificationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsLabelsPatchCall) Header() http.Header { +func (c *AccountsRequestphoneverificationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsLabelsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsRequestphoneverificationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountlabel) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.requestphoneverificationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/requestphoneverification") 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - "labelId": strconv.FormatInt(c.labelId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.requestphoneverification", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.labels.patch" call. +// Do executes the "content.accounts.requestphoneverification" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountLabel.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 *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { +// *RequestPhoneVerificationResponse.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 *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) (*RequestPhoneVerificationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15043,7 +13687,7 @@ func (c *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountLabel{ + ret := &RequestPhoneVerificationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15054,82 +13698,87 @@ func (c *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabe if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.requestphoneverification", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsReturncarrierCreateCall struct { - s *APIService - accountId int64 - accountreturncarrier *AccountReturnCarrier - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Links return carrier to a merchant account. +// Update: Updates a Merchant Center account. Any fields that are not provided +// are deleted from the resource. // -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -func (r *AccountsReturncarrierService) Create(accountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierCreateCall { - c := &AccountsReturncarrierCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { + c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId c.accountId = accountId - c.accountreturncarrier = accountreturncarrier + c.account = account return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsReturncarrierCreateCall) Fields(s ...googleapi.Field) *AccountsReturncarrierCreateCall { +func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierCreateCall) Context(ctx context.Context) *AccountsReturncarrierCreateCall { +func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsReturncarrierCreateCall) Header() http.Header { +func (c *AccountsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsReturncarrierCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountreturncarrier) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.account) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.returncarrier.create" call. +// Do executes the "content.accounts.update" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountReturnCarrier.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 *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { +// *Account.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 *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15148,7 +13797,7 @@ func (c *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*Acc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountReturnCarrier{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15159,167 +13808,199 @@ func (c *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*Acc if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsReturncarrierDeleteCall struct { - s *APIService - accountId int64 - carrierAccountId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUpdatelabelsCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accountsupdatelabelsrequest *AccountsUpdateLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete a return carrier in the merchant account. +// Updatelabels: Updates labels that are assigned to the Merchant Center +// account by CSS user. // -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -// - carrierAccountId: The Google-provided unique carrier ID, used to update -// the resource. -func (r *AccountsReturncarrierService) Delete(accountId int64, carrierAccountId int64) *AccountsReturncarrierDeleteCall { - c := &AccountsReturncarrierDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account whose labels are updated. +// - merchantId: The ID of the managing account. +func (r *AccountsService) Updatelabels(merchantId uint64, accountId uint64, accountsupdatelabelsrequest *AccountsUpdateLabelsRequest) *AccountsUpdatelabelsCall { + c := &AccountsUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId c.accountId = accountId - c.carrierAccountId = carrierAccountId + c.accountsupdatelabelsrequest = accountsupdatelabelsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsReturncarrierDeleteCall) Fields(s ...googleapi.Field) *AccountsReturncarrierDeleteCall { +func (c *AccountsUpdatelabelsCall) Fields(s ...googleapi.Field) *AccountsUpdatelabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierDeleteCall) Context(ctx context.Context) *AccountsReturncarrierDeleteCall { +func (c *AccountsUpdatelabelsCall) Context(ctx context.Context) *AccountsUpdatelabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsReturncarrierDeleteCall) Header() http.Header { +func (c *AccountsUpdatelabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsReturncarrierDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AccountsUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountsupdatelabelsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/updatelabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.updatelabels", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.returncarrier.delete" call. -func (c *AccountsReturncarrierDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.updatelabels" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountsUpdateLabelsResponse.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 *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUpdateLabelsResponse, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.delete", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &AccountsUpdateLabelsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.updatelabels", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type AccountsReturncarrierListCall struct { - s *APIService - accountId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsVerifyphonenumberCall struct { + s *APIService + merchantId int64 + accountId int64 + verifyphonenumberrequest *VerifyPhoneNumberRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists available return carriers in the merchant account. +// Verifyphonenumber: Validates verification code to verify phone number for +// the account. If successful this will overwrite the value of +// `accounts.businessinformation.phoneNumber`. Only verified phone number will +// replace an existing verified phone number. // -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -func (r *AccountsReturncarrierService) List(accountId int64) *AccountsReturncarrierListCall { - c := &AccountsReturncarrierListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Verifyphonenumber(merchantId int64, accountId int64, verifyphonenumberrequest *VerifyPhoneNumberRequest) *AccountsVerifyphonenumberCall { + c := &AccountsVerifyphonenumberCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId c.accountId = accountId + c.verifyphonenumberrequest = verifyphonenumberrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsReturncarrierListCall) Fields(s ...googleapi.Field) *AccountsReturncarrierListCall { +func (c *AccountsVerifyphonenumberCall) Fields(s ...googleapi.Field) *AccountsVerifyphonenumberCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *AccountsReturncarrierListCall) IfNoneMatch(entityTag string) *AccountsReturncarrierListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierListCall) Context(ctx context.Context) *AccountsReturncarrierListCall { +func (c *AccountsVerifyphonenumberCall) Context(ctx context.Context) *AccountsVerifyphonenumberCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsReturncarrierListCall) Header() http.Header { +func (c *AccountsVerifyphonenumberCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsReturncarrierListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *AccountsVerifyphonenumberCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.verifyphonenumberrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/verifyphonenumber") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.verifyphonenumber", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.returncarrier.list" call. +// Do executes the "content.accounts.verifyphonenumber" call. // Any non-2xx status code is an error. Response headers are in either -// *ListAccountReturnCarrierResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *VerifyPhoneNumberResponse.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 *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListAccountReturnCarrierResponse, error) { +func (c *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*VerifyPhoneNumberResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15338,7 +14019,7 @@ func (c *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListA if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListAccountReturnCarrierResponse{ + ret := &VerifyPhoneNumberResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15349,87 +14030,83 @@ func (c *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListA if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.verifyphonenumber", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountsReturncarrierPatchCall struct { - s *APIService - accountId int64 - carrierAccountId int64 - accountreturncarrier *AccountReturnCarrier - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCredentialsCreateCall struct { + s *APIService + accountId int64 + accountcredentials *AccountCredentials + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a return carrier in the merchant account. +// Create: Uploads credentials for the Merchant Center account. If credentials +// already exist for this Merchant Center account and purpose, this method +// updates them. // -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -// - carrierAccountId: The Google-provided unique carrier ID, used to update -// the resource. -func (r *AccountsReturncarrierService) Patch(accountId int64, carrierAccountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierPatchCall { - c := &AccountsReturncarrierPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The merchant id of the account these credentials belong to. +func (r *AccountsCredentialsService) Create(accountId int64, accountcredentials *AccountCredentials) *AccountsCredentialsCreateCall { + c := &AccountsCredentialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.accountId = accountId - c.carrierAccountId = carrierAccountId - c.accountreturncarrier = accountreturncarrier + c.accountcredentials = accountcredentials return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsReturncarrierPatchCall) Fields(s ...googleapi.Field) *AccountsReturncarrierPatchCall { +func (c *AccountsCredentialsCreateCall) Fields(s ...googleapi.Field) *AccountsCredentialsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierPatchCall) Context(ctx context.Context) *AccountsReturncarrierPatchCall { +func (c *AccountsCredentialsCreateCall) Context(ctx context.Context) *AccountsCredentialsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsReturncarrierPatchCall) Header() http.Header { +func (c *AccountsCredentialsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsReturncarrierPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCredentialsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountreturncarrier) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountcredentials) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/credentials") 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.credentials.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.returncarrier.patch" call. +// Do executes the "content.accounts.credentials.create" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountReturnCarrier.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *AccountCredentials.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 *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { +func (c *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*AccountCredentials, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15448,7 +14125,7 @@ func (c *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*Acco if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountReturnCarrier{ + ret := &AccountCredentials{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15459,75 +14136,80 @@ func (c *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*Acco if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.credentials.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountstatusesCustombatchCall struct { - s *APIService - accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLabelsCreateCall struct { + s *APIService + accountId int64 + accountlabel *AccountLabel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Retrieves multiple Merchant Center account statuses in a single -// request. -func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { - c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountstatusescustombatchrequest = accountstatusescustombatchrequest +// Create: Creates a new label, not assigned to any account. +// +// - accountId: The id of the account this label belongs to. +func (r *AccountsLabelsService) Create(accountId int64, accountlabel *AccountLabel) *AccountsLabelsCreateCall { + c := &AccountsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.accountlabel = accountlabel return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { +func (c *AccountsLabelsCreateCall) Fields(s ...googleapi.Field) *AccountsLabelsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { +func (c *AccountsLabelsCreateCall) Context(ctx context.Context) *AccountsLabelsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountstatusesCustombatchCall) Header() http.Header { +func (c *AccountsLabelsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountstatusescustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountlabel) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accountstatuses.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "accountId": strconv.FormatInt(c.accountId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accountstatuses.custombatch" call. +// Do executes the "content.accounts.labels.create" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountstatusesCustomBatchResponse.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 *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { +// *AccountLabel.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 *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15546,7 +14228,7 @@ func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Acco if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountstatusesCustomBatchResponse{ + ret := &AccountLabel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15557,179 +14239,120 @@ func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Acco if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accountstatuses.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccountstatusesGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsLabelsDeleteCall struct { + s *APIService + accountId int64 + labelId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status of a Merchant Center account. No itemLevelIssues -// are returned for multi-client accounts. +// Delete: Deletes a label and removes it from all accounts to which it was +// assigned. // -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { - c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - accountId: The id of the account that owns the label. +// - labelId: The id of the label to delete. +func (r *AccountsLabelsService) Delete(accountId int64, labelId int64) *AccountsLabelsDeleteCall { + c := &AccountsLabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.accountId = accountId - return c -} - -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) + c.labelId = labelId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { +func (c *AccountsLabelsDeleteCall) Fields(s ...googleapi.Field) *AccountsLabelsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { +func (c *AccountsLabelsDeleteCall) Context(ctx context.Context) *AccountsLabelsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountstatusesGetCall) Header() http.Header { +func (c *AccountsLabelsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "labelId": strconv.FormatInt(c.labelId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accountstatuses.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accountstatuses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountStatus.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 *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { +// Do executes the "content.accounts.labels.delete" call. +func (c *AccountsLabelsDeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accountstatuses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type AccountstatusesListCall struct { +type AccountsLabelsListCall struct { s *APIService - merchantId uint64 + accountId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the statuses of the sub-accounts in your Merchant Center -// account. +// List: Lists the labels assigned to an account. // -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { - c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// account statuses to return in the response, used for paging. -func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// - accountId: The account id for whose labels are to be listed. +func (r *AccountsLabelsService) List(accountId int64) *AccountsLabelsListCall { + c := &AccountsLabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId return c } -// Name sets the optional parameter "name": If set, only the accounts with the -// given name (case sensitive) will be returned. -func (c *AccountstatusesListCall) Name(name string) *AccountstatusesListCall { - c.urlParams_.Set("name", name) +// PageSize sets the optional parameter "pageSize": The maximum number of +// labels to return. The service may return fewer than this value. If +// unspecified, at most 50 labels will be returned. The maximum value is 1000; +// values above 1000 will be coerced to 1000. +func (c *AccountsLabelsListCall) PageSize(pageSize int64) *AccountsLabelsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListAccountLabels` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListAccountLabels` must match the call that provided the page token. +func (c *AccountsLabelsListCall) PageToken(pageToken string) *AccountsLabelsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15737,7 +14360,7 @@ func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesLi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { +func (c *AccountsLabelsListCall) Fields(s ...googleapi.Field) *AccountsLabelsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15745,34 +14368,34 @@ func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesL // IfNoneMatch sets an 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. -func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { +func (c *AccountsLabelsListCall) IfNoneMatch(entityTag string) *AccountsLabelsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { +func (c *AccountsLabelsListCall) Context(ctx context.Context) *AccountsLabelsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountstatusesListCall) Header() http.Header { +func (c *AccountsLabelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -15780,19 +14403,19 @@ func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accountstatuses.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accountstatuses.list" call. +// Do executes the "content.accounts.labels.list" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountstatusesListResponse.ServerResponse.Header or (if a response was +// *ListAccountLabelsResponse.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 *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { +func (c *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountLabelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15811,7 +14434,7 @@ func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*Accountstat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountstatusesListResponse{ + ret := &ListAccountLabelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15822,14 +14445,14 @@ func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*Accountstat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accountstatuses.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { +func (c *AccountsLabelsListCall) Pages(ctx context.Context, f func(*ListAccountLabelsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -15847,71 +14470,80 @@ func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*Accountstat } } -type AccounttaxCustombatchCall struct { - s *APIService - accounttaxcustombatchrequest *AccounttaxCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLabelsPatchCall struct { + s *APIService + accountId int64 + labelId int64 + accountlabel *AccountLabel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Retrieves and updates tax settings of multiple accounts in a -// single request. -func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { - c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accounttaxcustombatchrequest = accounttaxcustombatchrequest +// Patch: Updates a label. +// +// - accountId: The id of the account this label belongs to. +// - labelId: The id of the label to update. +func (r *AccountsLabelsService) Patch(accountId int64, labelId int64, accountlabel *AccountLabel) *AccountsLabelsPatchCall { + c := &AccountsLabelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.labelId = labelId + c.accountlabel = accountlabel return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { +func (c *AccountsLabelsPatchCall) Fields(s ...googleapi.Field) *AccountsLabelsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { +func (c *AccountsLabelsPatchCall) Context(ctx context.Context) *AccountsLabelsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccounttaxCustombatchCall) Header() http.Header { +func (c *AccountsLabelsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accounttaxcustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountlabel) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") 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 - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "accountId": strconv.FormatInt(c.accountId, 10), + "labelId": strconv.FormatInt(c.labelId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.labels.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.custombatch" call. +// Do executes the "content.accounts.labels.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *AccounttaxCustomBatchResponse.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 *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { +// *AccountLabel.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 *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15930,7 +14562,7 @@ func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*Accountta if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccounttaxCustomBatchResponse{ + ret := &AccountLabel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15941,93 +14573,82 @@ func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*Accountta if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.labels.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccounttaxGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierCreateCall struct { + s *APIService + accountId int64 + accountreturncarrier *AccountReturnCarrier + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the tax settings of the account. +// Create: Links return carrier to a merchant account. // -// - accountId: The ID of the account for which to get/update account tax -// settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { - c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +func (r *AccountsReturncarrierService) Create(accountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierCreateCall { + c := &AccountsReturncarrierCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.accountId = accountId + c.accountreturncarrier = accountreturncarrier return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { +func (c *AccountsReturncarrierCreateCall) Fields(s ...googleapi.Field) *AccountsReturncarrierCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { +func (c *AccountsReturncarrierCreateCall) Context(ctx context.Context) *AccountsReturncarrierCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccounttaxGetCall) Header() http.Header { +func (c *AccountsReturncarrierCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *AccountsReturncarrierCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountreturncarrier) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.get" call. +// Do executes the "content.accounts.returncarrier.create" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountTax.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 *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { +// *AccountReturnCarrier.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 *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16046,7 +14667,7 @@ func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountTax{ + ret := &AccountReturnCarrier{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16057,235 +14678,167 @@ func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type AccounttaxListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierDeleteCall struct { + s *APIService + accountId int64 + carrierAccountId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the tax settings of the sub-accounts in your Merchant Center -// account. +// Delete: Delete a return carrier in the merchant account. // -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { - c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// tax settings to return in the response, used for paging. -func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { - c.urlParams_.Set("pageToken", pageToken) +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +// - carrierAccountId: The Google-provided unique carrier ID, used to update +// the resource. +func (r *AccountsReturncarrierService) Delete(accountId int64, carrierAccountId int64) *AccountsReturncarrierDeleteCall { + c := &AccountsReturncarrierDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.carrierAccountId = carrierAccountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { +func (c *AccountsReturncarrierDeleteCall) Fields(s ...googleapi.Field) *AccountsReturncarrierDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { +func (c *AccountsReturncarrierDeleteCall) Context(ctx context.Context) *AccountsReturncarrierDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccounttaxListCall) Header() http.Header { +func (c *AccountsReturncarrierDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccounttaxListResponse.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 *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { +// Do executes the "content.accounts.returncarrier.delete" call. +func (c *AccountsReturncarrierDeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &AccounttaxListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) if err != nil { - return nil, err + return err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return gensupport.WrapError(err) } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type AccounttaxUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accounttax *AccountTax - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierListCall struct { + s *APIService + accountId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the tax settings of the account. Any fields that are not -// provided are deleted from the resource. +// List: Lists available return carriers in the merchant account. // -// - accountId: The ID of the account for which to get/update account tax -// settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { - c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +func (r *AccountsReturncarrierService) List(accountId int64) *AccountsReturncarrierListCall { + c := &AccountsReturncarrierListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.accountId = accountId - c.accounttax = accounttax return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { +func (c *AccountsReturncarrierListCall) Fields(s ...googleapi.Field) *AccountsReturncarrierListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *AccountsReturncarrierListCall) IfNoneMatch(entityTag string) *AccountsReturncarrierListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { +func (c *AccountsReturncarrierListCall) Context(ctx context.Context) *AccountsReturncarrierListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccounttaxUpdateCall) Header() http.Header { +func (c *AccountsReturncarrierListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accounttax) - if err != nil { - return nil, err +func (c *AccountsReturncarrierListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.update" call. +// Do executes the "content.accounts.returncarrier.list" call. // Any non-2xx status code is an error. Response headers are in either -// *AccountTax.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 *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { +// *ListAccountReturnCarrierResponse.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 *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListAccountReturnCarrierResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16304,7 +14857,7 @@ func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AccountTax{ + ret := &ListAccountReturnCarrierResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16315,84 +14868,87 @@ func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type CollectionsCreateCall struct { - s *APIService - merchantId int64 - collection *Collection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierPatchCall struct { + s *APIService + accountId int64 + carrierAccountId int64 + accountreturncarrier *AccountReturnCarrier + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Uploads a collection to your Merchant Center account. If a -// collection with the same collectionId already exists, this method updates -// that entry. In each update, the collection is completely replaced by the -// fields in the body of the update request. +// Patch: Updates a return carrier in the merchant account. // -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Create(merchantId int64, collection *Collection) *CollectionsCreateCall { - c := &CollectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collection = collection +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +// - carrierAccountId: The Google-provided unique carrier ID, used to update +// the resource. +func (r *AccountsReturncarrierService) Patch(accountId int64, carrierAccountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierPatchCall { + c := &AccountsReturncarrierPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.carrierAccountId = carrierAccountId + c.accountreturncarrier = accountreturncarrier return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionsCreateCall) Fields(s ...googleapi.Field) *CollectionsCreateCall { +func (c *AccountsReturncarrierPatchCall) Fields(s ...googleapi.Field) *AccountsReturncarrierPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *CollectionsCreateCall) Context(ctx context.Context) *CollectionsCreateCall { +func (c *AccountsReturncarrierPatchCall) Context(ctx context.Context) *AccountsReturncarrierPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionsCreateCall) Header() http.Header { +func (c *AccountsReturncarrierPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.collection) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountreturncarrier) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collections.create" call. +// Do executes the "content.accounts.returncarrier.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Collection.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, error) { +// *AccountReturnCarrier.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 *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16411,7 +14967,7 @@ func (c *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Collection{ + ret := &AccountReturnCarrier{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16422,115 +14978,144 @@ func (c *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounts.returncarrier.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type CollectionsDeleteCall struct { - s *APIService - merchantId int64 - collectionId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountstatusesCustombatchCall struct { + s *APIService + accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a collection from your Merchant Center account. -// -// - collectionId: The collectionId of the collection. CollectionId is the same -// as the REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Delete(merchantId int64, collectionId string) *CollectionsDeleteCall { - c := &CollectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId +// Custombatch: Retrieves multiple Merchant Center account statuses in a single +// request. +func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { + c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountstatusescustombatchrequest = accountstatusescustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionsDeleteCall) Fields(s ...googleapi.Field) *CollectionsDeleteCall { +func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *CollectionsDeleteCall) Context(ctx context.Context) *CollectionsDeleteCall { +func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionsDeleteCall) Header() http.Header { +func (c *AccountstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountstatusescustombatchrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accountstatuses.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collections.delete" call. -func (c *CollectionsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accountstatuses.custombatch" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountstatusesCustomBatchResponse.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 *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) + } + ret := &AccountstatusesCustomBatchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.delete", "response", internallog.HTTPResponse(res, nil)) - return nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accountstatuses.custombatch", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type CollectionsGetCall struct { +type AccountstatusesGetCall struct { s *APIService - merchantId int64 - collectionId string + merchantId uint64 + accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves a collection from your Merchant Center account. +// Get: Retrieves the status of a Merchant Center account. No itemLevelIssues +// are returned for multi-client accounts. // -// - collectionId: The REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Get(merchantId int64, collectionId string) *CollectionsGetCall { - c := &CollectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { + c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.collectionId = collectionId + c.accountId = accountId + return c +} + +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionsGetCall) Fields(s ...googleapi.Field) *CollectionsGetCall { +func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16538,34 +15123,34 @@ func (c *CollectionsGetCall) Fields(s ...googleapi.Field) *CollectionsGetCall { // IfNoneMatch sets an 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. -func (c *CollectionsGetCall) IfNoneMatch(entityTag string) *CollectionsGetCall { +func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CollectionsGetCall) Context(ctx context.Context) *CollectionsGetCall { +func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionsGetCall) Header() http.Header { +func (c *AccountstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -16573,19 +15158,19 @@ func (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accountstatuses.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collections.get" call. +// Do executes the "content.accountstatuses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Collection.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *AccountStatus.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 *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, error) { +func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16604,7 +15189,7 @@ func (c *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Collection{ + ret := &AccountStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16615,43 +15200,55 @@ func (c *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, erro if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accountstatuses.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type CollectionsListCall struct { +type AccountstatusesListCall struct { s *APIService - merchantId int64 + merchantId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the collections in your Merchant Center account. The response -// might contain fewer items than specified by page_size. Rely on -// next_page_token to determine if there are more items to be requested. +// List: Lists the statuses of the sub-accounts in your Merchant Center +// account. // -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) List(merchantId int64) *CollectionsListCall { - c := &CollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { + c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// collections to return in the response, used for paging. Defaults to 50; -// values above 1000 will be coerced to 1000. -func (c *CollectionsListCall) PageSize(pageSize int64) *CollectionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) return c } -// PageToken sets the optional parameter "pageToken": Token (if provided) to -// retrieve the subsequent page. All other parameters must match the original -// call that provided the page token. -func (c *CollectionsListCall) PageToken(pageToken string) *CollectionsListCall { +// MaxResults sets the optional parameter "maxResults": The maximum number of +// account statuses to return in the response, used for paging. +func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// Name sets the optional parameter "name": If set, only the accounts with the +// given name (case sensitive) will be returned. +func (c *AccountstatusesListCall) Name(name string) *AccountstatusesListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -16659,7 +15256,7 @@ func (c *CollectionsListCall) PageToken(pageToken string) *CollectionsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionsListCall) Fields(s ...googleapi.Field) *CollectionsListCall { +func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16667,34 +15264,34 @@ func (c *CollectionsListCall) Fields(s ...googleapi.Field) *CollectionsListCall // IfNoneMatch sets an 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. -func (c *CollectionsListCall) IfNoneMatch(entityTag string) *CollectionsListCall { +func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CollectionsListCall) Context(ctx context.Context) *CollectionsListCall { +func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionsListCall) Header() http.Header { +func (c *AccountstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -16702,19 +15299,19 @@ func (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accountstatuses.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collections.list" call. +// Do executes the "content.accountstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCollectionsResponse.ServerResponse.Header or (if a response was +// *AccountstatusesListResponse.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 *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollectionsResponse, error) { +func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16733,7 +15330,7 @@ func (c *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollections if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCollectionsResponse{ + ret := &AccountstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16744,14 +15341,14 @@ func (c *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollections if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accountstatuses.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *CollectionsListCall) Pages(ctx context.Context, f func(*ListCollectionsResponse) error) error { +func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16769,89 +15366,71 @@ func (c *CollectionsListCall) Pages(ctx context.Context, f func(*ListCollections } } -type CollectionstatusesGetCall struct { - s *APIService - merchantId int64 - collectionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccounttaxCustombatchCall struct { + s *APIService + accounttaxcustombatchrequest *AccounttaxCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the status of a collection from your Merchant Center account. -// -// - collectionId: The collectionId of the collection. CollectionId is the same -// as the REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionstatusesService) Get(merchantId int64, collectionId string) *CollectionstatusesGetCall { - c := &CollectionstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId +// Custombatch: Retrieves and updates tax settings of multiple accounts in a +// single request. +func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { + c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accounttaxcustombatchrequest = accounttaxcustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *CollectionstatusesGetCall { +func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *CollectionstatusesGetCall) IfNoneMatch(entityTag string) *CollectionstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *CollectionstatusesGetCall) Context(ctx context.Context) *CollectionstatusesGetCall { +func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionstatusesGetCall) Header() http.Header { +func (c *AccounttaxCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accounttaxcustombatchrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collectionstatuses.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collectionstatuses.get" call. +// Do executes the "content.accounttax.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *CollectionStatus.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 *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*CollectionStatus, error) { +// *AccounttaxCustomBatchResponse.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 *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16870,7 +15449,7 @@ func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*Collectio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CollectionStatus{ + ret := &AccounttaxCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16881,49 +15460,38 @@ func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*Collectio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collectionstatuses.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type CollectionstatusesListCall struct { +type AccounttaxGetCall struct { s *APIService - merchantId int64 + merchantId uint64 + accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the statuses of the collections in your Merchant Center account. +// Get: Retrieves the tax settings of the account. // -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionstatusesService) List(merchantId int64) *CollectionstatusesListCall { - c := &CollectionstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// collection statuses to return in the response, used for paging. Defaults to -// 50; values above 1000 will be coerced to 1000. -func (c *CollectionstatusesListCall) PageSize(pageSize int64) *CollectionstatusesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token (if provided) to -// retrieve the subsequent page. All other parameters must match the original -// call that provided the page token. -func (c *CollectionstatusesListCall) PageToken(pageToken string) *CollectionstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - accountId: The ID of the account for which to get/update account tax +// settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { + c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionstatusesListCall) Fields(s ...googleapi.Field) *CollectionstatusesListCall { +func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16931,34 +15499,34 @@ func (c *CollectionstatusesListCall) Fields(s ...googleapi.Field) *Collectionsta // IfNoneMatch sets an 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. -func (c *CollectionstatusesListCall) IfNoneMatch(entityTag string) *CollectionstatusesListCall { +func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CollectionstatusesListCall) Context(ctx context.Context) *CollectionstatusesListCall { +func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionstatusesListCall) Header() http.Header { +func (c *AccounttaxGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -16966,19 +15534,19 @@ func (c *CollectionstatusesListCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collectionstatuses.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collectionstatuses.list" call. +// Do executes the "content.accounttax.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCollectionStatusesResponse.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 *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListCollectionStatusesResponse, error) { +// *AccountTax.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 *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16997,7 +15565,7 @@ func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListColl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCollectionStatusesResponse{ + ret := &AccountTax{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17008,102 +15576,103 @@ func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListColl if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collectionstatuses.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// 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 *CollectionstatusesListCall) Pages(ctx context.Context, f func(*ListCollectionStatusesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ConversionsourcesCreateCall struct { - s *APIService - merchantId int64 - conversionsource *ConversionSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccounttaxListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new conversion source. +// List: Lists the tax settings of the sub-accounts in your Merchant Center +// account. // -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Create(merchantId int64, conversionsource *ConversionSource) *ConversionsourcesCreateCall { - c := &ConversionsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { + c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionsource = conversionsource + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// tax settings to return in the response, used for paging. +func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { + 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 // details. -func (c *ConversionsourcesCreateCall) Fields(s ...googleapi.Field) *ConversionsourcesCreateCall { +func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesCreateCall) Context(ctx context.Context) *ConversionsourcesCreateCall { +func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesCreateCall) Header() http.Header { +func (c *AccounttaxListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.conversionsource) - if err != nil { - return nil, err +func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.create" call. +// Do executes the "content.accounttax.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *AccounttaxListResponse.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 *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17122,7 +15691,7 @@ func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*Convers if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &AccounttaxListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17133,170 +15702,109 @@ func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*Convers if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ConversionsourcesDeleteCall struct { - s *APIService - merchantId int64 - conversionSourceId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Archives an existing conversion source. It will be recoverable for -// 30 days. This archiving behavior is not typical in the Content API and -// unique to this service. -// -// - conversionSourceId: The ID of the conversion source to be deleted. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Delete(merchantId int64, conversionSourceId string) *ConversionsourcesDeleteCall { - c := &ConversionsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.conversionSourceId = conversionSourceId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ConversionsourcesDeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesDeleteCall) Context(ctx context.Context) *ConversionsourcesDeleteCall { +// 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 *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ConversionsourcesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.conversionsources.delete" call. -func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.delete", "response", internallog.HTTPResponse(res, nil)) - return nil } -type ConversionsourcesGetCall struct { - s *APIService - merchantId int64 - conversionSourceId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccounttaxUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accounttax *AccountTax + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Fetches a conversion source. +// Update: Updates the tax settings of the account. Any fields that are not +// provided are deleted from the resource. // -// - conversionSourceId: The REST ID of the collection. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Get(merchantId int64, conversionSourceId string) *ConversionsourcesGetCall { - c := &ConversionsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to get/update account tax +// settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { + c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId + c.accountId = accountId + c.accounttax = accounttax return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *ConversionsourcesGetCall { +func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ConversionsourcesGetCall) IfNoneMatch(entityTag string) *ConversionsourcesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesGetCall) Context(ctx context.Context) *ConversionsourcesGetCall { +func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesGetCall) Header() http.Header { +func (c *AccounttaxUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accounttax) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.accounttax.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.get" call. +// Do executes the "content.accounttax.update" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.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 *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +// *AccountTax.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 *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17315,7 +15823,7 @@ func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*Conversion if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &AccountTax{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17326,92 +15834,67 @@ func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*Conversion if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.accounttax.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ConversionsourcesListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type CollectionsCreateCall struct { + s *APIService + merchantId int64 + collection *Collection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of conversion sources the caller has access to. +// Create: Uploads a collection to your Merchant Center account. If a +// collection with the same collectionId already exists, this method updates +// that entry. In each update, the collection is completely replaced by the +// fields in the body of the update request. // -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) List(merchantId int64) *ConversionsourcesListCall { - c := &ConversionsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Create(merchantId int64, collection *Collection) *CollectionsCreateCall { + c := &CollectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// conversion sources to return in a page. If no `page_size` is specified, -// `100` is used as the default value. The maximum value is `200`. Values above -// `200` will be coerced to `200`. Regardless of pagination, at most `200` -// conversion sources are returned in total. -func (c *ConversionsourcesListCall) PageSize(pageSize int64) *ConversionsourcesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token. -func (c *ConversionsourcesListCall) PageToken(pageToken string) *ConversionsourcesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": If true, also returns -// archived conversion sources. -func (c *ConversionsourcesListCall) ShowDeleted(showDeleted bool) *ConversionsourcesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + c.collection = collection return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesListCall) Fields(s ...googleapi.Field) *ConversionsourcesListCall { +func (c *CollectionsCreateCall) Fields(s ...googleapi.Field) *CollectionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ConversionsourcesListCall) IfNoneMatch(entityTag string) *ConversionsourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesListCall) Context(ctx context.Context) *ConversionsourcesListCall { +func (c *CollectionsCreateCall) Context(ctx context.Context) *CollectionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesListCall) Header() http.Header { +func (c *CollectionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *CollectionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.collection) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -17419,17 +15902,16 @@ func (c *ConversionsourcesListCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.list" call. +// Do executes the "content.collections.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ListConversionSourcesResponse.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 *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConversionSourcesResponse, error) { +// *Collection.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17448,7 +15930,7 @@ func (c *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConve if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListConversionSourcesResponse{ + ret := &Collection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17459,114 +15941,170 @@ func (c *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConve if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// 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 *ConversionsourcesListCall) Pages(ctx context.Context, f func(*ListConversionSourcesResponse) error) error { +type CollectionsDeleteCall struct { + s *APIService + merchantId int64 + collectionId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a collection from your Merchant Center account. +// +// - collectionId: The collectionId of the collection. CollectionId is the same +// as the REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Delete(merchantId int64, collectionId string) *CollectionsDeleteCall { + c := &CollectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.collectionId = collectionId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *CollectionsDeleteCall) Fields(s ...googleapi.Field) *CollectionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *CollectionsDeleteCall) Context(ctx context.Context) *CollectionsDeleteCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *CollectionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) } + return c.header_ } -type ConversionsourcesPatchCall struct { - s *APIService - merchantId int64 - conversionSourceId string - conversionsource *ConversionSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (c *CollectionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.collections.delete" call. +func (c *CollectionsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return gensupport.WrapError(err) + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.delete", "response", internallog.HTTPResponse(res, nil)) + return nil +} + +type CollectionsGetCall struct { + s *APIService + merchantId int64 + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates information of an existing conversion source. +// Get: Retrieves a collection from your Merchant Center account. // -// - conversionSourceId: The ID of the conversion source to be updated. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Patch(merchantId int64, conversionSourceId string, conversionsource *ConversionSource) *ConversionsourcesPatchCall { - c := &ConversionsourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - collectionId: The REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Get(merchantId int64, collectionId string) *CollectionsGetCall { + c := &CollectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId - c.conversionsource = conversionsource - return c -} - -// UpdateMask sets the optional parameter "updateMask": List of fields being -// updated. The following fields can be updated: `attribution_settings`, -// `display_name`, `currency_code`. -func (c *ConversionsourcesPatchCall) UpdateMask(updateMask string) *ConversionsourcesPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.collectionId = collectionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesPatchCall) Fields(s ...googleapi.Field) *ConversionsourcesPatchCall { +func (c *CollectionsGetCall) Fields(s ...googleapi.Field) *CollectionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *CollectionsGetCall) IfNoneMatch(entityTag string) *CollectionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesPatchCall) Context(ctx context.Context) *ConversionsourcesPatchCall { +func (c *CollectionsGetCall) Context(ctx context.Context) *CollectionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesPatchCall) Header() http.Header { +func (c *CollectionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.conversionsource) - if err != nil { - return nil, err +func (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.patch" call. +// Do executes the "content.collections.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.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 *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +// *Collection.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17585,7 +16123,7 @@ func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*Conversi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &Collection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17596,121 +16134,187 @@ func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*Conversi if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ConversionsourcesUndeleteCall struct { - s *APIService - merchantId int64 - conversionSourceId string - undeleteconversionsourcerequest *UndeleteConversionSourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CollectionsListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Undelete: Re-enables an archived conversion source. +// List: Lists the collections in your Merchant Center account. The response +// might contain fewer items than specified by page_size. Rely on +// next_page_token to determine if there are more items to be requested. // -// - conversionSourceId: The ID of the conversion source to be undeleted. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Undelete(merchantId int64, conversionSourceId string, undeleteconversionsourcerequest *UndeleteConversionSourceRequest) *ConversionsourcesUndeleteCall { - c := &ConversionsourcesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) List(merchantId int64) *CollectionsListCall { + c := &CollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId - c.undeleteconversionsourcerequest = undeleteconversionsourcerequest + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// collections to return in the response, used for paging. Defaults to 50; +// values above 1000 will be coerced to 1000. +func (c *CollectionsListCall) PageSize(pageSize int64) *CollectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token (if provided) to +// retrieve the subsequent page. All other parameters must match the original +// call that provided the page token. +func (c *CollectionsListCall) PageToken(pageToken string) *CollectionsListCall { + 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 // details. -func (c *ConversionsourcesUndeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesUndeleteCall { +func (c *CollectionsListCall) Fields(s ...googleapi.Field) *CollectionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *CollectionsListCall) IfNoneMatch(entityTag string) *CollectionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesUndeleteCall) Context(ctx context.Context) *ConversionsourcesUndeleteCall { +func (c *CollectionsListCall) Context(ctx context.Context) *CollectionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesUndeleteCall) Header() http.Header { +func (c *CollectionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteconversionsourcerequest) - if err != nil { - return nil, err +func (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}:undelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collections.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.undelete" call. -func (c *ConversionsourcesUndeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.collections.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListCollectionsResponse.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 *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollectionsResponse, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.undelete", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &ListCollectionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collections.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type CssesGetCall struct { +// 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 *CollectionsListCall) Pages(ctx context.Context, f func(*ListCollectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 CollectionstatusesGetCall struct { s *APIService - cssGroupId int64 - cssDomainId int64 + merchantId int64 + collectionId string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves a single CSS domain by ID. +// Get: Gets the status of a collection from your Merchant Center account. // -// - cssDomainId: The ID of the CSS domain to return. -// - cssGroupId: The ID of the managing account. If this parameter is not the -// same as cssDomainId (#cssDomainId), then this ID must be a CSS group ID -// and `cssDomainId` must be the ID of a CSS domain affiliated with this -// group. -func (r *CssesService) Get(cssGroupId int64, cssDomainId int64) *CssesGetCall { - c := &CssesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - c.cssDomainId = cssDomainId +// - collectionId: The collectionId of the collection. CollectionId is the same +// as the REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionstatusesService) Get(merchantId int64, collectionId string) *CollectionstatusesGetCall { + c := &CollectionstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.collectionId = collectionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { +func (c *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *CollectionstatusesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17718,34 +16322,34 @@ func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { // IfNoneMatch sets an 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. -func (c *CssesGetCall) IfNoneMatch(entityTag string) *CssesGetCall { +func (c *CollectionstatusesGetCall) IfNoneMatch(entityTag string) *CollectionstatusesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CssesGetCall) Context(ctx context.Context) *CssesGetCall { +func (c *CollectionstatusesGetCall) Context(ctx context.Context) *CollectionstatusesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CssesGetCall) Header() http.Header { +func (c *CollectionstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses/{collectionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -17753,19 +16357,20 @@ func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), - "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.csses.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collectionstatuses.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.get" call. +// Do executes the "content.collectionstatuses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Css.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 *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { +// *CollectionStatus.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 *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*CollectionStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17784,7 +16389,7 @@ func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Css{ + ret := &CollectionStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17795,42 +16400,41 @@ func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.csses.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collectionstatuses.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type CssesListCall struct { +type CollectionstatusesListCall struct { s *APIService - cssGroupId int64 + merchantId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists CSS domains affiliated with a CSS group. +// List: Lists the statuses of the collections in your Merchant Center account. // -// - cssGroupId: The CSS group ID of CSS domains to be listed. -func (r *CssesService) List(cssGroupId int64) *CssesListCall { - c := &CssesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionstatusesService) List(merchantId int64) *CollectionstatusesListCall { + c := &CollectionstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId return c } -// PageSize sets the optional parameter "pageSize": The maximum number of CSS -// domains to return. The service may return fewer than this value. If -// unspecified, at most 50 CSS domains will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *CssesListCall) PageSize(pageSize int64) *CssesListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// collection statuses to return in the response, used for paging. Defaults to +// 50; values above 1000 will be coerced to 1000. +func (c *CollectionstatusesListCall) PageSize(pageSize int64) *CollectionstatusesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListCsses` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListCsses` must -// match the call that provided the page token. -func (c *CssesListCall) PageToken(pageToken string) *CssesListCall { +// PageToken sets the optional parameter "pageToken": Token (if provided) to +// retrieve the subsequent page. All other parameters must match the original +// call that provided the page token. +func (c *CollectionstatusesListCall) PageToken(pageToken string) *CollectionstatusesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17838,7 +16442,7 @@ func (c *CssesListCall) PageToken(pageToken string) *CssesListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CssesListCall) Fields(s ...googleapi.Field) *CssesListCall { +func (c *CollectionstatusesListCall) Fields(s ...googleapi.Field) *CollectionstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17846,34 +16450,34 @@ func (c *CssesListCall) Fields(s ...googleapi.Field) *CssesListCall { // IfNoneMatch sets an 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. -func (c *CssesListCall) IfNoneMatch(entityTag string) *CssesListCall { +func (c *CollectionstatusesListCall) IfNoneMatch(entityTag string) *CollectionstatusesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CssesListCall) Context(ctx context.Context) *CssesListCall { +func (c *CollectionstatusesListCall) Context(ctx context.Context) *CollectionstatusesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CssesListCall) Header() http.Header { +func (c *CollectionstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesListCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -17881,19 +16485,19 @@ func (c *CssesListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.csses.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.collectionstatuses.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.list" call. +// Do executes the "content.collectionstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCssesResponse.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 *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, error) { +// *ListCollectionStatusesResponse.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 *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListCollectionStatusesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17912,7 +16516,7 @@ func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCssesResponse{ + ret := &ListCollectionStatusesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17923,14 +16527,14 @@ func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.csses.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.collectionstatuses.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *CssesListCall) Pages(ctx context.Context, f func(*ListCssesResponse) error) error { +func (c *CollectionstatusesListCall) Pages(ctx context.Context, f func(*ListCollectionStatusesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17948,61 +16552,57 @@ func (c *CssesListCall) Pages(ctx context.Context, f func(*ListCssesResponse) er } } -type CssesUpdatelabelsCall struct { - s *APIService - cssGroupId int64 - cssDomainId int64 - labelids *LabelIds - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesCreateCall struct { + s *APIService + merchantId int64 + conversionsource *ConversionSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatelabels: Updates labels that are assigned to a CSS domain by its CSS -// group. +// Create: Creates a new conversion source. // -// - cssDomainId: The ID of the updated CSS domain. -// - cssGroupId: The CSS group ID of the updated CSS domain. -func (r *CssesService) Updatelabels(cssGroupId int64, cssDomainId int64, labelids *LabelIds) *CssesUpdatelabelsCall { - c := &CssesUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - c.cssDomainId = cssDomainId - c.labelids = labelids +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Create(merchantId int64, conversionsource *ConversionSource) *ConversionsourcesCreateCall { + c := &ConversionsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionsource = conversionsource return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CssesUpdatelabelsCall) Fields(s ...googleapi.Field) *CssesUpdatelabelsCall { +func (c *ConversionsourcesCreateCall) Fields(s ...googleapi.Field) *ConversionsourcesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *CssesUpdatelabelsCall) Context(ctx context.Context) *CssesUpdatelabelsCall { +func (c *ConversionsourcesCreateCall) Context(ctx context.Context) *ConversionsourcesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CssesUpdatelabelsCall) Header() http.Header { +func (c *ConversionsourcesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *ConversionsourcesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.labelids) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.conversionsource) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}/updatelabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18010,19 +16610,19 @@ func (c *CssesUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), - "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.csses.updatelabels", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.updatelabels" call. +// Do executes the "content.conversionsources.create" call. // Any non-2xx status code is an error. Response headers are in either -// *Css.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 *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { +// *ConversionSource.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 *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18041,7 +16641,7 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Css{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18052,75 +16652,170 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.csses.updatelabels", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type DatafeedsCustombatchCall struct { - s *APIService - datafeedscustombatchrequest *DatafeedsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesDeleteCall struct { + s *APIService + merchantId int64 + conversionSourceId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Deletes, fetches, gets, inserts and updates multiple datafeeds -// in a single request. -func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { - c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedscustombatchrequest = datafeedscustombatchrequest +// Delete: Archives an existing conversion source. It will be recoverable for +// 30 days. This archiving behavior is not typical in the Content API and +// unique to this service. +// +// - conversionSourceId: The ID of the conversion source to be deleted. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Delete(merchantId int64, conversionSourceId string) *ConversionsourcesDeleteCall { + c := &ConversionsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionSourceId = conversionSourceId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { +func (c *ConversionsourcesDeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { +func (c *ConversionsourcesDeleteCall) Context(ctx context.Context) *ConversionsourcesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsCustombatchCall) Header() http.Header { +func (c *ConversionsourcesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeedscustombatchrequest) +func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.conversionsources.delete" call. +func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return gensupport.WrapError(err) + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.delete", "response", internallog.HTTPResponse(res, nil)) + return nil +} + +type ConversionsourcesGetCall struct { + s *APIService + merchantId int64 + conversionSourceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches a conversion source. +// +// - conversionSourceId: The REST ID of the collection. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Get(merchantId int64, conversionSourceId string) *ConversionsourcesGetCall { + c := &ConversionsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionSourceId = conversionSourceId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *ConversionsourcesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ConversionsourcesGetCall) IfNoneMatch(entityTag string) *ConversionsourcesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ConversionsourcesGetCall) Context(ctx context.Context) *ConversionsourcesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ConversionsourcesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.custombatch" call. +// Do executes the "content.conversionsources.get" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsCustomBatchResponse.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 *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { +// *ConversionSource.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 *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18139,7 +16834,7 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsCustomBatchResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18150,162 +16845,247 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type DatafeedsDeleteCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a datafeed configuration from your Merchant Center account. +// List: Retrieves the list of conversion sources the caller has access to. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { - c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) List(merchantId int64) *ConversionsourcesListCall { + c := &ConversionsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeedId = datafeedId + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// conversion sources to return in a page. If no `page_size` is specified, +// `100` is used as the default value. The maximum value is `200`. Values above +// `200` will be coerced to `200`. Regardless of pagination, at most `200` +// conversion sources are returned in total. +func (c *ConversionsourcesListCall) PageSize(pageSize int64) *ConversionsourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token. +func (c *ConversionsourcesListCall) PageToken(pageToken string) *ConversionsourcesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ShowDeleted sets the optional parameter "showDeleted": If true, also returns +// archived conversion sources. +func (c *ConversionsourcesListCall) ShowDeleted(showDeleted bool) *ConversionsourcesListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { +func (c *ConversionsourcesListCall) Fields(s ...googleapi.Field) *ConversionsourcesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ConversionsourcesListCall) IfNoneMatch(entityTag string) *ConversionsourcesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { +func (c *ConversionsourcesListCall) Context(ctx context.Context) *ConversionsourcesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsDeleteCall) Header() http.Header { +func (c *ConversionsourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ConversionsourcesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.delete" call. -func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.conversionsources.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListConversionSourcesResponse.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 *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConversionSourcesResponse, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.delete", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &ListConversionSourcesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type DatafeedsFetchnowCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ConversionsourcesListCall) Pages(ctx context.Context, f func(*ListConversionSourcesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center account. -// If you need to call this method more than once per day, we recommend you use -// the Products service -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products) -// to update your product data. +type ConversionsourcesPatchCall struct { + s *APIService + merchantId int64 + conversionSourceId string + conversionsource *ConversionSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates information of an existing conversion source. // -// - datafeedId: The ID of the datafeed to be fetched. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { - c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - conversionSourceId: The ID of the conversion source to be updated. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Patch(merchantId int64, conversionSourceId string, conversionsource *ConversionSource) *ConversionsourcesPatchCall { + c := &ConversionsourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeedId = datafeedId + c.conversionSourceId = conversionSourceId + c.conversionsource = conversionsource + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields being +// updated. The following fields can be updated: `attribution_settings`, +// `display_name`, `currency_code`. +func (c *ConversionsourcesPatchCall) UpdateMask(updateMask string) *ConversionsourcesPatchCall { + 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 // details. -func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { +func (c *ConversionsourcesPatchCall) Fields(s ...googleapi.Field) *ConversionsourcesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { +func (c *ConversionsourcesPatchCall) Context(ctx context.Context) *ConversionsourcesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsFetchnowCall) Header() http.Header { +func (c *ConversionsourcesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ConversionsourcesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.conversionsource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.fetchnow", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.fetchnow" call. +// Do executes the "content.conversionsources.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsFetchNowResponse.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 *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { +// *ConversionSource.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 *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18324,7 +17104,7 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsFetchNowResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18335,196 +17115,176 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.fetchnow", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type DatafeedsGetCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ConversionsourcesUndeleteCall struct { + s *APIService + merchantId int64 + conversionSourceId string + undeleteconversionsourcerequest *UndeleteConversionSourceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a datafeed configuration from your Merchant Center account. +// Undelete: Re-enables an archived conversion source. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { - c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - conversionSourceId: The ID of the conversion source to be undeleted. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Undelete(merchantId int64, conversionSourceId string, undeleteconversionsourcerequest *UndeleteConversionSourceRequest) *ConversionsourcesUndeleteCall { + c := &ConversionsourcesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeedId = datafeedId + c.conversionSourceId = conversionSourceId + c.undeleteconversionsourcerequest = undeleteconversionsourcerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { +func (c *ConversionsourcesUndeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesUndeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { +func (c *ConversionsourcesUndeleteCall) Context(ctx context.Context) *ConversionsourcesUndeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsGetCall) Header() http.Header { +func (c *ConversionsourcesUndeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ConversionsourcesUndeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteconversionsourcerequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}:undelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.conversionsources.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Datafeed.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 *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +// Do executes the "content.conversionsources.undelete" call. +func (c *ConversionsourcesUndeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Datafeed{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.conversionsources.undelete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type DatafeedsInsertCall struct { - s *APIService - merchantId uint64 - datafeed *Datafeed - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CssesGetCall struct { + s *APIService + cssGroupId int64 + cssDomainId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Registers a datafeed configuration with your Merchant Center -// account. +// Get: Retrieves a single CSS domain by ID. // -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { - c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeed = datafeed +// - cssDomainId: The ID of the CSS domain to return. +// - cssGroupId: The ID of the managing account. If this parameter is not the +// same as cssDomainId (#cssDomainId), then this ID must be a CSS group ID +// and `cssDomainId` must be the ID of a CSS domain affiliated with this +// group. +func (r *CssesService) Get(cssGroupId int64, cssDomainId int64) *CssesGetCall { + c := &CssesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + c.cssDomainId = cssDomainId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { +func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *CssesGetCall) IfNoneMatch(entityTag string) *CssesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { +func (c *CssesGetCall) Context(ctx context.Context) *CssesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsInsertCall) Header() http.Header { +func (c *CssesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeed) - if err != nil { - return nil, err +func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.csses.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.insert" call. +// Do executes the "content.csses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at all) in +// *Css.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 *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18543,7 +17303,7 @@ func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Datafeed{ + ret := &Css{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18554,40 +17314,42 @@ func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.csses.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type DatafeedsListCall struct { +type CssesListCall struct { s *APIService - merchantId uint64 + cssGroupId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the configurations for datafeeds in your Merchant Center -// account. +// List: Lists CSS domains affiliated with a CSS group. // -// - merchantId: The ID of the account that manages the datafeeds. This account -// cannot be a multi-client account. -func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { - c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - cssGroupId: The CSS group ID of CSS domains to be listed. +func (r *CssesService) List(cssGroupId int64) *CssesListCall { + c := &CssesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// products to return in the response, used for paging. -func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// PageSize sets the optional parameter "pageSize": The maximum number of CSS +// domains to return. The service may return fewer than this value. If +// unspecified, at most 50 CSS domains will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *CssesListCall) PageSize(pageSize int64) *CssesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListCsses` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListCsses` must +// match the call that provided the page token. +func (c *CssesListCall) PageToken(pageToken string) *CssesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18595,7 +17357,7 @@ func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { +func (c *CssesListCall) Fields(s ...googleapi.Field) *CssesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18603,34 +17365,34 @@ func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { // IfNoneMatch sets an 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. -func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { +func (c *CssesListCall) IfNoneMatch(entityTag string) *CssesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { +func (c *CssesListCall) Context(ctx context.Context) *CssesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsListCall) Header() http.Header { +func (c *CssesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { +func (c *CssesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -18638,19 +17400,19 @@ func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.csses.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.list" call. +// Do executes the "content.csses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *ListCssesResponse.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 *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { +func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18669,7 +17431,7 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsListResponse{ + ret := &ListCssesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18680,14 +17442,14 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.csses.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { +func (c *CssesListCall) Pages(ctx context.Context, f func(*ListCssesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18705,82 +17467,81 @@ func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResp } } -type DatafeedsUpdateCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - datafeed *Datafeed - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CssesUpdatelabelsCall struct { + s *APIService + cssGroupId int64 + cssDomainId int64 + labelids *LabelIds + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } - -// Update: Updates a datafeed configuration of your Merchant Center account. -// Any fields that are not provided are deleted from the resource. -// -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { - c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId - c.datafeed = datafeed + +// Updatelabels: Updates labels that are assigned to a CSS domain by its CSS +// group. +// +// - cssDomainId: The ID of the updated CSS domain. +// - cssGroupId: The CSS group ID of the updated CSS domain. +func (r *CssesService) Updatelabels(cssGroupId int64, cssDomainId int64, labelids *LabelIds) *CssesUpdatelabelsCall { + c := &CssesUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + c.cssDomainId = cssDomainId + c.labelids = labelids return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { +func (c *CssesUpdatelabelsCall) Fields(s ...googleapi.Field) *CssesUpdatelabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { +func (c *CssesUpdatelabelsCall) Context(ctx context.Context) *CssesUpdatelabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsUpdateCall) Header() http.Header { +func (c *CssesUpdatelabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *CssesUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeed) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.labelids) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}/updatelabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.csses.updatelabels", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.update" call. +// Do executes the "content.csses.updatelabels" call. // Any non-2xx status code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at all) in +// *Css.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 *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18799,7 +17560,7 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Datafeed{ + ret := &Css{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18810,75 +17571,75 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.csses.updatelabels", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type DatafeedstatusesCustombatchCall struct { - s *APIService - datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsCustombatchCall struct { + s *APIService + datafeedscustombatchrequest *DatafeedsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Gets multiple Merchant Center datafeed statuses in a single -// request. -func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { - c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest +// Custombatch: Deletes, fetches, gets, inserts and updates multiple datafeeds +// in a single request. +func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { + c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedscustombatchrequest = datafeedscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { +func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { +func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedstatusesCustombatchCall) Header() http.Header { +func (c *DatafeedsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeedstatusescustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeedscustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeedstatuses.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.custombatch" call. +// Do executes the "content.datafeeds.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *DatafeedsCustomBatchResponse.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 *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { +func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18897,7 +17658,7 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedstatusesCustomBatchResponse{ + ret := &DatafeedsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18908,103 +17669,61 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeedstatuses.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type DatafeedstatusesGetCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedsDeleteCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status of a datafeed from your Merchant Center account. +// Delete: Deletes a datafeed configuration from your Merchant Center account. // // - datafeedId: The ID of the datafeed. // - merchantId: The ID of the account that manages the datafeed. This account // cannot be a multi-client account. -func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { - c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { + c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.datafeedId = datafeedId return c } -// Country sets the optional parameter "country": Deprecated. Use `feedLabel` -// instead. The country to get the datafeed status for. If this parameter is -// provided then `language` must also be provided. Note that this parameter is -// required for feeds targeting multiple countries and languages, since a feed -// may have a different status for each target. -func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { - c.urlParams_.Set("country", country) - return c -} - -// FeedLabel sets the optional parameter "feedLabel": The feed label to get the -// datafeed status for. If this parameter is provided then `language` must also -// be provided. Note that this parameter is required for feeds targeting -// multiple countries and languages, since a feed may have a different status -// for each target. -func (c *DatafeedstatusesGetCall) FeedLabel(feedLabel string) *DatafeedstatusesGetCall { - c.urlParams_.Set("feedLabel", feedLabel) - return c -} - -// Language sets the optional parameter "language": The language to get the -// datafeed status for. If this parameter is provided then `country` must also -// be provided. Note that this parameter is required for feeds targeting -// multiple countries and languages, since a feed may have a different status -// for each target. -func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { - c.urlParams_.Set("language", language) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { +func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { +func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedstatusesGetCall) Header() http.Header { +func (c *DatafeedsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } @@ -19013,141 +17732,99 @@ func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) "merchantId": strconv.FormatUint(c.merchantId, 10), "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeedstatuses.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DatafeedStatus.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 *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { +// Do executes the "content.datafeeds.delete" call. +func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DatafeedStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeedstatuses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type DatafeedstatusesListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedsFetchnowCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the statuses of the datafeeds in your Merchant Center account. +// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center account. +// If you need to call this method more than once per day, we recommend you use +// the Products service +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products) +// to update your product data. // -// - merchantId: The ID of the account that manages the datafeeds. This account +// - datafeedId: The ID of the datafeed to be fetched. +// - merchantId: The ID of the account that manages the datafeed. This account // cannot be a multi-client account. -func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { - c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { + c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// products to return in the response, used for paging. -func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) + c.datafeedId = datafeedId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { +func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { +func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedstatusesListCall) Header() http.Header { +func (c *DatafeedsFetchnowCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeedstatuses.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.fetchnow", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.list" call. +// Do executes the "content.datafeeds.fetchnow" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedstatusesListResponse.ServerResponse.Header or (if a response was +// *DatafeedsFetchNowResponse.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 *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { +func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19166,7 +17843,7 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedstatusesListResponse{ + ret := &DatafeedsFetchNowResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19177,56 +17854,36 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeedstatuses.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.fetchnow", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// 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 *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 FreelistingsprogramGetCall struct { +type DatafeedsGetCall struct { s *APIService - merchantId int64 + merchantId uint64 + datafeedId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves the status and review eligibility for the free listing -// program. Returns errors and warnings if they require action to resolve, will -// become disapprovals, or impact impressions. Use `accountstatuses` to view -// all issues for an account. +// Get: Retrieves a datafeed configuration from your Merchant Center account. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramService) Get(merchantId int64) *FreelistingsprogramGetCall { - c := &FreelistingsprogramGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { + c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.datafeedId = datafeedId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramGetCall { +func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19234,34 +17891,34 @@ func (c *FreelistingsprogramGetCall) Fields(s ...googleapi.Field) *Freelistingsp // IfNoneMatch sets an 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. -func (c *FreelistingsprogramGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramGetCall { +func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramGetCall) Context(ctx context.Context) *FreelistingsprogramGetCall { +func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramGetCall) Header() http.Header { +func (c *DatafeedsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -19269,19 +17926,19 @@ func (c *FreelistingsprogramGetCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.get" call. +// Do executes the "content.datafeeds.get" call. // Any non-2xx status code is an error. Response headers are in either -// *FreeListingsProgramStatus.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 *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeListingsProgramStatus, error) { +// *Datafeed.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 *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19300,7 +17957,7 @@ func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeList if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FreeListingsProgramStatus{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19311,243 +17968,82 @@ func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeList if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type FreelistingsprogramRequestreviewCall struct { - s *APIService - merchantId int64 - requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Requestreview: Requests a review of free listings in a specific region. This -// method deprecated. Use the `MerchantSupportService` to view product and -// account issues and request a review. -// -// - merchantId: The ID of the account. -func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { - c := &FreelistingsprogramRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.requestreviewfreelistingsrequest = requestreviewfreelistingsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FreelistingsprogramRequestreviewCall) Fields(s ...googleapi.Field) *FreelistingsprogramRequestreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramRequestreviewCall) Context(ctx context.Context) *FreelistingsprogramRequestreviewCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FreelistingsprogramRequestreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FreelistingsprogramRequestreviewCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.requestreviewfreelistingsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/requestreview") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.requestreview", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.freelistingsprogram.requestreview" call. -func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.requestreview", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type FreelistingsprogramCheckoutsettingsDeleteCall struct { +type DatafeedsInsertCall struct { s *APIService - merchantId int64 + merchantId uint64 + datafeed *Datafeed urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes `Checkout` settings and unenrolls merchant from `Checkout` -// program. -// -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Delete(merchantId int64) *FreelistingsprogramCheckoutsettingsDeleteCall { - c := &FreelistingsprogramCheckoutsettingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.freelistingsprogram.checkoutsettings.delete" call. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type FreelistingsprogramCheckoutsettingsGetCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets Checkout settings for the given merchant. This includes -// information about review state, enrollment state and URL settings. +// Insert: Registers a datafeed configuration with your Merchant Center +// account. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Get(merchantId int64) *FreelistingsprogramCheckoutsettingsGetCall { - c := &FreelistingsprogramCheckoutsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { + c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.datafeed = datafeed return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *FreelistingsprogramCheckoutsettingsGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramCheckoutsettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Header() http.Header { +func (c *DatafeedsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeed) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.get" call. +// Do executes the "content.datafeeds.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *CheckoutSettings.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 *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { +// *Datafeed.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 *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19566,7 +18062,7 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CheckoutSettings{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19577,81 +18073,103 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOp if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type FreelistingsprogramCheckoutsettingsInsertCall struct { - s *APIService - merchantId int64 - insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Enrolls merchant in `Checkout` program. +// List: Lists the configurations for datafeeds in your Merchant Center +// account. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Insert(merchantId int64, insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest) *FreelistingsprogramCheckoutsettingsInsertCall { - c := &FreelistingsprogramCheckoutsettingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeeds. This account +// cannot be a multi-client account. +func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { + c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.insertcheckoutsettingsrequest = insertcheckoutsettingsrequest + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// products to return in the response, used for paging. +func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { + 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 // details. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsInsertCall { +func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsInsertCall { +func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Header() http.Header { +func (c *DatafeedsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertcheckoutsettingsrequest) - if err != nil { - return nil, err +func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.insert" call. +// Do executes the "content.datafeeds.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CheckoutSettings.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *DatafeedsListResponse.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 *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { +func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19670,7 +18188,7 @@ func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CheckoutSettings{ + ret := &DatafeedsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19681,75 +18199,107 @@ func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.Cal if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LiasettingsCustombatchCall struct { - s *APIService - liasettingscustombatchrequest *LiasettingsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Custombatch: Retrieves and/or updates the LIA settings of multiple accounts -// in a single request. -func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { - c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.liasettingscustombatchrequest = liasettingscustombatchrequest +type DatafeedsUpdateCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + datafeed *Datafeed + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a datafeed configuration of your Merchant Center account. +// Any fields that are not provided are deleted from the resource. +// +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { + c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.datafeedId = datafeedId + c.datafeed = datafeed return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { +func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { +func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsCustombatchCall) Header() http.Header { +func (c *DatafeedsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.liasettingscustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeed) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeeds.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.custombatch" call. +// Do executes the "content.datafeeds.update" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsCustomBatchResponse.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 *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { +// *Datafeed.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 *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19768,7 +18318,7 @@ func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*Liasetti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsCustomBatchResponse{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19779,92 +18329,75 @@ func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*Liasetti if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeeds.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LiasettingsGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedstatusesCustombatchCall struct { + s *APIService + datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the LIA settings of the account. -// -// - accountId: The ID of the account for which to get or update LIA settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { - c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId +// Custombatch: Gets multiple Merchant Center datafeed statuses in a single +// request. +func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { + c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { +func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { +func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsGetCall) Header() http.Header { +func (c *DatafeedstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.datafeedstatusescustombatchrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeedstatuses.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.get" call. +// Do executes the "content.datafeedstatuses.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *LiaSettings.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 *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { +// *DatafeedstatusesCustomBatchResponse.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 *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19883,7 +18416,7 @@ func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiaSettings{ + ret := &DatafeedstatusesCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19894,39 +18427,66 @@ func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, err if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeedstatuses.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LiasettingsGetaccessiblegmbaccountsCall struct { +type DatafeedstatusesGetCall struct { s *APIService merchantId uint64 - accountId uint64 + datafeedId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Getaccessiblegmbaccounts: Retrieves the list of accessible Business -// Profiles. +// Get: Retrieves the status of a datafeed from your Merchant Center account. // -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { - c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { + c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId + c.datafeedId = datafeedId + return c +} + +// Country sets the optional parameter "country": Deprecated. Use `feedLabel` +// instead. The country to get the datafeed status for. If this parameter is +// provided then `language` must also be provided. Note that this parameter is +// required for feeds targeting multiple countries and languages, since a feed +// may have a different status for each target. +func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { + c.urlParams_.Set("country", country) + return c +} + +// FeedLabel sets the optional parameter "feedLabel": The feed label to get the +// datafeed status for. If this parameter is provided then `language` must also +// be provided. Note that this parameter is required for feeds targeting +// multiple countries and languages, since a feed may have a different status +// for each target. +func (c *DatafeedstatusesGetCall) FeedLabel(feedLabel string) *DatafeedstatusesGetCall { + c.urlParams_.Set("feedLabel", feedLabel) + return c +} + +// Language sets the optional parameter "language": The language to get the +// datafeed status for. If this parameter is provided then `country` must also +// be provided. Note that this parameter is required for feeds targeting +// multiple countries and languages, since a feed may have a different status +// for each target. +func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { + c.urlParams_.Set("language", language) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { +func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19934,34 +18494,34 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) * // IfNoneMatch sets an 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. -func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { +func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { +func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { +func (c *DatafeedstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -19970,19 +18530,18 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.R req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.getaccessiblegmbaccounts", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeedstatuses.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. +// Do executes the "content.datafeedstatuses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsGetAccessibleGmbAccountsResponse.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 *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { +// *DatafeedStatus.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 *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20001,7 +18560,7 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsGetAccessibleGmbAccountsResponse{ + ret := &DatafeedStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20012,11 +18571,11 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOptio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.getaccessiblegmbaccounts", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeedstatuses.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LiasettingsListCall struct { +type DatafeedstatusesListCall struct { s *APIService merchantId uint64 urlParams_ gensupport.URLParams @@ -20025,27 +18584,26 @@ type LiasettingsListCall struct { header_ http.Header } -// List: Lists the LIA settings of the sub-accounts in your Merchant Center -// account. +// List: Lists the statuses of the datafeeds in your Merchant Center account. // -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { - c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeeds. This account +// cannot be a multi-client account. +func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { + c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } // MaxResults sets the optional parameter "maxResults": The maximum number of -// LIA settings to return in the response, used for paging. -func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { +// products to return in the response, used for paging. +func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } // PageToken sets the optional parameter "pageToken": The token returned by the // previous request. -func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { +func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20053,7 +18611,7 @@ func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { +func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20061,34 +18619,34 @@ func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall // IfNoneMatch sets an 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. -func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { +func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { +func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsListCall) Header() http.Header { +func (c *DatafeedstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -20098,17 +18656,17 @@ func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.datafeedstatuses.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.list" call. +// Do executes the "content.datafeedstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsListResponse.ServerResponse.Header or (if a response was +// *DatafeedstatusesListResponse.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 *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { +func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20127,7 +18685,7 @@ func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsList if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsListResponse{ + ret := &DatafeedstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20138,14 +18696,14 @@ func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsList if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.datafeedstatuses.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { +func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20163,25 +18721,31 @@ func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsList } } -type LiasettingsListposdataprovidersCall struct { +type FreelistingsprogramGetCall struct { s *APIService + merchantId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Listposdataproviders: Retrieves the list of POS data providers that have -// active settings for the all eiligible countries. -func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { - c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Get: Retrieves the status and review eligibility for the free listing +// program. Returns errors and warnings if they require action to resolve, will +// become disapprovals, or impact impressions. Use `accountstatuses` to view +// all issues for an account. +// +// - merchantId: The ID of the account. +func (r *FreelistingsprogramService) Get(merchantId int64) *FreelistingsprogramGetCall { + c := &FreelistingsprogramGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { +func (c *FreelistingsprogramGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20189,51 +18753,54 @@ func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *Lias // IfNoneMatch sets an 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. -func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { +func (c *FreelistingsprogramGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { +func (c *FreelistingsprogramGetCall) Context(ctx context.Context) *FreelistingsprogramGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsListposdataprovidersCall) Header() http.Header { +func (c *FreelistingsprogramGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { +func (c *FreelistingsprogramGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.listposdataproviders", "request", internallog.HTTPRequest(req, nil)) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.listposdataproviders" call. +// Do executes the "content.freelistingsprogram.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *FreeListingsProgramStatus.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 *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { +func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeListingsProgramStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20252,7 +18819,7 @@ func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsListPosDataProvidersResponse{ + ret := &FreeListingsProgramStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20263,308 +18830,243 @@ func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.listposdataproviders", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LiasettingsRequestgmbaccessCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramRequestreviewCall struct { + s *APIService + merchantId int64 + requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Requestgmbaccess: Requests access to a specified Business Profile. +// Requestreview: Requests a review of free listings in a specific region. This +// method deprecated. Use the `MerchantSupportService` to view product and +// account issues and request a review. // -// - accountId: The ID of the account for which Business Profile access is -// requested. -// - gmbEmail: The email of the Business Profile. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { - c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { + c := &FreelistingsprogramRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("gmbEmail", gmbEmail) + c.requestreviewfreelistingsrequest = requestreviewfreelistingsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { +func (c *FreelistingsprogramRequestreviewCall) Fields(s ...googleapi.Field) *FreelistingsprogramRequestreviewCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { +func (c *FreelistingsprogramRequestreviewCall) Context(ctx context.Context) *FreelistingsprogramRequestreviewCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { +func (c *FreelistingsprogramRequestreviewCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *FreelistingsprogramRequestreviewCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.requestreviewfreelistingsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/requestreview") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.requestgmbaccess", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.requestreview", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.requestgmbaccess" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiasettingsRequestGmbAccessResponse.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 *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { +// Do executes the "content.freelistingsprogram.requestreview" call. +func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LiasettingsRequestGmbAccessResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.requestgmbaccess", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.requestreview", "response", internallog.HTTPResponse(res, nil)) + return nil } -type LiasettingsRequestinventoryverificationCall struct { +type FreelistingsprogramCheckoutsettingsDeleteCall struct { s *APIService - merchantId uint64 - accountId uint64 - country string + merchantId int64 urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Requestinventoryverification: Requests inventory validation for the -// specified country. +// Delete: Deletes `Checkout` settings and unenrolls merchant from `Checkout` +// program. // -// - accountId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - country: The country for which inventory validation is requested. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { - c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Delete(merchantId int64) *FreelistingsprogramCheckoutsettingsDeleteCall { + c := &FreelistingsprogramCheckoutsettingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.country = country return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - "country": c.country, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.requestinventoryverification", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.requestinventoryverification" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiasettingsRequestInventoryVerificationResponse.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 *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { +// Do executes the "content.freelistingsprogram.checkoutsettings.delete" call. +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LiasettingsRequestInventoryVerificationResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.requestinventoryverification", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type LiasettingsSetinventoryverificationcontactCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramCheckoutsettingsGetCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Setinventoryverificationcontact: Sets the inventory verification contact for -// the specified country. +// Get: Gets Checkout settings for the given merchant. This includes +// information about review state, enrollment state and URL settings. // -// - accountId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - contactEmail: The email of the inventory verification contact. -// - contactName: The name of the inventory verification contact. -// - country: The country for which inventory verification is requested. -// - language: The language for which inventory verification is requested. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { - c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Get(merchantId int64) *FreelistingsprogramCheckoutsettingsGetCall { + c := &FreelistingsprogramCheckoutsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("country", country) - c.urlParams_.Set("language", language) - c.urlParams_.Set("contactName", contactName) - c.urlParams_.Set("contactEmail", contactEmail) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *FreelistingsprogramCheckoutsettingsGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramCheckoutsettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { +func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.setinventoryverificationcontact", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setinventoryverificationcontact" call. +// Do executes the "content.freelistingsprogram.checkoutsettings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsSetInventoryVerificationContactResponse.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 *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { +// *CheckoutSettings.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 *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20583,122 +19085,92 @@ func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsSetInventoryVerificationContactResponse{ + ret := &CheckoutSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.setinventoryverificationcontact", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LiasettingsSetomnichannelexperienceCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Setomnichannelexperience: Sets the omnichannel experience for the specified -// country. Only supported for merchants whose POS data provider is trusted to -// enable the corresponding experience. For more context, see these help -// articles about LFP (https://support.google.com/merchants/answer/7676652) and -// how to get started (https://support.google.com/merchants/answer/7676578) -// with it. -// -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setomnichannelexperience(merchantId uint64, accountId uint64) *LiasettingsSetomnichannelexperienceCall { - c := &LiasettingsSetomnichannelexperienceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Country sets the optional parameter "country": The CLDR country code (for -// example, "US") for which the omnichannel experience is selected. -func (c *LiasettingsSetomnichannelexperienceCall) Country(country string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.Set("country", country) - return c + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -// LsfType sets the optional parameter "lsfType": The Local Store Front (LSF) -// type for this country. Acceptable values are: - "ghlsf" (Google-Hosted -// Local Store Front) - "mhlsfBasic" (Merchant-Hosted Local Store Front -// Basic) - "mhlsfFull" (Merchant-Hosted Local Store Front Full) More details -// about these types can be found here. -func (c *LiasettingsSetomnichannelexperienceCall) LsfType(lsfType string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.Set("lsfType", lsfType) - return c +type FreelistingsprogramCheckoutsettingsInsertCall struct { + s *APIService + merchantId int64 + insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PickupTypes sets the optional parameter "pickupTypes": The Pickup types for -// this country. Acceptable values are: - "pickupToday" - "pickupLater" -func (c *LiasettingsSetomnichannelexperienceCall) PickupTypes(pickupTypes ...string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.SetMulti("pickupTypes", append([]string{}, pickupTypes...)) +// Insert: Enrolls merchant in `Checkout` program. +// +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Insert(merchantId int64, insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest) *FreelistingsprogramCheckoutsettingsInsertCall { + c := &FreelistingsprogramCheckoutsettingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.insertcheckoutsettingsrequest = insertcheckoutsettingsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsSetomnichannelexperienceCall) Fields(s ...googleapi.Field) *LiasettingsSetomnichannelexperienceCall { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetomnichannelexperienceCall) Context(ctx context.Context) *LiasettingsSetomnichannelexperienceCall { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsSetomnichannelexperienceCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetomnichannelexperienceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *FreelistingsprogramCheckoutsettingsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insertcheckoutsettingsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setomnichannelexperience") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.setomnichannelexperience", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setomnichannelexperience" call. +// Do executes the "content.freelistingsprogram.checkoutsettings.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *LiaOmnichannelExperience.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 *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOption) (*LiaOmnichannelExperience, error) { +// *CheckoutSettings.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 *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20717,7 +19189,7 @@ func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiaOmnichannelExperience{ + ret := &CheckoutSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20728,98 +19200,75 @@ func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOptio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.setomnichannelexperience", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.freelistingsprogram.checkoutsettings.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LiasettingsSetposdataproviderCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Setposdataprovider: Sets the POS data provider for the specified country. -// -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. -// - country: The country for which the POS data provider is selected. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { - c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("country", country) - return c -} - -// PosDataProviderId sets the optional parameter "posDataProviderId": The ID of -// POS data provider. -func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { - c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) - return c +type LiasettingsCustombatchCall struct { + s *APIService + liasettingscustombatchrequest *LiasettingsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PosExternalAccountId sets the optional parameter "posExternalAccountId": The -// account ID by which this merchant is known to the POS data provider. -func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { - c.urlParams_.Set("posExternalAccountId", posExternalAccountId) +// Custombatch: Retrieves and/or updates the LIA settings of multiple accounts +// in a single request. +func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { + c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.liasettingscustombatchrequest = liasettingscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { +func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { +func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsSetposdataproviderCall) Header() http.Header { +func (c *LiasettingsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.liasettingscustombatchrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") + urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.setposdataprovider", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setposdataprovider" call. +// Do executes the "content.liasettings.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsCustomBatchResponse.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 *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { +func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20838,7 +19287,7 @@ func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*L if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsSetPosDataProviderResponse{ + ret := &LiasettingsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20849,69 +19298,74 @@ func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*L if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.setposdataprovider", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LiasettingsUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - liasettings *LiaSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the LIA settings of the account. Any fields that are not -// provided are deleted from the resource. +// Get: Retrieves the LIA settings of the account. // // - accountId: The ID of the account for which to get or update LIA settings. // - merchantId: The ID of the managing account. If this parameter is not the // same as accountId, then this account must be a multi-client account and // `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { - c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { + c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId - c.liasettings = liasettings return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { +func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { +func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsUpdateCall) Header() http.Header { +func (c *LiasettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.liasettings) - if err != nil { - return nil, err +func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -20920,16 +19374,16 @@ func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { "merchantId": strconv.FormatUint(c.merchantId, 10), "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.update" call. +// Do executes the "content.liasettings.get" call. // Any non-2xx status code is an error. Response headers are in either // *LiaSettings.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 *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { +func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20959,75 +19413,95 @@ func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LocalinventoryCustombatchCall struct { - s *APIService - localinventorycustombatchrequest *LocalinventoryCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsGetaccessiblegmbaccountsCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Updates local inventory for multiple products or stores in a -// single request. -func (r *LocalinventoryService) Custombatch(localinventorycustombatchrequest *LocalinventoryCustomBatchRequest) *LocalinventoryCustombatchCall { - c := &LocalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.localinventorycustombatchrequest = localinventorycustombatchrequest +// Getaccessiblegmbaccounts: Retrieves the list of accessible Business +// Profiles. +// +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { + c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocalinventoryCustombatchCall) Fields(s ...googleapi.Field) *LocalinventoryCustombatchCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocalinventoryCustombatchCall) Context(ctx context.Context) *LocalinventoryCustombatchCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocalinventoryCustombatchCall) Header() http.Header { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.localinventorycustombatchrequest) - if err != nil { - return nil, err +func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "localinventory/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.localinventory.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.getaccessiblegmbaccounts", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.localinventory.custombatch" call. +// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. // Any non-2xx status code is an error. Response headers are in either -// *LocalinventoryCustomBatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsGetAccessibleGmbAccountsResponse.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 *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*LocalinventoryCustomBatchResponse, error) { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21046,7 +19520,7 @@ func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Local if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LocalinventoryCustomBatchResponse{ + ret := &LiasettingsGetAccessibleGmbAccountsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21057,86 +19531,103 @@ func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Local if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.localinventory.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.getaccessiblegmbaccounts", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type LocalinventoryInsertCall struct { - s *APIService - merchantId uint64 - productId string - localinventory *LocalInventory - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Updates the local inventory of a product in your Merchant Center +// List: Lists the LIA settings of the sub-accounts in your Merchant Center // account. // -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -// - productId: The REST ID of the product for which to update local inventory. -func (r *LocalinventoryService) Insert(merchantId uint64, productId string, localinventory *LocalInventory) *LocalinventoryInsertCall { - c := &LocalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { + c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - c.localinventory = localinventory + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// LIA settings to return in the response, used for paging. +func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { + 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 // details. -func (c *LocalinventoryInsertCall) Fields(s ...googleapi.Field) *LocalinventoryInsertCall { +func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocalinventoryInsertCall) Context(ctx context.Context) *LocalinventoryInsertCall { +func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocalinventoryInsertCall) Header() http.Header { +func (c *LiasettingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.localinventory) - if err != nil { - return nil, err +func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/localinventory") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.localinventory.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.localinventory.insert" call. +// Do executes the "content.liasettings.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LocalInventory.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 *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInventory, error) { +// *LiasettingsListResponse.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 *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21155,7 +19646,7 @@ func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInven if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LocalInventory{ + ret := &LiasettingsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21166,100 +19657,102 @@ func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInven if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.localinventory.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type MerchantsupportRenderaccountissuesCall struct { - s *APIService - merchantId int64 - renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Renderaccountissues: Provide a list of merchant's issues with a support -// content and available actions. This content and actions are meant to be -// rendered and shown in third-party applications. -// -// - merchantId: The ID of the account to fetch issues for. -func (r *MerchantsupportService) Renderaccountissues(merchantId int64, renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload) *MerchantsupportRenderaccountissuesCall { - c := &MerchantsupportRenderaccountissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.renderaccountissuesrequestpayload = renderaccountissuesrequestpayload - 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 *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 -// (https://tools.ietf.org/html/bcp47) language code used to localize support -// content. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportRenderaccountissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderaccountissuesCall { - c.urlParams_.Set("languageCode", languageCode) - return c +type LiasettingsListposdataprovidersCall struct { + s *APIService + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TimeZone sets the optional parameter "timeZone": The IANA -// (https://www.iana.org/time-zones) timezone used to localize times in support -// content. For example 'America/Los_Angeles'. If not set, results will use as -// a default UTC. -func (c *MerchantsupportRenderaccountissuesCall) TimeZone(timeZone string) *MerchantsupportRenderaccountissuesCall { - c.urlParams_.Set("timeZone", timeZone) +// Listposdataproviders: Retrieves the list of POS data providers that have +// active settings for the all eiligible countries. +func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { + c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MerchantsupportRenderaccountissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderaccountissuesCall { +func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportRenderaccountissuesCall) Context(ctx context.Context) *MerchantsupportRenderaccountissuesCall { +func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MerchantsupportRenderaccountissuesCall) Header() http.Header { +func (c *LiasettingsListposdataprovidersCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportRenderaccountissuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.renderaccountissuesrequestpayload) - if err != nil { - return nil, err +func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderaccountissues") + urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.merchantsupport.renderaccountissues", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.listposdataproviders", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.renderaccountissues" call. +// Do executes the "content.liasettings.listposdataproviders" call. // Any non-2xx status code is an error. Response headers are in either -// *RenderAccountIssuesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsListPosDataProvidersResponse.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 *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption) (*RenderAccountIssuesResponse, error) { +func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21278,7 +19771,7 @@ func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RenderAccountIssuesResponse{ + ret := &LiasettingsListPosDataProvidersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21289,106 +19782,84 @@ func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.merchantsupport.renderaccountissues", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.listposdataproviders", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type MerchantsupportRenderproductissuesCall struct { - s *APIService - merchantId int64 - productId string - renderproductissuesrequestpayload *RenderProductIssuesRequestPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Renderproductissues: Provide a list of issues for merchant's product with a -// support content and available actions. This content and actions are meant to -// be rendered and shown in third-party applications. -// -// - merchantId: The ID of the account that contains the product. -// - productId: The REST_ID -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) -// of the product to fetch issues for. -func (r *MerchantsupportService) Renderproductissues(merchantId int64, productId string, renderproductissuesrequestpayload *RenderProductIssuesRequestPayload) *MerchantsupportRenderproductissuesCall { - c := &MerchantsupportRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.productId = productId - c.renderproductissuesrequestpayload = renderproductissuesrequestpayload - return c -} - -// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 -// (https://tools.ietf.org/html/bcp47) language code used to localize support -// content. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportRenderproductissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderproductissuesCall { - c.urlParams_.Set("languageCode", languageCode) - return c +type LiasettingsRequestgmbaccessCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TimeZone sets the optional parameter "timeZone": The IANA -// (https://www.iana.org/time-zones) timezone used to localize times in support -// content. For example 'America/Los_Angeles'. If not set, results will use as -// a default UTC. -func (c *MerchantsupportRenderproductissuesCall) TimeZone(timeZone string) *MerchantsupportRenderproductissuesCall { - c.urlParams_.Set("timeZone", timeZone) +// Requestgmbaccess: Requests access to a specified Business Profile. +// +// - accountId: The ID of the account for which Business Profile access is +// requested. +// - gmbEmail: The email of the Business Profile. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { + c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.urlParams_.Set("gmbEmail", gmbEmail) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MerchantsupportRenderproductissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderproductissuesCall { +func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportRenderproductissuesCall) Context(ctx context.Context) *MerchantsupportRenderproductissuesCall { +func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MerchantsupportRenderproductissuesCall) Header() http.Header { +func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.renderproductissuesrequestpayload) - if err != nil { - return nil, err - } +func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderproductissues/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.merchantsupport.renderproductissues", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.requestgmbaccess", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.renderproductissues" call. +// Do executes the "content.liasettings.requestgmbaccess" call. // Any non-2xx status code is an error. Response headers are in either -// *RenderProductIssuesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsRequestGmbAccessResponse.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 *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption) (*RenderProductIssuesResponse, error) { +func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21407,7 +19878,7 @@ func (c *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RenderProductIssuesResponse{ + ret := &LiasettingsRequestGmbAccessResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21418,96 +19889,87 @@ func (c *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.merchantsupport.renderproductissues", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.requestgmbaccess", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type MerchantsupportTriggeractionCall struct { - s *APIService - merchantId int64 - triggeractionpayload *TriggerActionPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsRequestinventoryverificationCall struct { + s *APIService + merchantId uint64 + accountId uint64 + country string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Triggeraction: Start an action. The action can be requested by merchants in -// third-party application. Before merchants can request the action, the -// third-party application needs to show them action specific content and -// display a user input form. The action can be successfully started only once -// all `required` inputs are provided. If any `required` input is missing, or -// invalid value was provided, the service will return 400 error. Validation -// errors will contain Ids for all problematic field together with translated, -// human readable error messages that can be shown to the user. +// Requestinventoryverification: Requests inventory validation for the +// specified country. // -// - merchantId: The ID of the merchant's account. -func (r *MerchantsupportService) Triggeraction(merchantId int64, triggeractionpayload *TriggerActionPayload) *MerchantsupportTriggeractionCall { - c := &MerchantsupportTriggeractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account that manages the order. This cannot be a +// multi-client account. +// - country: The country for which inventory validation is requested. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { + c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.triggeractionpayload = triggeractionpayload - return c -} - -// LanguageCode sets the optional parameter "languageCode": Language code IETF -// BCP 47 syntax (https://tools.ietf.org/html/bcp47) used to localize the -// response. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportTriggeractionCall) LanguageCode(languageCode string) *MerchantsupportTriggeractionCall { - c.urlParams_.Set("languageCode", languageCode) + c.accountId = accountId + c.country = country return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MerchantsupportTriggeractionCall) Fields(s ...googleapi.Field) *MerchantsupportTriggeractionCall { +func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportTriggeractionCall) Context(ctx context.Context) *MerchantsupportTriggeractionCall { +func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MerchantsupportTriggeractionCall) Header() http.Header { +func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportTriggeractionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.triggeractionpayload) - if err != nil { - return nil, err - } +func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/triggeraction") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + "country": c.country, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.merchantsupport.triggeraction", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.requestinventoryverification", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.triggeraction" call. +// Do executes the "content.liasettings.requestinventoryverification" call. // Any non-2xx status code is an error. Response headers are in either -// *TriggerActionResponse.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 *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*TriggerActionResponse, error) { +// *LiasettingsRequestInventoryVerificationResponse.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 *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21526,7 +19988,7 @@ func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*Tr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TriggerActionResponse{ + ret := &LiasettingsRequestInventoryVerificationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21537,81 +19999,91 @@ func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*Tr if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.merchantsupport.triggeraction", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.requestinventoryverification", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type OrdertrackingsignalsCreateCall struct { - s *APIService - merchantId int64 - ordertrackingsignal *OrderTrackingSignal - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetinventoryverificationcontactCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates new order tracking signal. +// Setinventoryverificationcontact: Sets the inventory verification contact for +// the specified country. // -// - merchantId: The ID of the merchant for which the order signal is created. -func (r *OrdertrackingsignalsService) Create(merchantId int64, ordertrackingsignal *OrderTrackingSignal) *OrdertrackingsignalsCreateCall { - c := &OrdertrackingsignalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account that manages the order. This cannot be a +// multi-client account. +// - contactEmail: The email of the inventory verification contact. +// - contactName: The name of the inventory verification contact. +// - country: The country for which inventory verification is requested. +// - language: The language for which inventory verification is requested. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { + c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.ordertrackingsignal = ordertrackingsignal + c.accountId = accountId + c.urlParams_.Set("country", country) + c.urlParams_.Set("language", language) + c.urlParams_.Set("contactName", contactName) + c.urlParams_.Set("contactEmail", contactEmail) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdertrackingsignalsCreateCall) Fields(s ...googleapi.Field) *OrdertrackingsignalsCreateCall { +func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdertrackingsignalsCreateCall) Context(ctx context.Context) *OrdertrackingsignalsCreateCall { +func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdertrackingsignalsCreateCall) Header() http.Header { +func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdertrackingsignalsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.ordertrackingsignal) - if err != nil { - return nil, err - } +func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordertrackingsignals") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.ordertrackingsignals.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.setinventoryverificationcontact", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.ordertrackingsignals.create" call. +// Do executes the "content.liasettings.setinventoryverificationcontact" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderTrackingSignal.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 *OrdertrackingsignalsCreateCall) Do(opts ...googleapi.CallOption) (*OrderTrackingSignal, error) { +// *LiasettingsSetInventoryVerificationContactResponse.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 *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21630,7 +20102,7 @@ func (c *OrdertrackingsignalsCreateCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderTrackingSignal{ + ret := &LiasettingsSetInventoryVerificationContactResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21641,74 +20113,111 @@ func (c *OrdertrackingsignalsCreateCall) Do(opts ...googleapi.CallOption) (*Orde if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.ordertrackingsignals.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.setinventoryverificationcontact", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type PosCustombatchCall struct { - s *APIService - poscustombatchrequest *PosCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetomnichannelexperienceCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Setomnichannelexperience: Sets the omnichannel experience for the specified +// country. Only supported for merchants whose POS data provider is trusted to +// enable the corresponding experience. For more context, see these help +// articles about LFP (https://support.google.com/merchants/answer/7676652) and +// how to get started (https://support.google.com/merchants/answer/7676578) +// with it. +// +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setomnichannelexperience(merchantId uint64, accountId uint64) *LiasettingsSetomnichannelexperienceCall { + c := &LiasettingsSetomnichannelexperienceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + return c +} + +// Country sets the optional parameter "country": The CLDR country code (for +// example, "US") for which the omnichannel experience is selected. +func (c *LiasettingsSetomnichannelexperienceCall) Country(country string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.Set("country", country) + return c +} + +// LsfType sets the optional parameter "lsfType": The Local Store Front (LSF) +// type for this country. Acceptable values are: - "ghlsf" (Google-Hosted +// Local Store Front) - "mhlsfBasic" (Merchant-Hosted Local Store Front +// Basic) - "mhlsfFull" (Merchant-Hosted Local Store Front Full) More details +// about these types can be found here. +func (c *LiasettingsSetomnichannelexperienceCall) LsfType(lsfType string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.Set("lsfType", lsfType) + return c } -// Custombatch: Batches multiple POS-related calls in a single request. -func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall { - c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.poscustombatchrequest = poscustombatchrequest +// PickupTypes sets the optional parameter "pickupTypes": The Pickup types for +// this country. Acceptable values are: - "pickupToday" - "pickupLater" +func (c *LiasettingsSetomnichannelexperienceCall) PickupTypes(pickupTypes ...string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.SetMulti("pickupTypes", append([]string{}, pickupTypes...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall { +func (c *LiasettingsSetomnichannelexperienceCall) Fields(s ...googleapi.Field) *LiasettingsSetomnichannelexperienceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall { +func (c *LiasettingsSetomnichannelexperienceCall) Context(ctx context.Context) *LiasettingsSetomnichannelexperienceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PosCustombatchCall) Header() http.Header { +func (c *LiasettingsSetomnichannelexperienceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.poscustombatchrequest) - if err != nil { - return nil, err - } +func (c *LiasettingsSetomnichannelexperienceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setomnichannelexperience") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.setomnichannelexperience", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pos.custombatch" call. +// Do executes the "content.liasettings.setomnichannelexperience" call. // Any non-2xx status code is an error. Response headers are in either -// *PosCustomBatchResponse.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 *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) { +// *LiaOmnichannelExperience.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 *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOption) (*LiaOmnichannelExperience, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21727,7 +20236,7 @@ func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchRe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PosCustomBatchResponse{ + ret := &LiaOmnichannelExperience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21738,175 +20247,208 @@ func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchRe if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.setomnichannelexperience", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type PosDeleteCall struct { - s *APIService - merchantId uint64 - targetMerchantId uint64 - storeCode string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetposdataproviderCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a store for the given merchant. +// Setposdataprovider: Sets the POS data provider for the specified country. // -// - merchantId: The ID of the POS or inventory data provider. -// - storeCode: A store code that is unique per merchant. -// - targetMerchantId: The ID of the target merchant. -func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall { - c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - country: The country for which the POS data provider is selected. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { + c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.targetMerchantId = targetMerchantId - c.storeCode = storeCode + c.accountId = accountId + c.urlParams_.Set("country", country) + return c +} + +// PosDataProviderId sets the optional parameter "posDataProviderId": The ID of +// POS data provider. +func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { + c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) + return c +} + +// PosExternalAccountId sets the optional parameter "posExternalAccountId": The +// account ID by which this merchant is known to the POS data provider. +func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { + c.urlParams_.Set("posExternalAccountId", posExternalAccountId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall { +func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall { +func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PosDeleteCall) Header() http.Header { +func (c *LiasettingsSetposdataproviderCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), - "storeCode": c.storeCode, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.setposdataprovider", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pos.delete" call. -func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.liasettings.setposdataprovider" call. +// Any non-2xx status code is an error. Response headers are in either +// *LiasettingsSetPosDataProviderResponse.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 *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.delete", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &LiasettingsSetPosDataProviderResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.setposdataprovider", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type PosGetCall struct { - s *APIService - merchantId uint64 - targetMerchantId uint64 - storeCode string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LiasettingsUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + liasettings *LiaSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves information about the given store. +// Update: Updates the LIA settings of the account. Any fields that are not +// provided are deleted from the resource. // -// - merchantId: The ID of the POS or inventory data provider. -// - storeCode: A store code that is unique per merchant. -// - targetMerchantId: The ID of the target merchant. -func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall { - c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to get or update LIA settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { + c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.targetMerchantId = targetMerchantId - c.storeCode = storeCode + c.accountId = accountId + c.liasettings = liasettings return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall { +func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *PosGetCall) Context(ctx context.Context) *PosGetCall { +func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PosGetCall) Header() http.Header { +func (c *LiasettingsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PosGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.liasettings) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), - "storeCode": c.storeCode, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.liasettings.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pos.get" call. +// Do executes the "content.liasettings.update" call. // Any non-2xx status code is an error. Response headers are in either -// *PosStore.ServerResponse.Header or (if a response was returned at all) in +// *LiaSettings.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 *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { +func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21925,7 +20467,7 @@ func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PosStore{ + ret := &LiaSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21936,84 +20478,75 @@ func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.liasettings.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type PosInsertCall struct { - s *APIService - merchantId uint64 - targetMerchantId uint64 - posstore *PosStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocalinventoryCustombatchCall struct { + s *APIService + localinventorycustombatchrequest *LocalinventoryCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a store for the given merchant. -// -// - merchantId: The ID of the POS or inventory data provider. -// - targetMerchantId: The ID of the target merchant. -func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall { - c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.targetMerchantId = targetMerchantId - c.posstore = posstore +// Custombatch: Updates local inventory for multiple products or stores in a +// single request. +func (r *LocalinventoryService) Custombatch(localinventorycustombatchrequest *LocalinventoryCustomBatchRequest) *LocalinventoryCustombatchCall { + c := &LocalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.localinventorycustombatchrequest = localinventorycustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall { +func (c *LocalinventoryCustombatchCall) Fields(s ...googleapi.Field) *LocalinventoryCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall { +func (c *LocalinventoryCustombatchCall) Context(ctx context.Context) *LocalinventoryCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PosInsertCall) Header() http.Header { +func (c *LocalinventoryCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *LocalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.posstore) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.localinventorycustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") + urls := googleapi.ResolveRelative(c.s.BasePath, "localinventory/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.localinventory.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pos.insert" call. +// Do executes the "content.localinventory.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *PosStore.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 *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { +// *LocalinventoryCustomBatchResponse.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 *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*LocalinventoryCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22032,7 +20565,7 @@ func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PosStore{ + ret := &LocalinventoryCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22043,64 +20576,66 @@ func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.localinventory.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type PosInventoryCall struct { - s *APIService - merchantId uint64 - targetMerchantId uint64 - posinventoryrequest *PosInventoryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocalinventoryInsertCall struct { + s *APIService + merchantId uint64 + productId string + localinventory *LocalInventory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Inventory: Submit inventory for the given merchant. +// Insert: Updates the local inventory of a product in your Merchant Center +// account. // -// - merchantId: The ID of the POS or inventory data provider. -// - targetMerchantId: The ID of the target merchant. -func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall { - c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +// - productId: The REST ID of the product for which to update local inventory. +func (r *LocalinventoryService) Insert(merchantId uint64, productId string, localinventory *LocalInventory) *LocalinventoryInsertCall { + c := &LocalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.targetMerchantId = targetMerchantId - c.posinventoryrequest = posinventoryrequest + c.productId = productId + c.localinventory = localinventory return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall { +func (c *LocalinventoryInsertCall) Fields(s ...googleapi.Field) *LocalinventoryInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall { +func (c *LocalinventoryInsertCall) Context(ctx context.Context) *LocalinventoryInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PosInventoryCall) Header() http.Header { +func (c *LocalinventoryInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) { +func (c *LocalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.posinventoryrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.localinventory) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/localinventory") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22108,20 +20643,19 @@ func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.inventory", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.localinventory.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pos.inventory" call. +// Do executes the "content.localinventory.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *PosInventoryResponse.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 *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) { +// *LocalInventory.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 *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInventory, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22140,7 +20674,7 @@ func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryRespon if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PosInventoryResponse{ + ret := &LocalInventory{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22151,91 +20685,100 @@ func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryRespon if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.inventory", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.localinventory.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type PosListCall struct { - s *APIService - merchantId uint64 - targetMerchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type MerchantsupportRenderaccountissuesCall struct { + s *APIService + merchantId int64 + renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the stores of the target merchant. +// Renderaccountissues: Provide a list of merchant's issues with a support +// content and available actions. This content and actions are meant to be +// rendered and shown in third-party applications. // -// - merchantId: The ID of the POS or inventory data provider. -// - targetMerchantId: The ID of the target merchant. -func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall { - c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account to fetch issues for. +func (r *MerchantsupportService) Renderaccountissues(merchantId int64, renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload) *MerchantsupportRenderaccountissuesCall { + c := &MerchantsupportRenderaccountissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.targetMerchantId = targetMerchantId + c.renderaccountissuesrequestpayload = renderaccountissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 +// (https://tools.ietf.org/html/bcp47) language code used to localize support +// content. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportRenderaccountissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in support +// content. For example 'America/Los_Angeles'. If not set, results will use as +// a default UTC. +func (c *MerchantsupportRenderaccountissuesCall) TimeZone(timeZone string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("timeZone", timeZone) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall { +func (c *MerchantsupportRenderaccountissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderaccountissuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *PosListCall) Context(ctx context.Context) *PosListCall { +func (c *MerchantsupportRenderaccountissuesCall) Context(ctx context.Context) *MerchantsupportRenderaccountissuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PosListCall) Header() http.Header { +func (c *MerchantsupportRenderaccountissuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PosListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *MerchantsupportRenderaccountissuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.renderaccountissuesrequestpayload) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderaccountissues") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.merchantsupport.renderaccountissues", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pos.list" call. +// Do executes the "content.merchantsupport.renderaccountissues" call. // Any non-2xx status code is an error. Response headers are in either -// *PosListResponse.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 *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) { +// *RenderAccountIssuesResponse.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 *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption) (*RenderAccountIssuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22254,7 +20797,7 @@ func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PosListResponse{ + ret := &RenderAccountIssuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22265,64 +20808,85 @@ func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.merchantsupport.renderaccountissues", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type PosSaleCall struct { - s *APIService - merchantId uint64 - targetMerchantId uint64 - possalerequest *PosSaleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportRenderproductissuesCall struct { + s *APIService + merchantId int64 + productId string + renderproductissuesrequestpayload *RenderProductIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Sale: Submit a sale event for the given merchant. +// Renderproductissues: Provide a list of issues for merchant's product with a +// support content and available actions. This content and actions are meant to +// be rendered and shown in third-party applications. // -// - merchantId: The ID of the POS or inventory data provider. -// - targetMerchantId: The ID of the target merchant. -func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall { - c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. +// - productId: The REST_ID +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) +// of the product to fetch issues for. +func (r *MerchantsupportService) Renderproductissues(merchantId int64, productId string, renderproductissuesrequestpayload *RenderProductIssuesRequestPayload) *MerchantsupportRenderproductissuesCall { + c := &MerchantsupportRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.targetMerchantId = targetMerchantId - c.possalerequest = possalerequest + c.productId = productId + c.renderproductissuesrequestpayload = renderproductissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 +// (https://tools.ietf.org/html/bcp47) language code used to localize support +// content. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportRenderproductissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in support +// content. For example 'America/Los_Angeles'. If not set, results will use as +// a default UTC. +func (c *MerchantsupportRenderproductissuesCall) TimeZone(timeZone string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("timeZone", timeZone) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall { +func (c *MerchantsupportRenderproductissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderproductissuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall { +func (c *MerchantsupportRenderproductissuesCall) Context(ctx context.Context) *MerchantsupportRenderproductissuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PosSaleCall) Header() http.Header { +func (c *MerchantsupportRenderproductissuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.possalerequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.renderproductissuesrequestpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderproductissues/{productId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22330,20 +20894,20 @@ func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.sale", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.merchantsupport.renderproductissues", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pos.sale" call. +// Do executes the "content.merchantsupport.renderproductissues" call. // Any non-2xx status code is an error. Response headers are in either -// *PosSaleResponse.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 *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) { +// *RenderProductIssuesResponse.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 *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption) (*RenderProductIssuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22362,7 +20926,7 @@ func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PosSaleResponse{ + ret := &RenderProductIssuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22373,62 +20937,76 @@ func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.sale", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.merchantsupport.renderproductissues", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductdeliverytimeCreateCall struct { - s *APIService - merchantId int64 - productdeliverytime *ProductDeliveryTime - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportTriggeractionCall struct { + s *APIService + merchantId int64 + triggeractionpayload *TriggerActionPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates or updates the delivery time of a product. +// Triggeraction: Start an action. The action can be requested by merchants in +// third-party application. Before merchants can request the action, the +// third-party application needs to show them action specific content and +// display a user input form. The action can be successfully started only once +// all `required` inputs are provided. If any `required` input is missing, or +// invalid value was provided, the service will return 400 error. Validation +// errors will contain Ids for all problematic field together with translated, +// human readable error messages that can be shown to the user. // -// - merchantId: The Google merchant ID of the account that contains the -// product. This account cannot be a multi-client account. -func (r *ProductdeliverytimeService) Create(merchantId int64, productdeliverytime *ProductDeliveryTime) *ProductdeliverytimeCreateCall { - c := &ProductdeliverytimeCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the merchant's account. +func (r *MerchantsupportService) Triggeraction(merchantId int64, triggeractionpayload *TriggerActionPayload) *MerchantsupportTriggeractionCall { + c := &MerchantsupportTriggeractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productdeliverytime = productdeliverytime + c.triggeractionpayload = triggeractionpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": Language code IETF +// BCP 47 syntax (https://tools.ietf.org/html/bcp47) used to localize the +// response. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportTriggeractionCall) LanguageCode(languageCode string) *MerchantsupportTriggeractionCall { + c.urlParams_.Set("languageCode", languageCode) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductdeliverytimeCreateCall) Fields(s ...googleapi.Field) *ProductdeliverytimeCreateCall { +func (c *MerchantsupportTriggeractionCall) Fields(s ...googleapi.Field) *MerchantsupportTriggeractionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProductdeliverytimeCreateCall) Context(ctx context.Context) *ProductdeliverytimeCreateCall { +func (c *MerchantsupportTriggeractionCall) Context(ctx context.Context) *MerchantsupportTriggeractionCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductdeliverytimeCreateCall) Header() http.Header { +func (c *MerchantsupportTriggeractionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductdeliverytimeCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportTriggeractionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.productdeliverytime) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.triggeractionpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productdeliverytime") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/triggeraction") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22438,17 +21016,17 @@ func (c *ProductdeliverytimeCreateCall) doRequest(alt string) (*http.Response, e googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productdeliverytime.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.merchantsupport.triggeraction", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.productdeliverytime.create" call. +// Do executes the "content.merchantsupport.triggeraction" call. // Any non-2xx status code is an error. Response headers are in either -// *ProductDeliveryTime.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *TriggerActionResponse.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 *ProductdeliverytimeCreateCall) Do(opts ...googleapi.CallOption) (*ProductDeliveryTime, error) { +func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*TriggerActionResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22467,7 +21045,7 @@ func (c *ProductdeliverytimeCreateCall) Do(opts ...googleapi.CallOption) (*Produ if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProductDeliveryTime{ + ret := &TriggerActionResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22478,172 +21056,81 @@ func (c *ProductdeliverytimeCreateCall) Do(opts ...googleapi.CallOption) (*Produ if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productdeliverytime.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.merchantsupport.triggeraction", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductdeliverytimeDeleteCall struct { - s *APIService - merchantId int64 - productId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrdertrackingsignalsCreateCall struct { + s *APIService + merchantId int64 + ordertrackingsignal *OrderTrackingSignal + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the delivery time of a product. +// Create: Creates new order tracking signal. // -// - merchantId: The Google merchant ID of the account that contains the -// product. This account cannot be a multi-client account. -// - productId: The Content API ID of the product, in the form -// `channel:contentLanguage:targetCountry:offerId`. -func (r *ProductdeliverytimeService) Delete(merchantId int64, productId string) *ProductdeliverytimeDeleteCall { - c := &ProductdeliverytimeDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the merchant for which the order signal is created. +func (r *OrdertrackingsignalsService) Create(merchantId int64, ordertrackingsignal *OrderTrackingSignal) *OrdertrackingsignalsCreateCall { + c := &OrdertrackingsignalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId + c.ordertrackingsignal = ordertrackingsignal return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductdeliverytimeDeleteCall) Fields(s ...googleapi.Field) *ProductdeliverytimeDeleteCall { +func (c *OrdertrackingsignalsCreateCall) Fields(s ...googleapi.Field) *OrdertrackingsignalsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProductdeliverytimeDeleteCall) Context(ctx context.Context) *ProductdeliverytimeDeleteCall { +func (c *OrdertrackingsignalsCreateCall) Context(ctx context.Context) *OrdertrackingsignalsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductdeliverytimeDeleteCall) Header() http.Header { +func (c *OrdertrackingsignalsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductdeliverytimeDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productdeliverytime/{productId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) +func (c *OrdertrackingsignalsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.ordertrackingsignal) if err != nil { return nil, err } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "productId": c.productId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productdeliverytime.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.productdeliverytime.delete" call. -func (c *ProductdeliverytimeDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productdeliverytime.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type ProductdeliverytimeGetCall struct { - s *APIService - merchantId int64 - productId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets `productDeliveryTime` by `productId`. -// -// - merchantId: The Google merchant ID of the account that contains the -// product. This account cannot be a multi-client account. -// - productId: The Content API ID of the product, in the form -// `channel:contentLanguage:targetCountry:offerId`. -func (r *ProductdeliverytimeService) Get(merchantId int64, productId string) *ProductdeliverytimeGetCall { - c := &ProductdeliverytimeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.productId = productId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProductdeliverytimeGetCall) Fields(s ...googleapi.Field) *ProductdeliverytimeGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProductdeliverytimeGetCall) IfNoneMatch(entityTag string) *ProductdeliverytimeGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProductdeliverytimeGetCall) Context(ctx context.Context) *ProductdeliverytimeGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProductdeliverytimeGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProductdeliverytimeGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productdeliverytime/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordertrackingsignals") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), - "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productdeliverytime.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.ordertrackingsignals.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.productdeliverytime.get" call. +// Do executes the "content.ordertrackingsignals.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ProductDeliveryTime.ServerResponse.Header or (if a response was returned at +// *OrderTrackingSignal.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 *ProductdeliverytimeGetCall) Do(opts ...googleapi.CallOption) (*ProductDeliveryTime, error) { +func (c *OrdertrackingsignalsCreateCall) Do(opts ...googleapi.CallOption) (*OrderTrackingSignal, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22662,7 +21149,7 @@ func (c *ProductdeliverytimeGetCall) Do(opts ...googleapi.CallOption) (*ProductD if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProductDeliveryTime{ + ret := &OrderTrackingSignal{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22673,75 +21160,74 @@ func (c *ProductdeliverytimeGetCall) Do(opts ...googleapi.CallOption) (*ProductD if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productdeliverytime.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.ordertrackingsignals.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductsCustombatchCall struct { - s *APIService - productscustombatchrequest *ProductsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PosCustombatchCall struct { + s *APIService + poscustombatchrequest *PosCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Retrieves, inserts, and deletes multiple products in a single -// request. -func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall { - c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.productscustombatchrequest = productscustombatchrequest +// Custombatch: Batches multiple POS-related calls in a single request. +func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall { + c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.poscustombatchrequest = poscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall { +func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall { +func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductsCustombatchCall) Header() http.Header { +func (c *PosCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.productscustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.poscustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.products.custombatch" call. +// Do executes the "content.pos.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *ProductsCustomBatchResponse.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 *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) { +// *PosCustomBatchResponse.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 *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22760,7 +21246,7 @@ func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCus if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProductsCustomBatchResponse{ + ret := &PosCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22771,67 +21257,61 @@ func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCus if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductsDeleteCall struct { - s *APIService - merchantId uint64 - productId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PosDeleteCall struct { + s *APIService + merchantId uint64 + targetMerchantId uint64 + storeCode string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a product from your Merchant Center account. +// Delete: Deletes a store for the given merchant. // -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -// - productId: The REST ID of the product. -func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall { - c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the POS or inventory data provider. +// - storeCode: A store code that is unique per merchant. +// - targetMerchantId: The ID of the target merchant. +func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall { + c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - return c -} - -// FeedId sets the optional parameter "feedId": The Content API Supplemental -// Feed ID. If present then product deletion applies to the data in a -// supplemental feed. If absent, entire product will be deleted. -func (c *ProductsDeleteCall) FeedId(feedId uint64) *ProductsDeleteCall { - c.urlParams_.Set("feedId", fmt.Sprint(feedId)) + c.targetMerchantId = targetMerchantId + c.storeCode = storeCode return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall { +func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall { +func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductsDeleteCall) Header() http.Header { +func (c *PosDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, nil) if err != nil { @@ -22839,15 +21319,16 @@ func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), + "storeCode": c.storeCode, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.products.delete" call. -func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.pos.delete" call. +func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if err != nil { @@ -22857,36 +21338,38 @@ func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error { if err := googleapi.CheckResponse(res); err != nil { return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.delete", "response", internallog.HTTPResponse(res, nil)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.delete", "response", internallog.HTTPResponse(res, nil)) return nil } -type ProductsGetCall struct { - s *APIService - merchantId uint64 - productId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PosGetCall struct { + s *APIService + merchantId uint64 + targetMerchantId uint64 + storeCode string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a product from your Merchant Center account. +// Get: Retrieves information about the given store. // -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -// - productId: The REST ID of the product. -func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall { - c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the POS or inventory data provider. +// - storeCode: A store code that is unique per merchant. +// - targetMerchantId: The ID of the target merchant. +func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall { + c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId + c.targetMerchantId = targetMerchantId + c.storeCode = storeCode return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { +func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22894,168 +21377,55 @@ func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { // IfNoneMatch sets an 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. -func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall { +func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProductsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "productId": c.productId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.products.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Product.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &Product{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProductsInsertCall struct { - s *APIService - merchantId uint64 - product *Product - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Uploads a product to your Merchant Center account. If an item with -// the same channel, contentLanguage, offerId, and targetCountry already -// exists, this method updates that entry. -// -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall { - c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.product = product - return c -} - -// FeedId sets the optional parameter "feedId": The Content API Supplemental -// Feed ID. If present then product insertion applies to the data in a -// supplemental feed. -func (c *ProductsInsertCall) FeedId(feedId uint64) *ProductsInsertCall { - c.urlParams_.Set("feedId", fmt.Sprint(feedId)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall { +func (c *PosGetCall) Context(ctx context.Context) *PosGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductsInsertCall) Header() http.Header { +func (c *PosGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.product) - if err != nil { - return nil, err +func (c *PosGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), + "storeCode": c.storeCode, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.products.insert" call. +// Do executes the "content.pos.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Product.ServerResponse.Header or (if a response was returned at all) in +// *PosStore.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 *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) { +func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23074,7 +21444,7 @@ func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Product{ + ret := &PosStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23085,105 +21455,84 @@ func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductsListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PosInsertCall struct { + s *APIService + merchantId uint64 + targetMerchantId uint64 + posstore *PosStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the products in your Merchant Center account. The response might -// contain fewer items than specified by maxResults. Rely on nextPageToken to -// determine if there are more items to be requested. +// Insert: Creates a store for the given merchant. // -// - merchantId: The ID of the account that contains the products. This account -// cannot be a multi-client account. -func (r *ProductsService) List(merchantId uint64) *ProductsListCall { - c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the POS or inventory data provider. +// - targetMerchantId: The ID of the target merchant. +func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall { + c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// products to return in the response, used for paging. The default value is -// 25. The maximum value is 250. -func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.targetMerchantId = targetMerchantId + c.posstore = posstore return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall { +func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall { +func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductsListCall) Header() http.Header { +func (c *PosInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.posstore) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.products.list" call. +// Do executes the "content.pos.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *ProductsListResponse.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 *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) { +// *PosStore.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 *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23202,7 +21551,7 @@ func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListRespon if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProductsListResponse{ + ret := &PosStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23213,119 +21562,85 @@ func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListRespon if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// 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 *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProductsUpdateCall struct { - s *APIService - merchantId uint64 - productId string - product *Product - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PosInventoryCall struct { + s *APIService + merchantId uint64 + targetMerchantId uint64 + posinventoryrequest *PosInventoryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates an existing product in your Merchant Center account. Only -// updates attributes provided in the request. +// Inventory: Submit inventory for the given merchant. // -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -// - productId: The REST ID of the product for which to update. -func (r *ProductsService) Update(merchantId uint64, productId string, product *Product) *ProductsUpdateCall { - c := &ProductsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the POS or inventory data provider. +// - targetMerchantId: The ID of the target merchant. +func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall { + c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - c.product = product - return c -} - -// UpdateMask sets the optional parameter "updateMask": The comma-separated -// list of product attributes to be updated. Example: "title,salePrice". -// Attributes specified in the update mask without a value specified in the -// body will be deleted from the product. *You must specify the update mask to -// delete attributes.* Only top-level product attributes can be updated. If not -// defined, product attributes with set values will be updated and other -// attributes will stay unchanged. -func (c *ProductsUpdateCall) UpdateMask(updateMask string) *ProductsUpdateCall { - c.urlParams_.Set("updateMask", updateMask) + c.targetMerchantId = targetMerchantId + c.posinventoryrequest = posinventoryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductsUpdateCall) Fields(s ...googleapi.Field) *ProductsUpdateCall { +func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProductsUpdateCall) Context(ctx context.Context) *ProductsUpdateCall { +func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductsUpdateCall) Header() http.Header { +func (c *PosInventoryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.product) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.posinventoryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.inventory", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.products.update" call. +// Do executes the "content.pos.inventory" call. // Any non-2xx status code is an error. Response headers are in either -// *Product.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProductsUpdateCall) Do(opts ...googleapi.CallOption) (*Product, error) { +// *PosInventoryResponse.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 *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23344,7 +21659,7 @@ func (c *ProductsUpdateCall) Do(opts ...googleapi.CallOption) (*Product, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Product{ + ret := &PosInventoryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23355,74 +21670,91 @@ func (c *ProductsUpdateCall) Do(opts ...googleapi.CallOption) (*Product, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.inventory", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductstatusesCustombatchCall struct { - s *APIService - productstatusescustombatchrequest *ProductstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PosListCall struct { + s *APIService + merchantId uint64 + targetMerchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Gets the statuses of multiple products in a single request. -func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall { - c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.productstatusescustombatchrequest = productstatusescustombatchrequest +// List: Lists the stores of the target merchant. +// +// - merchantId: The ID of the POS or inventory data provider. +// - targetMerchantId: The ID of the target merchant. +func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall { + c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.targetMerchantId = targetMerchantId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall { +func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall { +func (c *PosListCall) Context(ctx context.Context) *PosListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductstatusesCustombatchCall) Header() http.Header { +func (c *PosListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.productstatusescustombatchrequest) - if err != nil { - return nil, err +func (c *PosListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productstatuses.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.productstatuses.custombatch" call. +// Do executes the "content.pos.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ProductstatusesCustomBatchResponse.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 *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) { +// *PosListResponse.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 *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23441,7 +21773,7 @@ func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Prod if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProductstatusesCustomBatchResponse{ + ret := &PosListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23452,99 +21784,85 @@ func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Prod if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productstatuses.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductstatusesGetCall struct { - s *APIService - merchantId uint64 - productId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PosSaleCall struct { + s *APIService + merchantId uint64 + targetMerchantId uint64 + possalerequest *PosSaleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the status of a product from your Merchant Center account. +// Sale: Submit a sale event for the given merchant. // -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -// - productId: The REST ID of the product. -func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall { - c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the POS or inventory data provider. +// - targetMerchantId: The ID of the target merchant. +func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall { + c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - return c -} - -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) + c.targetMerchantId = targetMerchantId + c.possalerequest = possalerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall { +func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall { +func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductstatusesGetCall) Header() http.Header { +func (c *PosSaleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.possalerequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productstatuses.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pos.sale", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.productstatuses.get" call. +// Do executes the "content.pos.sale" call. // Any non-2xx status code is an error. Response headers are in either -// *ProductStatus.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 *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) { +// *PosSaleResponse.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 *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23563,7 +21881,7 @@ func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatu if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProductStatus{ + ret := &PosSaleResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23574,111 +21892,82 @@ func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatu if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productstatuses.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pos.sale", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ProductstatusesListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProductdeliverytimeCreateCall struct { + s *APIService + merchantId int64 + productdeliverytime *ProductDeliveryTime + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the statuses of the products in your Merchant Center account. +// Create: Creates or updates the delivery time of a product. // -// - merchantId: The ID of the account that contains the products. This account -// cannot be a multi-client account. -func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall { - c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The Google merchant ID of the account that contains the +// product. This account cannot be a multi-client account. +func (r *ProductdeliverytimeService) Create(merchantId int64, productdeliverytime *ProductDeliveryTime) *ProductdeliverytimeCreateCall { + c := &ProductdeliverytimeCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// product statuses to return in the response, used for paging. The default -// value is 25. The maximum value is 250. -func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) + c.productdeliverytime = productdeliverytime return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall { +func (c *ProductdeliverytimeCreateCall) Fields(s ...googleapi.Field) *ProductdeliverytimeCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall { +func (c *ProductdeliverytimeCreateCall) Context(ctx context.Context) *ProductdeliverytimeCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProductstatusesListCall) Header() http.Header { +func (c *ProductdeliverytimeCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ProductdeliverytimeCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.productdeliverytime) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productdeliverytime") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productstatuses.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productdeliverytime.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.productstatuses.list" call. +// Do executes the "content.productdeliverytime.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ProductstatusesListResponse.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 *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) { +// *ProductDeliveryTime.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 *ProductdeliverytimeCreateCall) Do(opts ...googleapi.CallOption) (*ProductDeliveryTime, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23697,7 +21986,7 @@ func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*Productstat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProductstatusesListResponse{ + ret := &ProductDeliveryTime{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23708,164 +21997,116 @@ func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*Productstat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productstatuses.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productdeliverytime.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// 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 *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 PromotionsCreateCall struct { +type ProductdeliverytimeDeleteCall struct { s *APIService merchantId int64 - promotion *Promotion + productId string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header -} - -// Create: Inserts a promotion for your Merchant Center account. If the -// promotion already exists, then it updates the promotion instead. To [end or -// delete] -// (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) -// a promotion update the time period of the promotion to a time that has -// already passed. +} + +// Delete: Deletes the delivery time of a product. // -// - merchantId: The ID of the account that contains the collection. -func (r *PromotionsService) Create(merchantId int64, promotion *Promotion) *PromotionsCreateCall { - c := &PromotionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The Google merchant ID of the account that contains the +// product. This account cannot be a multi-client account. +// - productId: The Content API ID of the product, in the form +// `channel:contentLanguage:targetCountry:offerId`. +func (r *ProductdeliverytimeService) Delete(merchantId int64, productId string) *ProductdeliverytimeDeleteCall { + c := &ProductdeliverytimeDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.promotion = promotion + c.productId = productId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PromotionsCreateCall) Fields(s ...googleapi.Field) *PromotionsCreateCall { +func (c *ProductdeliverytimeDeleteCall) Fields(s ...googleapi.Field) *ProductdeliverytimeDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PromotionsCreateCall) Context(ctx context.Context) *PromotionsCreateCall { +func (c *ProductdeliverytimeDeleteCall) Context(ctx context.Context) *ProductdeliverytimeDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PromotionsCreateCall) Header() http.Header { +func (c *ProductdeliverytimeDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PromotionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.promotion) - if err != nil { - return nil, err - } +func (c *ProductdeliverytimeDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/promotions") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productdeliverytime/{productId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.promotions.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productdeliverytime.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.promotions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Promotion.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 *PromotionsCreateCall) Do(opts ...googleapi.CallOption) (*Promotion, error) { +// Do executes the "content.productdeliverytime.delete" call. +func (c *ProductdeliverytimeDeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Promotion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.promotions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productdeliverytime.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type PromotionsGetCall struct { +type ProductdeliverytimeGetCall struct { s *APIService merchantId int64 - id string + productId string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves a promotion from your Merchant Center account. +// Get: Gets `productDeliveryTime` by `productId`. // -// - id: REST ID of the promotion to retrieve. -// - merchantId: The ID of the account that contains the collection. -func (r *PromotionsService) Get(merchantId int64, id string) *PromotionsGetCall { - c := &PromotionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The Google merchant ID of the account that contains the +// product. This account cannot be a multi-client account. +// - productId: The Content API ID of the product, in the form +// `channel:contentLanguage:targetCountry:offerId`. +func (r *ProductdeliverytimeService) Get(merchantId int64, productId string) *ProductdeliverytimeGetCall { + c := &ProductdeliverytimeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.id = id + c.productId = productId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PromotionsGetCall) Fields(s ...googleapi.Field) *PromotionsGetCall { +func (c *ProductdeliverytimeGetCall) Fields(s ...googleapi.Field) *ProductdeliverytimeGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23873,34 +22114,34 @@ func (c *PromotionsGetCall) Fields(s ...googleapi.Field) *PromotionsGetCall { // IfNoneMatch sets an 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. -func (c *PromotionsGetCall) IfNoneMatch(entityTag string) *PromotionsGetCall { +func (c *ProductdeliverytimeGetCall) IfNoneMatch(entityTag string) *ProductdeliverytimeGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *PromotionsGetCall) Context(ctx context.Context) *PromotionsGetCall { +func (c *ProductdeliverytimeGetCall) Context(ctx context.Context) *ProductdeliverytimeGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PromotionsGetCall) Header() http.Header { +func (c *ProductdeliverytimeGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PromotionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProductdeliverytimeGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/promotions/{id}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productdeliverytime/{productId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -23909,18 +22150,19 @@ func (c *PromotionsGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), - "id": c.id, + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.promotions.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productdeliverytime.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.promotions.get" call. +// Do executes the "content.productdeliverytime.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Promotion.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 *PromotionsGetCall) Do(opts ...googleapi.CallOption) (*Promotion, error) { +// *ProductDeliveryTime.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 *ProductdeliverytimeGetCall) Do(opts ...googleapi.CallOption) (*ProductDeliveryTime, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23939,7 +22181,7 @@ func (c *PromotionsGetCall) Do(opts ...googleapi.CallOption) (*Promotion, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Promotion{ + ret := &ProductDeliveryTime{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23950,120 +22192,75 @@ func (c *PromotionsGetCall) Do(opts ...googleapi.CallOption) (*Promotion, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.promotions.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productdeliverytime.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type PromotionsListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all promotions from your Merchant Center account. -// -// - merchantId: The ID of the account that contains the collection. -func (r *PromotionsService) List(merchantId int64) *PromotionsListCall { - c := &PromotionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// CountryCode sets the optional parameter "countryCode": CLDR country code -// (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for -// example, "US"), used as a filter on promotions target country. -func (c *PromotionsListCall) CountryCode(countryCode string) *PromotionsListCall { - c.urlParams_.Set("countryCode", countryCode) - return c -} - -// LanguageCode sets the optional parameter "languageCode": The two-letter ISO -// 639-1 language code associated with the promotions, used as a filter. -func (c *PromotionsListCall) LanguageCode(languageCode string) *PromotionsListCall { - c.urlParams_.Set("languageCode", languageCode) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// promotions to return. The service may return fewer than this value. If -// unspecified, at most 50 labels will be returned. The maximum value is 1000; -// values above 1000 will be coerced to 1000. -func (c *PromotionsListCall) PageSize(pageSize int64) *PromotionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProductsCustombatchCall struct { + s *APIService + productscustombatchrequest *ProductsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListPromotion` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListPromotion` must match the call that provided the page token. -func (c *PromotionsListCall) PageToken(pageToken string) *PromotionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Custombatch: Retrieves, inserts, and deletes multiple products in a single +// request. +func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall { + c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.productscustombatchrequest = productscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PromotionsListCall) Fields(s ...googleapi.Field) *PromotionsListCall { +func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *PromotionsListCall) IfNoneMatch(entityTag string) *PromotionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *PromotionsListCall) Context(ctx context.Context) *PromotionsListCall { +func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PromotionsListCall) Header() http.Header { +func (c *ProductsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PromotionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.productscustombatchrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/promotions") + urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.promotions.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.promotions.list" call. +// Do executes the "content.products.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *ListPromotionResponse.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 *PromotionsListCall) Do(opts ...googleapi.CallOption) (*ListPromotionResponse, error) { +// *ProductsCustomBatchResponse.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 *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24082,7 +22279,7 @@ func (c *PromotionsListCall) Do(opts ...googleapi.CallOption) (*ListPromotionRes if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListPromotionResponse{ + ret := &ProductsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24092,215 +22289,178 @@ func (c *PromotionsListCall) Do(opts ...googleapi.CallOption) (*ListPromotionRes b, err := gensupport.DecodeResponseBytes(target, res) if err != nil { return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.promotions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PromotionsListCall) Pages(ctx context.Context, f func(*ListPromotionResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 PubsubnotificationsettingsGetCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.custombatch", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -// Get: Retrieves a Merchant Center account's pubsub notification settings. +type ProductsDeleteCall struct { + s *APIService + merchantId uint64 + productId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a product from your Merchant Center account. // -// - merchantId: The ID of the account for which to get pubsub notification -// settings. -func (r *PubsubnotificationsettingsService) Get(merchantId uint64) *PubsubnotificationsettingsGetCall { - c := &PubsubnotificationsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +// - productId: The REST ID of the product. +func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall { + c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.productId = productId + return c +} + +// FeedId sets the optional parameter "feedId": The Content API Supplemental +// Feed ID. If present then product deletion applies to the data in a +// supplemental feed. If absent, entire product will be deleted. +func (c *ProductsDeleteCall) FeedId(feedId uint64) *ProductsDeleteCall { + c.urlParams_.Set("feedId", fmt.Sprint(feedId)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PubsubnotificationsettingsGetCall) Fields(s ...googleapi.Field) *PubsubnotificationsettingsGetCall { +func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *PubsubnotificationsettingsGetCall) IfNoneMatch(entityTag string) *PubsubnotificationsettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *PubsubnotificationsettingsGetCall) Context(ctx context.Context) *PubsubnotificationsettingsGetCall { +func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PubsubnotificationsettingsGetCall) Header() http.Header { +func (c *ProductsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PubsubnotificationsettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pubsubnotificationsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pubsubnotificationsettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PubsubNotificationSettings.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 *PubsubnotificationsettingsGetCall) Do(opts ...googleapi.CallOption) (*PubsubNotificationSettings, error) { +// Do executes the "content.products.delete" call. +func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &PubsubNotificationSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type PubsubnotificationsettingsUpdateCall struct { - s *APIService - merchantId uint64 - pubsubnotificationsettings *PubsubNotificationSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductsGetCall struct { + s *APIService + merchantId uint64 + productId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Register a Merchant Center account for pubsub notifications. Note -// that cloud topic name shouldn't be provided as part of the request. +// Get: Retrieves a product from your Merchant Center account. // -// - merchantId: The ID of the account. -func (r *PubsubnotificationsettingsService) Update(merchantId uint64, pubsubnotificationsettings *PubsubNotificationSettings) *PubsubnotificationsettingsUpdateCall { - c := &PubsubnotificationsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +// - productId: The REST ID of the product. +func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall { + c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.pubsubnotificationsettings = pubsubnotificationsettings + c.productId = productId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PubsubnotificationsettingsUpdateCall) Fields(s ...googleapi.Field) *PubsubnotificationsettingsUpdateCall { +func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *PubsubnotificationsettingsUpdateCall) Context(ctx context.Context) *PubsubnotificationsettingsUpdateCall { +func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PubsubnotificationsettingsUpdateCall) Header() http.Header { +func (c *ProductsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PubsubnotificationsettingsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pubsubnotificationsettings) - if err != nil { - return nil, err +func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pubsubnotificationsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.pubsubnotificationsettings.update" call. +// Do executes the "content.products.get" call. // Any non-2xx status code is an error. Response headers are in either -// *PubsubNotificationSettings.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 *PubsubnotificationsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*PubsubNotificationSettings, error) { +// *Product.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24319,7 +22479,7 @@ func (c *PubsubnotificationsettingsUpdateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PubsubNotificationSettings{ + ret := &Product{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24330,105 +22490,91 @@ func (c *PubsubnotificationsettingsUpdateCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type QuotasListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProductsInsertCall struct { + s *APIService + merchantId uint64 + product *Product + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the daily call quota and usage per method for your Merchant -// Center account. +// Insert: Uploads a product to your Merchant Center account. If an item with +// the same channel, contentLanguage, offerId, and targetCountry already +// exists, this method updates that entry. // -// - merchantId: The ID of the account that has quota. This account must be an -// admin. -func (r *QuotasService) List(merchantId int64) *QuotasListCall { - c := &QuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall { + c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.product = product return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// quotas to return in the response, used for paging. Defaults to 500; values -// above 1000 will be coerced to 1000. -func (c *QuotasListCall) PageSize(pageSize int64) *QuotasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token (if provided) to -// retrieve the subsequent page. All other parameters must match the original -// call that provided the page token. -func (c *QuotasListCall) PageToken(pageToken string) *QuotasListCall { - c.urlParams_.Set("pageToken", pageToken) +// FeedId sets the optional parameter "feedId": The Content API Supplemental +// Feed ID. If present then product insertion applies to the data in a +// supplemental feed. +func (c *ProductsInsertCall) FeedId(feedId uint64) *ProductsInsertCall { + c.urlParams_.Set("feedId", fmt.Sprint(feedId)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *QuotasListCall) Fields(s ...googleapi.Field) *QuotasListCall { +func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *QuotasListCall) IfNoneMatch(entityTag string) *QuotasListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *QuotasListCall) Context(ctx context.Context) *QuotasListCall { +func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *QuotasListCall) Header() http.Header { +func (c *ProductsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *QuotasListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.product) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/quotas") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.quotas.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.quotas.list" call. +// Do executes the "content.products.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *ListMethodQuotasResponse.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 *QuotasListCall) Do(opts ...googleapi.CallOption) (*ListMethodQuotasResponse, error) { +// *Product.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24447,7 +22593,7 @@ func (c *QuotasListCall) Do(opts ...googleapi.CallOption) (*ListMethodQuotasResp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMethodQuotasResponse{ + ret := &Product{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24458,74 +22604,50 @@ func (c *QuotasListCall) Do(opts ...googleapi.CallOption) (*ListMethodQuotasResp if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.quotas.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// 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 *QuotasListCall) Pages(ctx context.Context, f func(*ListMethodQuotasResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 RecommendationsGenerateCall struct { +type ProductsListCall struct { s *APIService - merchantId int64 + merchantId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Generate: Generates recommendations for a merchant. +// List: Lists the products in your Merchant Center account. The response might +// contain fewer items than specified by maxResults. Rely on nextPageToken to +// determine if there are more items to be requested. // -// - merchantId: The ID of the account to fetch recommendations for. -func (r *RecommendationsService) Generate(merchantId int64) *RecommendationsGenerateCall { - c := &RecommendationsGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the products. This account +// cannot be a multi-client account. +func (r *ProductsService) List(merchantId uint64) *ProductsListCall { + c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } -// AllowedTag sets the optional parameter "allowedTag": List of allowed tags. -// Tags are a set of predefined strings that describe the category that -// individual recommendation types belong to. User can specify zero or more -// tags in this field to indicate what categories of recommendations they want -// to receive. Current list of supported tags: - TREND -func (c *RecommendationsGenerateCall) AllowedTag(allowedTag ...string) *RecommendationsGenerateCall { - c.urlParams_.SetMulti("allowedTag", append([]string{}, allowedTag...)) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// products to return in the response, used for paging. The default value is +// 25. The maximum value is 250. +func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// LanguageCode sets the optional parameter "languageCode": Language code of -// the client. If not set, the result will be in default language (English). -// This language code affects all fields prefixed with "localized". This should -// be set to ISO 639-1 country code. List of currently verified supported -// language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, -// tr, th, ko, zh-CN, zh-TW, ja, id, hi -func (c *RecommendationsGenerateCall) LanguageCode(languageCode string) *RecommendationsGenerateCall { - c.urlParams_.Set("languageCode", languageCode) +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall { + 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 // details. -func (c *RecommendationsGenerateCall) Fields(s ...googleapi.Field) *RecommendationsGenerateCall { +func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24533,34 +22655,34 @@ func (c *RecommendationsGenerateCall) Fields(s ...googleapi.Field) *Recommendati // IfNoneMatch sets an 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. -func (c *RecommendationsGenerateCall) IfNoneMatch(entityTag string) *RecommendationsGenerateCall { +func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RecommendationsGenerateCall) Context(ctx context.Context) *RecommendationsGenerateCall { +func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RecommendationsGenerateCall) Header() http.Header { +func (c *ProductsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RecommendationsGenerateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/recommendations/generate") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -24568,19 +22690,19 @@ func (c *RecommendationsGenerateCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.recommendations.generate", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.recommendations.generate" call. +// Do executes the "content.products.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GenerateRecommendationsResponse.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 *RecommendationsGenerateCall) Do(opts ...googleapi.CallOption) (*GenerateRecommendationsResponse, error) { +// *ProductsListResponse.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 *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24599,7 +22721,7 @@ func (c *RecommendationsGenerateCall) Do(opts ...googleapi.CallOption) (*Generat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GenerateRecommendationsResponse{ + ret := &ProductsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24610,155 +22732,216 @@ func (c *RecommendationsGenerateCall) Do(opts ...googleapi.CallOption) (*Generat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.recommendations.generate", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RecommendationsReportInteractionCall struct { - s *APIService - merchantId int64 - reportinteractionrequest *ReportInteractionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// ReportInteraction: Reports an interaction on a recommendation for a -// merchant. +type ProductsUpdateCall struct { + s *APIService + merchantId uint64 + productId string + product *Product + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates an existing product in your Merchant Center account. Only +// updates attributes provided in the request. // -// - merchantId: The ID of the account that wants to report an interaction. -func (r *RecommendationsService) ReportInteraction(merchantId int64, reportinteractionrequest *ReportInteractionRequest) *RecommendationsReportInteractionCall { - c := &RecommendationsReportInteractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +// - productId: The REST ID of the product for which to update. +func (r *ProductsService) Update(merchantId uint64, productId string, product *Product) *ProductsUpdateCall { + c := &ProductsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.reportinteractionrequest = reportinteractionrequest + c.productId = productId + c.product = product + return c +} + +// UpdateMask sets the optional parameter "updateMask": The comma-separated +// list of product attributes to be updated. Example: "title,salePrice". +// Attributes specified in the update mask without a value specified in the +// body will be deleted from the product. *You must specify the update mask to +// delete attributes.* Only top-level product attributes can be updated. If not +// defined, product attributes with set values will be updated and other +// attributes will stay unchanged. +func (c *ProductsUpdateCall) UpdateMask(updateMask string) *ProductsUpdateCall { + 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 // details. -func (c *RecommendationsReportInteractionCall) Fields(s ...googleapi.Field) *RecommendationsReportInteractionCall { +func (c *ProductsUpdateCall) Fields(s ...googleapi.Field) *ProductsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RecommendationsReportInteractionCall) Context(ctx context.Context) *RecommendationsReportInteractionCall { +func (c *ProductsUpdateCall) Context(ctx context.Context) *ProductsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RecommendationsReportInteractionCall) Header() http.Header { +func (c *ProductsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RecommendationsReportInteractionCall) doRequest(alt string) (*http.Response, error) { +func (c *ProductsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reportinteractionrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.product) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/recommendations/reportInteraction") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.recommendations.reportInteraction", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.products.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.recommendations.reportInteraction" call. -func (c *RecommendationsReportInteractionCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.products.update" call. +// Any non-2xx status code is an error. Response headers are in either +// *Product.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProductsUpdateCall) Do(opts ...googleapi.CallOption) (*Product, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.recommendations.reportInteraction", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &Product{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.products.update", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type RegionalinventoryCustombatchCall struct { - s *APIService - regionalinventorycustombatchrequest *RegionalinventoryCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductstatusesCustombatchCall struct { + s *APIService + productstatusescustombatchrequest *ProductstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Updates regional inventory for multiple products or regions in -// a single request. -func (r *RegionalinventoryService) Custombatch(regionalinventorycustombatchrequest *RegionalinventoryCustomBatchRequest) *RegionalinventoryCustombatchCall { - c := &RegionalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.regionalinventorycustombatchrequest = regionalinventorycustombatchrequest +// Custombatch: Gets the statuses of multiple products in a single request. +func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall { + c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.productstatusescustombatchrequest = productstatusescustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionalinventoryCustombatchCall) Fields(s ...googleapi.Field) *RegionalinventoryCustombatchCall { +func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionalinventoryCustombatchCall) Context(ctx context.Context) *RegionalinventoryCustombatchCall { +func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionalinventoryCustombatchCall) Header() http.Header { +func (c *ProductstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionalinventorycustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.productstatusescustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "regionalinventory/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regionalinventory.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productstatuses.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.regionalinventory.custombatch" call. +// Do executes the "content.productstatuses.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionalinventoryCustomBatchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *ProductstatusesCustomBatchResponse.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 *RegionalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*RegionalinventoryCustomBatchResponse, error) { +func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24777,7 +22960,7 @@ func (c *RegionalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Re if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionalinventoryCustomBatchResponse{ + ret := &ProductstatusesCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24788,70 +22971,81 @@ func (c *RegionalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Re if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regionalinventory.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productstatuses.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionalinventoryInsertCall struct { - s *APIService - merchantId uint64 - productId string - regionalinventory *RegionalInventory - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductstatusesGetCall struct { + s *APIService + merchantId uint64 + productId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Updates the regional inventory of a product in your Merchant Center -// account. If a regional inventory with the same region ID already exists, -// this method updates that entry. +// Get: Gets the status of a product from your Merchant Center account. // // - merchantId: The ID of the account that contains the product. This account // cannot be a multi-client account. -// - productId: The REST ID of the product for which to update the regional -// inventory. -func (r *RegionalinventoryService) Insert(merchantId uint64, productId string, regionalinventory *RegionalInventory) *RegionalinventoryInsertCall { - c := &RegionalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - productId: The REST ID of the product. +func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall { + c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.productId = productId - c.regionalinventory = regionalinventory + return c +} + +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionalinventoryInsertCall) Fields(s ...googleapi.Field) *RegionalinventoryInsertCall { +func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionalinventoryInsertCall) Context(ctx context.Context) *RegionalinventoryInsertCall { +func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionalinventoryInsertCall) Header() http.Header { +func (c *ProductstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionalinventory) - if err != nil { - return nil, err +func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/regionalinventory") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -24860,17 +23054,16 @@ func (c *RegionalinventoryInsertCall) doRequest(alt string) (*http.Response, err "merchantId": strconv.FormatUint(c.merchantId, 10), "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regionalinventory.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productstatuses.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.regionalinventory.insert" call. +// Do executes the "content.productstatuses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionalInventory.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 *RegionalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*RegionalInventory, error) { +// *ProductStatus.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 *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24889,7 +23082,7 @@ func (c *RegionalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*Regiona if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionalInventory{ + ret := &ProductStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24900,87 +23093,111 @@ func (c *RegionalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*Regiona if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regionalinventory.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productstatuses.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionsCreateCall struct { - s *APIService - merchantId int64 - region *Region - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductstatusesListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a region definition in your Merchant Center account. +// List: Lists the statuses of the products in your Merchant Center account. // -// - merchantId: The id of the merchant for which to create region definition. -func (r *RegionsService) Create(merchantId int64, region *Region) *RegionsCreateCall { - c := &RegionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the products. This account +// cannot be a multi-client account. +func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall { + c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.region = region return c } -// RegionId sets the optional parameter "regionId": Required. The id of the -// region to create. -func (c *RegionsCreateCall) RegionId(regionId string) *RegionsCreateCall { - c.urlParams_.Set("regionId", regionId) +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// product statuses to return in the response, used for paging. The default +// value is 25. The maximum value is 250. +func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall { + 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 // details. -func (c *RegionsCreateCall) Fields(s ...googleapi.Field) *RegionsCreateCall { +func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionsCreateCall) Context(ctx context.Context) *RegionsCreateCall { +func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsCreateCall) Header() http.Header { +func (c *ProductstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.region) - if err != nil { - return nil, err +func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.create", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.productstatuses.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.regions.create" call. +// Do executes the "content.productstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Region.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 *RegionsCreateCall) Do(opts ...googleapi.CallOption) (*Region, error) { +// *ProductstatusesListResponse.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 *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24999,7 +23216,7 @@ func (c *RegionsCreateCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Region{ + ret := &ProductstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25010,113 +23227,164 @@ func (c *RegionsCreateCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.productstatuses.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionsDeleteCall struct { +// 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 *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 PromotionsCreateCall struct { s *APIService merchantId int64 - regionId string + promotion *Promotion urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a region definition from your Merchant Center account. +// Create: Inserts a promotion for your Merchant Center account. If the +// promotion already exists, then it updates the promotion instead. To [end or +// delete] +// (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) +// a promotion update the time period of the promotion to a time that has +// already passed. // -// - merchantId: The id of the merchant for which to delete region definition. -// - regionId: The id of the region to delete. -func (r *RegionsService) Delete(merchantId int64, regionId string) *RegionsDeleteCall { - c := &RegionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. +func (r *PromotionsService) Create(merchantId int64, promotion *Promotion) *PromotionsCreateCall { + c := &PromotionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.regionId = regionId + c.promotion = promotion return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsDeleteCall) Fields(s ...googleapi.Field) *RegionsDeleteCall { +func (c *PromotionsCreateCall) Fields(s ...googleapi.Field) *PromotionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsDeleteCall) Context(ctx context.Context) *RegionsDeleteCall { +func (c *PromotionsCreateCall) Context(ctx context.Context) *PromotionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsDeleteCall) Header() http.Header { +func (c *PromotionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *PromotionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.promotion) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions/{regionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/promotions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionId": c.regionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.promotions.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.regions.delete" call. -func (c *RegionsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.promotions.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Promotion.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 *PromotionsCreateCall) Do(opts ...googleapi.CallOption) (*Promotion, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.delete", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &Promotion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.promotions.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type RegionsGetCall struct { +type PromotionsGetCall struct { s *APIService merchantId int64 - regionId string + id string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves a region defined in your Merchant Center account. +// Get: Retrieves a promotion from your Merchant Center account. // -// - merchantId: The id of the merchant for which to retrieve region -// definition. -// - regionId: The id of the region to retrieve. -func (r *RegionsService) Get(merchantId int64, regionId string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - id: REST ID of the promotion to retrieve. +// - merchantId: The ID of the account that contains the collection. +func (r *PromotionsService) Get(merchantId int64, id string) *PromotionsGetCall { + c := &PromotionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.regionId = regionId + c.id = id return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { +func (c *PromotionsGetCall) Fields(s ...googleapi.Field) *PromotionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25124,34 +23392,34 @@ func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { // IfNoneMatch sets an 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. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { +func (c *PromotionsGetCall) IfNoneMatch(entityTag string) *PromotionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { +func (c *PromotionsGetCall) Context(ctx context.Context) *PromotionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsGetCall) Header() http.Header { +func (c *PromotionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PromotionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions/{regionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/promotions/{id}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -25160,18 +23428,18 @@ func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionId": c.regionId, + "id": c.id, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.promotions.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.regions.get" call. +// Do executes the "content.promotions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Region.ServerResponse.Header or (if a response was returned at all) in +// *Promotion.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 *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { +func (c *PromotionsGetCall) Do(opts ...googleapi.CallOption) (*Promotion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25190,7 +23458,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Region{ + ret := &Promotion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25201,11 +23469,11 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.promotions.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionsListCall struct { +type PromotionsListCall struct { s *APIService merchantId int64 urlParams_ gensupport.URLParams @@ -25214,29 +23482,44 @@ type RegionsListCall struct { header_ http.Header } -// List: Lists the regions in your Merchant Center account. +// List: List all promotions from your Merchant Center account. // -// - merchantId: The id of the merchant for which to list region definitions. -func (r *RegionsService) List(merchantId int64) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. +func (r *PromotionsService) List(merchantId int64) *PromotionsListCall { + c := &PromotionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } +// CountryCode sets the optional parameter "countryCode": CLDR country code +// (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for +// example, "US"), used as a filter on promotions target country. +func (c *PromotionsListCall) CountryCode(countryCode string) *PromotionsListCall { + c.urlParams_.Set("countryCode", countryCode) + return c +} + +// LanguageCode sets the optional parameter "languageCode": The two-letter ISO +// 639-1 language code associated with the promotions, used as a filter. +func (c *PromotionsListCall) LanguageCode(languageCode string) *PromotionsListCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of -// regions to return. The service may return fewer than this value. If -// unspecified, at most 50 rules will be returned. The maximum value is 1000; +// promotions to return. The service may return fewer than this value. If +// unspecified, at most 50 labels will be returned. The maximum value is 1000; // values above 1000 will be coerced to 1000. -func (c *RegionsListCall) PageSize(pageSize int64) *RegionsListCall { +func (c *PromotionsListCall) PageSize(pageSize int64) *PromotionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListRegions` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListRegions` must -// match the call that provided the page token. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { +// from a previous `ListPromotion` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListPromotion` must match the call that provided the page token. +func (c *PromotionsListCall) PageToken(pageToken string) *PromotionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -25244,7 +23527,7 @@ func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { +func (c *PromotionsListCall) Fields(s ...googleapi.Field) *PromotionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25252,34 +23535,34 @@ func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { // IfNoneMatch sets an 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. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { +func (c *PromotionsListCall) IfNoneMatch(entityTag string) *PromotionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { +func (c *PromotionsListCall) Context(ctx context.Context) *PromotionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsListCall) Header() http.Header { +func (c *PromotionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PromotionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/promotions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -25289,17 +23572,17 @@ func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.promotions.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.regions.list" call. +// Do executes the "content.promotions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListRegionsResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *ListPromotionResponse.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 *RegionsListCall) Do(opts ...googleapi.CallOption) (*ListRegionsResponse, error) { +func (c *PromotionsListCall) Do(opts ...googleapi.CallOption) (*ListPromotionResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25318,7 +23601,7 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*ListRegionsResponse if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListRegionsResponse{ + ret := &ListPromotionResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25329,14 +23612,14 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*ListRegionsResponse if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.promotions.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *RegionsListCall) Pages(ctx context.Context, f func(*ListRegionsResponse) error) error { +func (c *PromotionsListCall) Pages(ctx context.Context, f func(*ListPromotionResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -25354,88 +23637,189 @@ func (c *RegionsListCall) Pages(ctx context.Context, f func(*ListRegionsResponse } } -type RegionsPatchCall struct { - s *APIService - merchantId int64 - regionId string - region *Region - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PubsubnotificationsettingsGetCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a Merchant Center account's pubsub notification settings. +// +// - merchantId: The ID of the account for which to get pubsub notification +// settings. +func (r *PubsubnotificationsettingsService) Get(merchantId uint64) *PubsubnotificationsettingsGetCall { + c := &PubsubnotificationsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PubsubnotificationsettingsGetCall) Fields(s ...googleapi.Field) *PubsubnotificationsettingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *PubsubnotificationsettingsGetCall) IfNoneMatch(entityTag string) *PubsubnotificationsettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PubsubnotificationsettingsGetCall) Context(ctx context.Context) *PubsubnotificationsettingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PubsubnotificationsettingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PubsubnotificationsettingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pubsubnotificationsettings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.pubsubnotificationsettings.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *PubsubNotificationSettings.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 *PubsubnotificationsettingsGetCall) Do(opts ...googleapi.CallOption) (*PubsubNotificationSettings, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &PubsubNotificationSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type PubsubnotificationsettingsUpdateCall struct { + s *APIService + merchantId uint64 + pubsubnotificationsettings *PubsubNotificationSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a region definition in your Merchant Center account. +// Update: Register a Merchant Center account for pubsub notifications. Note +// that cloud topic name shouldn't be provided as part of the request. // -// - merchantId: The id of the merchant for which to update region definition. -// - regionId: The id of the region to update. -func (r *RegionsService) Patch(merchantId int64, regionId string, region *Region) *RegionsPatchCall { - c := &RegionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *PubsubnotificationsettingsService) Update(merchantId uint64, pubsubnotificationsettings *PubsubNotificationSettings) *PubsubnotificationsettingsUpdateCall { + c := &PubsubnotificationsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.regionId = regionId - c.region = region - return c -} - -// UpdateMask sets the optional parameter "updateMask": The comma-separated -// field mask indicating the fields to update. Example: -// "displayName,postalCodeArea.regionCode". -func (c *RegionsPatchCall) UpdateMask(updateMask string) *RegionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.pubsubnotificationsettings = pubsubnotificationsettings return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsPatchCall) Fields(s ...googleapi.Field) *RegionsPatchCall { +func (c *PubsubnotificationsettingsUpdateCall) Fields(s ...googleapi.Field) *PubsubnotificationsettingsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsPatchCall) Context(ctx context.Context) *RegionsPatchCall { +func (c *PubsubnotificationsettingsUpdateCall) Context(ctx context.Context) *PubsubnotificationsettingsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsPatchCall) Header() http.Header { +func (c *PubsubnotificationsettingsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PubsubnotificationsettingsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.region) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pubsubnotificationsettings) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions/{regionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pubsubnotificationsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionId": c.regionId, + "merchantId": strconv.FormatUint(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.regions.patch" call. +// Do executes the "content.pubsubnotificationsettings.update" call. // Any non-2xx status code is an error. Response headers are in either -// *Region.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 *RegionsPatchCall) Do(opts ...googleapi.CallOption) (*Region, error) { +// *PubsubNotificationSettings.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 *PubsubnotificationsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*PubsubNotificationSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25454,7 +23838,7 @@ func (c *RegionsPatchCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Region{ + ret := &PubsubNotificationSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25465,65 +23849,87 @@ func (c *RegionsPatchCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.pubsubnotificationsettings.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReportsSearchCall struct { - s *APIService - merchantId int64 - searchrequest *SearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type QuotasListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Retrieves merchant performance metrics matching the search query and -// optionally segmented by selected dimensions. +// List: Lists the daily call quota and usage per method for your Merchant +// Center account. // -// - merchantId: Id of the merchant making the call. Must be a standalone -// account or an MCA subaccount. -func (r *ReportsService) Search(merchantId int64, searchrequest *SearchRequest) *ReportsSearchCall { - c := &ReportsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that has quota. This account must be an +// admin. +func (r *QuotasService) List(merchantId int64) *QuotasListCall { + c := &QuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.searchrequest = searchrequest + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// quotas to return in the response, used for paging. Defaults to 500; values +// above 1000 will be coerced to 1000. +func (c *QuotasListCall) PageSize(pageSize int64) *QuotasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token (if provided) to +// retrieve the subsequent page. All other parameters must match the original +// call that provided the page token. +func (c *QuotasListCall) PageToken(pageToken string) *QuotasListCall { + 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 // details. -func (c *ReportsSearchCall) Fields(s ...googleapi.Field) *ReportsSearchCall { +func (c *QuotasListCall) Fields(s ...googleapi.Field) *QuotasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *QuotasListCall) IfNoneMatch(entityTag string) *QuotasListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ReportsSearchCall) Context(ctx context.Context) *ReportsSearchCall { +func (c *QuotasListCall) Context(ctx context.Context) *QuotasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReportsSearchCall) Header() http.Header { +func (c *QuotasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReportsSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.searchrequest) - if err != nil { - return nil, err +func (c *QuotasListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/reports/search") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/quotas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -25531,16 +23937,17 @@ func (c *ReportsSearchCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.reports.search", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.quotas.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.reports.search" call. +// Do executes the "content.quotas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *SearchResponse.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 *ReportsSearchCall) Do(opts ...googleapi.CallOption) (*SearchResponse, error) { +// *ListMethodQuotasResponse.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 *QuotasListCall) Do(opts ...googleapi.CallOption) (*ListMethodQuotasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25559,7 +23966,7 @@ func (c *ReportsSearchCall) Do(opts ...googleapi.CallOption) (*SearchResponse, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SearchResponse{ + ret := &ListMethodQuotasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25570,16 +23977,16 @@ func (c *ReportsSearchCall) Do(opts ...googleapi.CallOption) (*SearchResponse, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.reports.search", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.quotas.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // 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 *ReportsSearchCall) Pages(ctx context.Context, f func(*SearchResponse) error) error { +func (c *QuotasListCall) Pages(ctx context.Context, f func(*ListMethodQuotasResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.searchrequest.PageToken = pt }(c.searchrequest.PageToken) + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -25591,75 +23998,108 @@ func (c *ReportsSearchCall) Pages(ctx context.Context, f func(*SearchResponse) e if x.NextPageToken == "" { return nil } - c.searchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -type ReturnaddressCustombatchCall struct { - s *APIService - returnaddresscustombatchrequest *ReturnaddressCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RecommendationsGenerateCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Batches multiple return address related calls in a single -// request. -func (r *ReturnaddressService) Custombatch(returnaddresscustombatchrequest *ReturnaddressCustomBatchRequest) *ReturnaddressCustombatchCall { - c := &ReturnaddressCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.returnaddresscustombatchrequest = returnaddresscustombatchrequest +// Generate: Generates recommendations for a merchant. +// +// - merchantId: The ID of the account to fetch recommendations for. +func (r *RecommendationsService) Generate(merchantId int64) *RecommendationsGenerateCall { + c := &RecommendationsGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + return c +} + +// AllowedTag sets the optional parameter "allowedTag": List of allowed tags. +// Tags are a set of predefined strings that describe the category that +// individual recommendation types belong to. User can specify zero or more +// tags in this field to indicate what categories of recommendations they want +// to receive. Current list of supported tags: - TREND +func (c *RecommendationsGenerateCall) AllowedTag(allowedTag ...string) *RecommendationsGenerateCall { + c.urlParams_.SetMulti("allowedTag", append([]string{}, allowedTag...)) + return c +} + +// LanguageCode sets the optional parameter "languageCode": Language code of +// the client. If not set, the result will be in default language (English). +// This language code affects all fields prefixed with "localized". This should +// be set to ISO 639-1 country code. List of currently verified supported +// language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, +// tr, th, ko, zh-CN, zh-TW, ja, id, hi +func (c *RecommendationsGenerateCall) LanguageCode(languageCode string) *RecommendationsGenerateCall { + c.urlParams_.Set("languageCode", languageCode) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnaddressCustombatchCall) Fields(s ...googleapi.Field) *ReturnaddressCustombatchCall { +func (c *RecommendationsGenerateCall) Fields(s ...googleapi.Field) *RecommendationsGenerateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *RecommendationsGenerateCall) IfNoneMatch(entityTag string) *RecommendationsGenerateCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ReturnaddressCustombatchCall) Context(ctx context.Context) *ReturnaddressCustombatchCall { +func (c *RecommendationsGenerateCall) Context(ctx context.Context) *RecommendationsGenerateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnaddressCustombatchCall) Header() http.Header { +func (c *RecommendationsGenerateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnaddressCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.returnaddresscustombatchrequest) - if err != nil { - return nil, err +func (c *RecommendationsGenerateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "returnaddress/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/recommendations/generate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnaddress.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.recommendations.generate", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnaddress.custombatch" call. +// Do executes the "content.recommendations.generate" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnaddressCustomBatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GenerateRecommendationsResponse.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 *ReturnaddressCustombatchCall) Do(opts ...googleapi.CallOption) (*ReturnaddressCustomBatchResponse, error) { +func (c *RecommendationsGenerateCall) Do(opts ...googleapi.CallOption) (*GenerateRecommendationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25678,7 +24118,7 @@ func (c *ReturnaddressCustombatchCall) Do(opts ...googleapi.CallOption) (*Return if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnaddressCustomBatchResponse{ + ret := &GenerateRecommendationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25689,75 +24129,77 @@ func (c *ReturnaddressCustombatchCall) Do(opts ...googleapi.CallOption) (*Return if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnaddress.custombatch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.recommendations.generate", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReturnaddressDeleteCall struct { - s *APIService - merchantId uint64 - returnAddressId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RecommendationsReportInteractionCall struct { + s *APIService + merchantId int64 + reportinteractionrequest *ReportInteractionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a return address for the given Merchant Center account. +// ReportInteraction: Reports an interaction on a recommendation for a +// merchant. // -// - merchantId: The Merchant Center account from which to delete the given -// return address. -// - returnAddressId: Return address ID generated by Google. -func (r *ReturnaddressService) Delete(merchantId uint64, returnAddressId string) *ReturnaddressDeleteCall { - c := &ReturnaddressDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that wants to report an interaction. +func (r *RecommendationsService) ReportInteraction(merchantId int64, reportinteractionrequest *ReportInteractionRequest) *RecommendationsReportInteractionCall { + c := &RecommendationsReportInteractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnAddressId = returnAddressId + c.reportinteractionrequest = reportinteractionrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnaddressDeleteCall) Fields(s ...googleapi.Field) *ReturnaddressDeleteCall { +func (c *RecommendationsReportInteractionCall) Fields(s ...googleapi.Field) *RecommendationsReportInteractionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReturnaddressDeleteCall) Context(ctx context.Context) *ReturnaddressDeleteCall { +func (c *RecommendationsReportInteractionCall) Context(ctx context.Context) *RecommendationsReportInteractionCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnaddressDeleteCall) Header() http.Header { +func (c *RecommendationsReportInteractionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnaddressDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RecommendationsReportInteractionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reportinteractionrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnaddress/{returnAddressId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/recommendations/reportInteraction") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnAddressId": c.returnAddressId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnaddress.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.recommendations.reportInteraction", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnaddress.delete" call. -func (c *ReturnaddressDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.recommendations.reportInteraction" call. +func (c *RecommendationsReportInteractionCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if err != nil { @@ -25767,90 +24209,75 @@ func (c *ReturnaddressDeleteCall) Do(opts ...googleapi.CallOption) error { if err := googleapi.CheckResponse(res); err != nil { return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnaddress.delete", "response", internallog.HTTPResponse(res, nil)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.recommendations.reportInteraction", "response", internallog.HTTPResponse(res, nil)) return nil } -type ReturnaddressGetCall struct { - s *APIService - merchantId uint64 - returnAddressId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionalinventoryCustombatchCall struct { + s *APIService + regionalinventorycustombatchrequest *RegionalinventoryCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a return address of the Merchant Center account. -// -// - merchantId: The Merchant Center account to get a return address for. -// - returnAddressId: Return address ID generated by Google. -func (r *ReturnaddressService) Get(merchantId uint64, returnAddressId string) *ReturnaddressGetCall { - c := &ReturnaddressGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.returnAddressId = returnAddressId +// Custombatch: Updates regional inventory for multiple products or regions in +// a single request. +func (r *RegionalinventoryService) Custombatch(regionalinventorycustombatchrequest *RegionalinventoryCustomBatchRequest) *RegionalinventoryCustombatchCall { + c := &RegionalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.regionalinventorycustombatchrequest = regionalinventorycustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnaddressGetCall) Fields(s ...googleapi.Field) *ReturnaddressGetCall { +func (c *RegionalinventoryCustombatchCall) Fields(s ...googleapi.Field) *RegionalinventoryCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ReturnaddressGetCall) IfNoneMatch(entityTag string) *ReturnaddressGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ReturnaddressGetCall) Context(ctx context.Context) *ReturnaddressGetCall { +func (c *RegionalinventoryCustombatchCall) Context(ctx context.Context) *RegionalinventoryCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnaddressGetCall) Header() http.Header { +func (c *RegionalinventoryCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnaddressGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionalinventorycustombatchrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnaddress/{returnAddressId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "regionalinventory/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnAddressId": c.returnAddressId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnaddress.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regionalinventory.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnaddress.get" call. +// Do executes the "content.regionalinventory.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnAddress.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 *ReturnaddressGetCall) Do(opts ...googleapi.CallOption) (*ReturnAddress, error) { +// *RegionalinventoryCustomBatchResponse.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 *RegionalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*RegionalinventoryCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25869,7 +24296,7 @@ func (c *ReturnaddressGetCall) Do(opts ...googleapi.CallOption) (*ReturnAddress, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnAddress{ + ret := &RegionalinventoryCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25880,61 +24307,68 @@ func (c *ReturnaddressGetCall) Do(opts ...googleapi.CallOption) (*ReturnAddress, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnaddress.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regionalinventory.custombatch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReturnaddressInsertCall struct { - s *APIService - merchantId uint64 - returnaddress *ReturnAddress - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionalinventoryInsertCall struct { + s *APIService + merchantId uint64 + productId string + regionalinventory *RegionalInventory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Inserts a return address for the Merchant Center account. +// Insert: Updates the regional inventory of a product in your Merchant Center +// account. If a regional inventory with the same region ID already exists, +// this method updates that entry. // -// - merchantId: The Merchant Center account to insert a return address for. -func (r *ReturnaddressService) Insert(merchantId uint64, returnaddress *ReturnAddress) *ReturnaddressInsertCall { - c := &ReturnaddressInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +// - productId: The REST ID of the product for which to update the regional +// inventory. +func (r *RegionalinventoryService) Insert(merchantId uint64, productId string, regionalinventory *RegionalInventory) *RegionalinventoryInsertCall { + c := &RegionalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnaddress = returnaddress + c.productId = productId + c.regionalinventory = regionalinventory return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnaddressInsertCall) Fields(s ...googleapi.Field) *ReturnaddressInsertCall { +func (c *RegionalinventoryInsertCall) Fields(s ...googleapi.Field) *RegionalinventoryInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReturnaddressInsertCall) Context(ctx context.Context) *ReturnaddressInsertCall { +func (c *RegionalinventoryInsertCall) Context(ctx context.Context) *RegionalinventoryInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnaddressInsertCall) Header() http.Header { +func (c *RegionalinventoryInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnaddressInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.returnaddress) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionalinventory) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnaddress") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/regionalinventory") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25943,17 +24377,19 @@ func (c *ReturnaddressInsertCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "productId": c.productId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnaddress.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regionalinventory.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnaddress.insert" call. +// Do executes the "content.regionalinventory.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnAddress.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 *ReturnaddressInsertCall) Do(opts ...googleapi.CallOption) (*ReturnAddress, error) { +// *RegionalInventory.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 *RegionalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*RegionalInventory, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25972,7 +24408,7 @@ func (c *ReturnaddressInsertCall) Do(opts ...googleapi.CallOption) (*ReturnAddre if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnAddress{ + ret := &RegionalInventory{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25983,109 +24419,87 @@ func (c *ReturnaddressInsertCall) Do(opts ...googleapi.CallOption) (*ReturnAddre if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnaddress.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regionalinventory.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReturnaddressListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionsCreateCall struct { + s *APIService + merchantId int64 + region *Region + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the return addresses of the Merchant Center account. +// Create: Creates a region definition in your Merchant Center account. // -// - merchantId: The Merchant Center account to list return addresses for. -func (r *ReturnaddressService) List(merchantId uint64) *ReturnaddressListCall { - c := &ReturnaddressListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The id of the merchant for which to create region definition. +func (r *RegionsService) Create(merchantId int64, region *Region) *RegionsCreateCall { + c := &RegionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.region = region return c } -// Country sets the optional parameter "country": List only return addresses -// applicable to the given country of sale. When omitted, all return addresses -// are listed. -func (c *ReturnaddressListCall) Country(country string) *ReturnaddressListCall { - c.urlParams_.Set("country", country) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// addresses in the response, used for paging. -func (c *ReturnaddressListCall) MaxResults(maxResults int64) *ReturnaddressListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *ReturnaddressListCall) PageToken(pageToken string) *ReturnaddressListCall { - c.urlParams_.Set("pageToken", pageToken) +// RegionId sets the optional parameter "regionId": Required. The id of the +// region to create. +func (c *RegionsCreateCall) RegionId(regionId string) *RegionsCreateCall { + c.urlParams_.Set("regionId", regionId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnaddressListCall) Fields(s ...googleapi.Field) *ReturnaddressListCall { +func (c *RegionsCreateCall) Fields(s ...googleapi.Field) *RegionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ReturnaddressListCall) IfNoneMatch(entityTag string) *ReturnaddressListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ReturnaddressListCall) Context(ctx context.Context) *ReturnaddressListCall { +func (c *RegionsCreateCall) Context(ctx context.Context) *RegionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnaddressListCall) Header() http.Header { +func (c *RegionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnaddressListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.region) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnaddress") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnaddress.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnaddress.list" call. +// Do executes the "content.regions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnaddressListResponse.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 *ReturnaddressListCall) Do(opts ...googleapi.CallOption) (*ReturnaddressListResponse, error) { +// *Region.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 *RegionsCreateCall) Do(opts ...googleapi.CallOption) (*Region, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26104,7 +24518,7 @@ func (c *ReturnaddressListCall) Do(opts ...googleapi.CallOption) (*Returnaddress if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnaddressListResponse{ + ret := &Region{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26115,232 +24529,241 @@ func (c *ReturnaddressListCall) Do(opts ...googleapi.CallOption) (*Returnaddress if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnaddress.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// 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 *ReturnaddressListCall) Pages(ctx context.Context, f func(*ReturnaddressListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ReturnpolicyCustombatchCall struct { - s *APIService - returnpolicycustombatchrequest *ReturnpolicyCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionsDeleteCall struct { + s *APIService + merchantId int64 + regionId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Batches multiple return policy related calls in a single -// request. -func (r *ReturnpolicyService) Custombatch(returnpolicycustombatchrequest *ReturnpolicyCustomBatchRequest) *ReturnpolicyCustombatchCall { - c := &ReturnpolicyCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.returnpolicycustombatchrequest = returnpolicycustombatchrequest +// Delete: Deletes a region definition from your Merchant Center account. +// +// - merchantId: The id of the merchant for which to delete region definition. +// - regionId: The id of the region to delete. +func (r *RegionsService) Delete(merchantId int64, regionId string) *RegionsDeleteCall { + c := &RegionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.regionId = regionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnpolicyCustombatchCall) Fields(s ...googleapi.Field) *ReturnpolicyCustombatchCall { +func (c *RegionsDeleteCall) Fields(s ...googleapi.Field) *RegionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReturnpolicyCustombatchCall) Context(ctx context.Context) *ReturnpolicyCustombatchCall { +func (c *RegionsDeleteCall) Context(ctx context.Context) *RegionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnpolicyCustombatchCall) Header() http.Header { +func (c *RegionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnpolicyCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.returnpolicycustombatchrequest) - if err != nil { - return nil, err - } +func (c *RegionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "returnpolicy/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions/{regionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnpolicy.custombatch", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "regionId": c.regionId, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnpolicy.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReturnpolicyCustomBatchResponse.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 *ReturnpolicyCustombatchCall) Do(opts ...googleapi.CallOption) (*ReturnpolicyCustomBatchResponse, error) { +// Do executes the "content.regions.delete" call. +func (c *RegionsDeleteCall) Do(opts ...googleapi.CallOption) 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, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ReturnpolicyCustomBatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err + return gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnpolicy.custombatch", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.delete", "response", internallog.HTTPResponse(res, nil)) + return nil } -type ReturnpolicyDeleteCall struct { - s *APIService - merchantId uint64 - returnPolicyId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionsGetCall struct { + s *APIService + merchantId int64 + regionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a return policy for the given Merchant Center account. +// Get: Retrieves a region defined in your Merchant Center account. // -// - merchantId: The Merchant Center account from which to delete the given -// return policy. -// - returnPolicyId: Return policy ID generated by Google. -func (r *ReturnpolicyService) Delete(merchantId uint64, returnPolicyId string) *ReturnpolicyDeleteCall { - c := &ReturnpolicyDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The id of the merchant for which to retrieve region +// definition. +// - regionId: The id of the region to retrieve. +func (r *RegionsService) Get(merchantId int64, regionId string) *RegionsGetCall { + c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnPolicyId = returnPolicyId + c.regionId = regionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnpolicyDeleteCall) Fields(s ...googleapi.Field) *ReturnpolicyDeleteCall { +func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ReturnpolicyDeleteCall) Context(ctx context.Context) *ReturnpolicyDeleteCall { +func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnpolicyDeleteCall) Header() http.Header { +func (c *RegionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnpolicyDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnpolicy/{returnPolicyId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions/{regionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnPolicyId": c.returnPolicyId, + "merchantId": strconv.FormatInt(c.merchantId, 10), + "regionId": c.regionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnpolicy.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnpolicy.delete" call. -func (c *ReturnpolicyDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.regions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Region.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 *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnpolicy.delete", "response", internallog.HTTPResponse(res, nil)) - return nil + ret := &Region{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type ReturnpolicyGetCall struct { - s *APIService - merchantId uint64 - returnPolicyId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionsListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Gets a return policy of the Merchant Center account. +// List: Lists the regions in your Merchant Center account. // -// - merchantId: The Merchant Center account to get a return policy for. -// - returnPolicyId: Return policy ID generated by Google. -func (r *ReturnpolicyService) Get(merchantId uint64, returnPolicyId string) *ReturnpolicyGetCall { - c := &ReturnpolicyGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The id of the merchant for which to list region definitions. +func (r *RegionsService) List(merchantId int64) *RegionsListCall { + c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnPolicyId = returnPolicyId + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// regions to return. The service may return fewer than this value. If +// unspecified, at most 50 rules will be returned. The maximum value is 1000; +// values above 1000 will be coerced to 1000. +func (c *RegionsListCall) PageSize(pageSize int64) *RegionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListRegions` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListRegions` must +// match the call that provided the page token. +func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { + 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 // details. -func (c *ReturnpolicyGetCall) Fields(s ...googleapi.Field) *ReturnpolicyGetCall { +func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26348,34 +24771,34 @@ func (c *ReturnpolicyGetCall) Fields(s ...googleapi.Field) *ReturnpolicyGetCall // IfNoneMatch sets an 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. -func (c *ReturnpolicyGetCall) IfNoneMatch(entityTag string) *ReturnpolicyGetCall { +func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReturnpolicyGetCall) Context(ctx context.Context) *ReturnpolicyGetCall { +func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnpolicyGetCall) Header() http.Header { +func (c *RegionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnpolicyGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnpolicy/{returnPolicyId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -26383,19 +24806,19 @@ func (c *ReturnpolicyGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnPolicyId": c.returnPolicyId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnpolicy.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnpolicy.get" call. +// Do executes the "content.regions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnPolicy.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 *ReturnpolicyGetCall) Do(opts ...googleapi.CallOption) (*ReturnPolicy, error) { +// *ListRegionsResponse.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 *RegionsListCall) Do(opts ...googleapi.CallOption) (*ListRegionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26414,7 +24837,7 @@ func (c *ReturnpolicyGetCall) Do(opts ...googleapi.CallOption) (*ReturnPolicy, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnPolicy{ + ret := &ListRegionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26425,80 +24848,113 @@ func (c *ReturnpolicyGetCall) Do(opts ...googleapi.CallOption) (*ReturnPolicy, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnpolicy.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReturnpolicyInsertCall struct { - s *APIService - merchantId uint64 - returnpolicy *ReturnPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *RegionsListCall) Pages(ctx context.Context, f func(*ListRegionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 RegionsPatchCall struct { + s *APIService + merchantId int64 + regionId string + region *Region + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Inserts a return policy for the Merchant Center account. +// Patch: Updates a region definition in your Merchant Center account. // -// - merchantId: The Merchant Center account to insert a return policy for. -func (r *ReturnpolicyService) Insert(merchantId uint64, returnpolicy *ReturnPolicy) *ReturnpolicyInsertCall { - c := &ReturnpolicyInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The id of the merchant for which to update region definition. +// - regionId: The id of the region to update. +func (r *RegionsService) Patch(merchantId int64, regionId string, region *Region) *RegionsPatchCall { + c := &RegionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnpolicy = returnpolicy + c.regionId = regionId + c.region = region + return c +} + +// UpdateMask sets the optional parameter "updateMask": The comma-separated +// field mask indicating the fields to update. Example: +// "displayName,postalCodeArea.regionCode". +func (c *RegionsPatchCall) UpdateMask(updateMask string) *RegionsPatchCall { + 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 // details. -func (c *ReturnpolicyInsertCall) Fields(s ...googleapi.Field) *ReturnpolicyInsertCall { +func (c *RegionsPatchCall) Fields(s ...googleapi.Field) *RegionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReturnpolicyInsertCall) Context(ctx context.Context) *ReturnpolicyInsertCall { +func (c *RegionsPatchCall) Context(ctx context.Context) *RegionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnpolicyInsertCall) Header() http.Header { +func (c *RegionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnpolicyInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.returnpolicy) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.region) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnpolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/regions/{regionId}") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "regionId": c.regionId, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnpolicy.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.regions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnpolicy.insert" call. +// Do executes the "content.regions.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnPolicy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *Region.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 *ReturnpolicyInsertCall) Do(opts ...googleapi.CallOption) (*ReturnPolicy, error) { +func (c *RegionsPatchCall) Do(opts ...googleapi.CallOption) (*Region, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26517,7 +24973,7 @@ func (c *ReturnpolicyInsertCall) Do(opts ...googleapi.CallOption) (*ReturnPolicy if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnPolicy{ + ret := &Region{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26528,87 +24984,82 @@ func (c *ReturnpolicyInsertCall) Do(opts ...googleapi.CallOption) (*ReturnPolicy if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnpolicy.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.regions.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReturnpolicyListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReportsSearchCall struct { + s *APIService + merchantId int64 + searchrequest *SearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the return policies of the Merchant Center account. +// Search: Retrieves merchant performance metrics matching the search query and +// optionally segmented by selected dimensions. // -// - merchantId: The Merchant Center account to list return policies for. -func (r *ReturnpolicyService) List(merchantId uint64) *ReturnpolicyListCall { - c := &ReturnpolicyListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: Id of the merchant making the call. Must be a standalone +// account or an MCA subaccount. +func (r *ReportsService) Search(merchantId int64, searchrequest *SearchRequest) *ReportsSearchCall { + c := &ReportsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.searchrequest = searchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReturnpolicyListCall) Fields(s ...googleapi.Field) *ReturnpolicyListCall { +func (c *ReportsSearchCall) Fields(s ...googleapi.Field) *ReportsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ReturnpolicyListCall) IfNoneMatch(entityTag string) *ReturnpolicyListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ReturnpolicyListCall) Context(ctx context.Context) *ReturnpolicyListCall { +func (c *ReportsSearchCall) Context(ctx context.Context) *ReportsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReturnpolicyListCall) Header() http.Header { +func (c *ReportsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReturnpolicyListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ReportsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.searchrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/returnpolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/reports/search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.returnpolicy.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "content.reports.search", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.returnpolicy.list" call. +// Do executes the "content.reports.search" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnpolicyListResponse.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 *ReturnpolicyListCall) Do(opts ...googleapi.CallOption) (*ReturnpolicyListResponse, error) { +// *SearchResponse.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 *ReportsSearchCall) Do(opts ...googleapi.CallOption) (*SearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26627,7 +25078,7 @@ func (c *ReturnpolicyListCall) Do(opts ...googleapi.CallOption) (*ReturnpolicyLi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnpolicyListResponse{ + ret := &SearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26638,10 +25089,31 @@ func (c *ReturnpolicyListCall) Do(opts ...googleapi.CallOption) (*ReturnpolicyLi if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.returnpolicy.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "content.reports.search", "response", internallog.HTTPResponse(res, b)) return ret, nil } +// 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 *ReportsSearchCall) Pages(ctx context.Context, f func(*SearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.searchrequest.PageToken = pt }(c.searchrequest.PageToken) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.searchrequest.PageToken = x.NextPageToken + } +} + type ReturnpolicyonlineCreateCall struct { s *APIService merchantId int64 diff --git a/dataform/v1/dataform-api.json b/dataform/v1/dataform-api.json index 4bbd6dcf6fe..61efca56b2a 100644 --- a/dataform/v1/dataform-api.json +++ b/dataform/v1/dataform-api.json @@ -2467,7 +2467,7 @@ } } }, - "revision": "20251102", + "revision": "20251111", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "ActionErrorTable": { @@ -4138,6 +4138,10 @@ }, "type": "array" }, + "connection": { + "description": "Optional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection can have the form `{project}.{location}.{connection_id}` or `projects/{project}/locations/{location}/connections/{connection_id}\", or be set to DEFAULT.", + "type": "string" + }, "dependencyTargets": { "description": "A list of actions that this action depends on.", "items": { @@ -4149,6 +4153,18 @@ "description": "Whether this action is disabled (i.e. should not be run).", "type": "boolean" }, + "fileFormat": { + "description": "Optional. The file format for the BigQuery table.", + "enum": [ + "FILE_FORMAT_UNSPECIFIED", + "PARQUET" + ], + "enumDescriptions": [ + "Default value.", + "Apache Parquet format." + ], + "type": "string" + }, "incrementalTableConfig": { "$ref": "IncrementalTableConfig", "description": "Configures `INCREMENTAL_TABLE` settings for this relation. Only set if `relation_type` is `INCREMENTAL_TABLE`." @@ -4206,6 +4222,22 @@ "description": "The SELECT query which returns rows which this relation should contain.", "type": "string" }, + "storageUri": { + "description": "Optional. The fully qualified location prefix of the external folder where table data is stored. The URI should be in the format `gs://bucket/path_to_table/`.", + "type": "string" + }, + "tableFormat": { + "description": "Optional. The table format for the BigQuery table.", + "enum": [ + "TABLE_FORMAT_UNSPECIFIED", + "ICEBERG" + ], + "enumDescriptions": [ + "Default value.", + "Apache Iceberg format." + ], + "type": "string" + }, "tags": { "description": "Arbitrary, user-defined tags on this action.", "items": { diff --git a/dataform/v1/dataform-gen.go b/dataform/v1/dataform-gen.go index 35ad579fcb9..e23c1616017 100644 --- a/dataform/v1/dataform-gen.go +++ b/dataform/v1/dataform-gen.go @@ -2650,10 +2650,22 @@ type Relation struct { // ClusterExpressions: A list of columns or SQL expressions used to cluster the // table. ClusterExpressions []string `json:"clusterExpressions,omitempty"` + // Connection: Optional. The connection specifying the credentials to be used + // to read and write to external storage, such as Cloud Storage. The connection + // can have the form `{project}.{location}.{connection_id}` or + // `projects/{project}/locations/{location}/connections/{connection_id}", or be + // set to DEFAULT. + Connection string `json:"connection,omitempty"` // DependencyTargets: A list of actions that this action depends on. DependencyTargets []*Target `json:"dependencyTargets,omitempty"` // Disabled: Whether this action is disabled (i.e. should not be run). Disabled bool `json:"disabled,omitempty"` + // FileFormat: Optional. The file format for the BigQuery table. + // + // Possible values: + // "FILE_FORMAT_UNSPECIFIED" - Default value. + // "PARQUET" - Apache Parquet format. + FileFormat string `json:"fileFormat,omitempty"` // IncrementalTableConfig: Configures `INCREMENTAL_TABLE` settings for this // relation. Only set if `relation_type` is `INCREMENTAL_TABLE`. IncrementalTableConfig *IncrementalTableConfig `json:"incrementalTableConfig,omitempty"` @@ -2682,6 +2694,16 @@ type Relation struct { // SelectQuery: The SELECT query which returns rows which this relation should // contain. SelectQuery string `json:"selectQuery,omitempty"` + // StorageUri: Optional. The fully qualified location prefix of the external + // folder where table data is stored. The URI should be in the format + // `gs://bucket/path_to_table/`. + StorageUri string `json:"storageUri,omitempty"` + // TableFormat: Optional. The table format for the BigQuery table. + // + // Possible values: + // "TABLE_FORMAT_UNSPECIFIED" - Default value. + // "ICEBERG" - Apache Iceberg format. + TableFormat string `json:"tableFormat,omitempty"` // Tags: Arbitrary, user-defined tags on this action. Tags []string `json:"tags,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalOptions") to diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 5d20432f0d8..4b3323bf17a 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -2467,7 +2467,7 @@ } } }, - "revision": "20251102", + "revision": "20251111", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "ActionErrorTable": { @@ -4138,6 +4138,10 @@ }, "type": "array" }, + "connection": { + "description": "Optional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection can have the form `{project}.{location}.{connection_id}` or `projects/{project}/locations/{location}/connections/{connection_id}\", or be set to DEFAULT.", + "type": "string" + }, "dependencyTargets": { "description": "A list of actions that this action depends on.", "items": { @@ -4149,6 +4153,18 @@ "description": "Whether this action is disabled (i.e. should not be run).", "type": "boolean" }, + "fileFormat": { + "description": "Optional. The file format for the BigQuery table.", + "enum": [ + "FILE_FORMAT_UNSPECIFIED", + "PARQUET" + ], + "enumDescriptions": [ + "Default value.", + "Apache Parquet format." + ], + "type": "string" + }, "incrementalTableConfig": { "$ref": "IncrementalTableConfig", "description": "Configures `INCREMENTAL_TABLE` settings for this relation. Only set if `relation_type` is `INCREMENTAL_TABLE`." @@ -4206,6 +4222,22 @@ "description": "The SELECT query which returns rows which this relation should contain.", "type": "string" }, + "storageUri": { + "description": "Optional. The fully qualified location prefix of the external folder where table data is stored. The URI should be in the format `gs://bucket/path_to_table/`.", + "type": "string" + }, + "tableFormat": { + "description": "Optional. The table format for the BigQuery table.", + "enum": [ + "TABLE_FORMAT_UNSPECIFIED", + "ICEBERG" + ], + "enumDescriptions": [ + "Default value.", + "Apache Iceberg format." + ], + "type": "string" + }, "tags": { "description": "Arbitrary, user-defined tags on this action.", "items": { diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index 898c61ccb0a..257fa99f0f6 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -2651,10 +2651,22 @@ type Relation struct { // ClusterExpressions: A list of columns or SQL expressions used to cluster the // table. ClusterExpressions []string `json:"clusterExpressions,omitempty"` + // Connection: Optional. The connection specifying the credentials to be used + // to read and write to external storage, such as Cloud Storage. The connection + // can have the form `{project}.{location}.{connection_id}` or + // `projects/{project}/locations/{location}/connections/{connection_id}", or be + // set to DEFAULT. + Connection string `json:"connection,omitempty"` // DependencyTargets: A list of actions that this action depends on. DependencyTargets []*Target `json:"dependencyTargets,omitempty"` // Disabled: Whether this action is disabled (i.e. should not be run). Disabled bool `json:"disabled,omitempty"` + // FileFormat: Optional. The file format for the BigQuery table. + // + // Possible values: + // "FILE_FORMAT_UNSPECIFIED" - Default value. + // "PARQUET" - Apache Parquet format. + FileFormat string `json:"fileFormat,omitempty"` // IncrementalTableConfig: Configures `INCREMENTAL_TABLE` settings for this // relation. Only set if `relation_type` is `INCREMENTAL_TABLE`. IncrementalTableConfig *IncrementalTableConfig `json:"incrementalTableConfig,omitempty"` @@ -2683,6 +2695,16 @@ type Relation struct { // SelectQuery: The SELECT query which returns rows which this relation should // contain. SelectQuery string `json:"selectQuery,omitempty"` + // StorageUri: Optional. The fully qualified location prefix of the external + // folder where table data is stored. The URI should be in the format + // `gs://bucket/path_to_table/`. + StorageUri string `json:"storageUri,omitempty"` + // TableFormat: Optional. The table format for the BigQuery table. + // + // Possible values: + // "TABLE_FORMAT_UNSPECIFIED" - Default value. + // "ICEBERG" - Apache Iceberg format. + TableFormat string `json:"tableFormat,omitempty"` // Tags: Arbitrary, user-defined tags on this action. Tags []string `json:"tags,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalOptions") to diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index c9bf4fe2c1a..d3cf7fba117 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -15,6 +15,198 @@ "description": "Cloud Data Fusion is a fully-managed, cloud native, enterprise data integration service for quickly building and managing data pipelines. It provides a graphical interface to increase time efficiency and reduce complexity, and allows business users, developers, and data scientists to easily and reliably build scalable data integration solutions to cleanse, prepare, blend, transfer and transform data without having to wrestle with infrastructure.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/data-fusion/docs", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-north2.rep.googleapis.com/", + "location": "europe-north2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west12.rep.googleapis.com/", + "location": "europe-west12" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east7.rep.googleapis.com/", + "location": "us-east7" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-west2.rep.googleapis.com/", + "location": "us-west2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -144,7 +336,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -681,6 +873,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}/operations", @@ -743,7 +940,7 @@ } } }, - "revision": "20251006", + "revision": "20251106", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -1303,6 +1500,13 @@ "$ref": "Operation" }, "type": "array" + }, + "unreachable": { + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index 71a2f8d03b0..9b2f03bed67 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -881,6 +881,11 @@ type ListOperationsResponse struct { // Operations: A list of operations that matches the specified filter in the // request. Operations []*Operation `json:"operations,omitempty"` + // Unreachable: Unordered list. Unreachable resources. Populated when the + // request sets `ListOperationsRequest.return_partial_success` and reads across + // collections e.g. when attempting to list all resources across all supported + // locations. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1677,9 +1682,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c @@ -3598,6 +3603,19 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/datafusion/v1beta1/datafusion-api.json b/datafusion/v1beta1/datafusion-api.json index 4333f5e2fdf..85b548c400e 100644 --- a/datafusion/v1beta1/datafusion-api.json +++ b/datafusion/v1beta1/datafusion-api.json @@ -15,6 +15,198 @@ "description": "Cloud Data Fusion is a fully-managed, cloud native, enterprise data integration service for quickly building and managing data pipelines. It provides a graphical interface to increase time efficiency and reduce complexity, and allows business users, developers, and data scientists to easily and reliably build scalable data integration solutions to cleanse, prepare, blend, transfer and transform data without having to wrestle with infrastructure.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/data-fusion/docs", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-north2.rep.googleapis.com/", + "location": "europe-north2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west12.rep.googleapis.com/", + "location": "europe-west12" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-east7.rep.googleapis.com/", + "location": "us-east7" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://datafusion.us-west2.rep.googleapis.com/", + "location": "us-west2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -144,7 +336,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -879,6 +1071,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1beta1/{+name}/operations", @@ -941,7 +1138,7 @@ } } }, - "revision": "20251006", + "revision": "20251106", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -1534,6 +1731,13 @@ "$ref": "Operation" }, "type": "array" + }, + "unreachable": { + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index 236ac1f8a20..dacf5da0295 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -944,6 +944,11 @@ type ListOperationsResponse struct { // Operations: A list of operations that matches the specified filter in the // request. Operations []*Operation `json:"operations,omitempty"` + // Unreachable: Unordered list. Unreachable resources. Populated when the + // request sets `ListOperationsRequest.return_partial_success` and reads across + // collections e.g. when attempting to list all resources across all supported + // locations. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1777,9 +1782,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c @@ -4421,6 +4426,19 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index f629795c12d..b78181435a2 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -7229,7 +7229,7 @@ } } }, - "revision": "20251104", + "revision": "20251113", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -10005,12 +10005,14 @@ "enum": [ "TRIGGER_UNSPECIFIED", "ON_DEMAND", - "SCHEDULE" + "SCHEDULE", + "ONE_TIME" ], "enumDescriptions": [ "An unspecified trigger type.", "Data scan triggers on demand.", - "Data scan triggers as per schedule." + "Data scan triggers as per schedule.", + "Data scan is run one time on creation." ], "type": "string" }, @@ -13954,6 +13956,10 @@ "$ref": "GoogleCloudDataplexV1TriggerOnDemand", "description": "The scan runs once via RunDataScan API." }, + "oneTime": { + "$ref": "GoogleCloudDataplexV1TriggerOneTime", + "description": "The scan runs once, and does not create an associated ScanJob child resource." + }, "schedule": { "$ref": "GoogleCloudDataplexV1TriggerSchedule", "description": "The scan is scheduled to run periodically." @@ -13967,6 +13973,18 @@ "properties": {}, "type": "object" }, + "GoogleCloudDataplexV1TriggerOneTime": { + "description": "The scan runs once using create API.", + "id": "GoogleCloudDataplexV1TriggerOneTime", + "properties": { + "ttlAfterScanCompletion": { + "description": "Optional. Time to live for OneTime scans. default value is 24 hours, minimum value is 0 seconds, and maximum value is 365 days. The time is calculated from the data scan job completion time. If value is set as 0 seconds, the scan will be immediately deleted upon job completion, regardless of whether the job succeeded or failed.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1TriggerSchedule": { "description": "The scan is scheduled to run periodically.", "id": "GoogleCloudDataplexV1TriggerSchedule", diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index bbf7c62bdcf..de9efc02564 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -3992,6 +3992,7 @@ type GoogleCloudDataplexV1DataScanEvent struct { // "TRIGGER_UNSPECIFIED" - An unspecified trigger type. // "ON_DEMAND" - Data scan triggers on demand. // "SCHEDULE" - Data scan triggers as per schedule. + // "ONE_TIME" - Data scan is run one time on creation. Trigger string `json:"trigger,omitempty"` // Type: The type of the data scan. // @@ -8486,6 +8487,9 @@ func (s GoogleCloudDataplexV1TaskTriggerSpec) MarshalJSON() ([]byte, error) { type GoogleCloudDataplexV1Trigger struct { // OnDemand: The scan runs once via RunDataScan API. OnDemand *GoogleCloudDataplexV1TriggerOnDemand `json:"onDemand,omitempty"` + // OneTime: The scan runs once, and does not create an associated ScanJob child + // resource. + OneTime *GoogleCloudDataplexV1TriggerOneTime `json:"oneTime,omitempty"` // Schedule: The scan is scheduled to run periodically. Schedule *GoogleCloudDataplexV1TriggerSchedule `json:"schedule,omitempty"` // ForceSendFields is a list of field names (e.g. "OnDemand") to @@ -8511,6 +8515,32 @@ func (s GoogleCloudDataplexV1Trigger) MarshalJSON() ([]byte, error) { type GoogleCloudDataplexV1TriggerOnDemand struct { } +// GoogleCloudDataplexV1TriggerOneTime: The scan runs once using create API. +type GoogleCloudDataplexV1TriggerOneTime struct { + // TtlAfterScanCompletion: Optional. Time to live for OneTime scans. default + // value is 24 hours, minimum value is 0 seconds, and maximum value is 365 + // days. The time is calculated from the data scan job completion time. If + // value is set as 0 seconds, the scan will be immediately deleted upon job + // completion, regardless of whether the job succeeded or failed. + TtlAfterScanCompletion string `json:"ttlAfterScanCompletion,omitempty"` + // ForceSendFields is a list of field names (e.g. "TtlAfterScanCompletion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TtlAfterScanCompletion") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1TriggerOneTime) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TriggerOneTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1TriggerSchedule: The scan is scheduled to run // periodically. type GoogleCloudDataplexV1TriggerSchedule struct { diff --git a/dialogflow/v2/dialogflow-api.json b/dialogflow/v2/dialogflow-api.json index cee808af360..9c7b7e85316 100644 --- a/dialogflow/v2/dialogflow-api.json +++ b/dialogflow/v2/dialogflow-api.json @@ -9258,7 +9258,7 @@ } } }, - "revision": "20251105", + "revision": "20251110", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -17345,7 +17345,7 @@ "type": "object" }, "GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig": { - "description": "Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION.", + "description": "Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION", "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig", "properties": { "baselineModelVersion": { @@ -19756,6 +19756,26 @@ "description": "Represents a conversation participant (human agent, virtual agent, end-user).", "id": "GoogleCloudDialogflowV2Participant", "properties": { + "agentDesktopSource": { + "description": "Optional. For tracking the utilization of prebuilt Agent Assist integration modules. This field is only inscope for Integration type that include UI Modules, Backend Modules, and Agent Desktop connector, it is out of scope for CCaaS and Direct Integration. For each human agent, prebuilt UI Modules needs to trigger the UpdateParticipant API to update this field. Both CreateParticipantRequest and UpdateParticipantRequest will be supported.", + "enum": [ + "AGENT_DESKTOP_SOURCE_UNSPECIFIED", + "LIVE_PERSON", + "GENESYS_CLOUD", + "TWILIO", + "SALESFORCE", + "OTHER" + ], + "enumDescriptions": [ + "Agent Desktop Source is not specified.", + "Agent Desktop Source is Live Person.", + "Agent Desktop Source is Genesys Cloud.", + "Agent Desktop Source is Twilio.", + "Agent Desktop Source is Salesforce.", + "UI Modules are in use but the desktop is either not currently released or setting this field to the applicable desktop." + ], + "type": "string" + }, "documentsMetadataFilters": { "additionalProperties": { "type": "string" diff --git a/dialogflow/v2/dialogflow-gen.go b/dialogflow/v2/dialogflow-gen.go index cd3632167a9..d750d2b2083 100644 --- a/dialogflow/v2/dialogflow-gen.go +++ b/dialogflow/v2/dialogflow-gen.go @@ -12114,7 +12114,7 @@ func (s GoogleCloudDialogflowV2HumanAgentAssistantConfig) MarshalJSON() ([]byte, // GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig: // Custom conversation models used in agent assist feature. Supported feature: -// ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION. +// ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION type GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig struct { // BaselineModelVersion: Version of current baseline model. It will be ignored // if model is set. Valid versions are: - Article Suggestion baseline model: - @@ -15570,6 +15570,24 @@ func (s GoogleCloudDialogflowV2OutputAudioConfig) MarshalJSON() ([]byte, error) // GoogleCloudDialogflowV2Participant: Represents a conversation participant // (human agent, virtual agent, end-user). type GoogleCloudDialogflowV2Participant struct { + // AgentDesktopSource: Optional. For tracking the utilization of prebuilt Agent + // Assist integration modules. This field is only inscope for Integration type + // that include UI Modules, Backend Modules, and Agent Desktop connector, it is + // out of scope for CCaaS and Direct Integration. For each human agent, + // prebuilt UI Modules needs to trigger the UpdateParticipant API to update + // this field. Both CreateParticipantRequest and UpdateParticipantRequest will + // be supported. + // + // Possible values: + // "AGENT_DESKTOP_SOURCE_UNSPECIFIED" - Agent Desktop Source is not + // specified. + // "LIVE_PERSON" - Agent Desktop Source is Live Person. + // "GENESYS_CLOUD" - Agent Desktop Source is Genesys Cloud. + // "TWILIO" - Agent Desktop Source is Twilio. + // "SALESFORCE" - Agent Desktop Source is Salesforce. + // "OTHER" - UI Modules are in use but the desktop is either not currently + // released or setting this field to the applicable desktop. + AgentDesktopSource string `json:"agentDesktopSource,omitempty"` // DocumentsMetadataFilters: Optional. Key-value filters on the metadata of // documents returned by article suggestion. If specified, article suggestion // only returns suggested documents that match all filters in their @@ -15616,15 +15634,15 @@ type GoogleCloudDialogflowV2Participant struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DocumentsMetadataFilters") - // to unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "AgentDesktopSource") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DocumentsMetadataFilters") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "AgentDesktopSource") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index 98712d05e78..9c59f83c870 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -8898,7 +8898,7 @@ } } }, - "revision": "20251105", + "revision": "20251110", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -22297,6 +22297,26 @@ "description": "Represents a conversation participant (human agent, virtual agent, end-user).", "id": "GoogleCloudDialogflowV2beta1Participant", "properties": { + "agentDesktopSource": { + "description": "Optional. For tracking the utilization of prebuilt Agent Assist integration modules. This field is only inscope for Integration type that include UI Modules, Backend Modules, and Agent Desktop connector, it is out of scope for CCaaS and Direct Integration. For each human agent, prebuilt UI Modules needs to trigger the UpdateParticipant API to update this field. Both CreateParticipantRequest and UpdateParticipantRequest will be supported.", + "enum": [ + "AGENT_DESKTOP_SOURCE_UNSPECIFIED", + "LIVE_PERSON", + "GENESYS_CLOUD", + "TWILIO", + "SALESFORCE", + "OTHER" + ], + "enumDescriptions": [ + "Agent Desktop Source is not specified.", + "Agent Desktop Source is Live Person.", + "Agent Desktop Source is Genesys Cloud.", + "Agent Desktop Source is Twilio.", + "Agent Desktop Source is Salesforce.", + "UI Modules are in use but the desktop is either not currently released or setting this field to the applicable desktop." + ], + "type": "string" + }, "documentsMetadataFilters": { "additionalProperties": { "type": "string" diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index c5367758332..601546b914d 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -19544,6 +19544,24 @@ func (s GoogleCloudDialogflowV2beta1OutputAudioConfig) MarshalJSON() ([]byte, er // GoogleCloudDialogflowV2beta1Participant: Represents a conversation // participant (human agent, virtual agent, end-user). type GoogleCloudDialogflowV2beta1Participant struct { + // AgentDesktopSource: Optional. For tracking the utilization of prebuilt Agent + // Assist integration modules. This field is only inscope for Integration type + // that include UI Modules, Backend Modules, and Agent Desktop connector, it is + // out of scope for CCaaS and Direct Integration. For each human agent, + // prebuilt UI Modules needs to trigger the UpdateParticipant API to update + // this field. Both CreateParticipantRequest and UpdateParticipantRequest will + // be supported. + // + // Possible values: + // "AGENT_DESKTOP_SOURCE_UNSPECIFIED" - Agent Desktop Source is not + // specified. + // "LIVE_PERSON" - Agent Desktop Source is Live Person. + // "GENESYS_CLOUD" - Agent Desktop Source is Genesys Cloud. + // "TWILIO" - Agent Desktop Source is Twilio. + // "SALESFORCE" - Agent Desktop Source is Salesforce. + // "OTHER" - UI Modules are in use but the desktop is either not currently + // released or setting this field to the applicable desktop. + AgentDesktopSource string `json:"agentDesktopSource,omitempty"` // DocumentsMetadataFilters: Optional. Key-value filters on the metadata of // documents returned by article suggestion. If specified, article suggestion // only returns suggested documents that match all filters in their @@ -19586,15 +19604,15 @@ type GoogleCloudDialogflowV2beta1Participant struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DocumentsMetadataFilters") - // to unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "AgentDesktopSource") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DocumentsMetadataFilters") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "AgentDesktopSource") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index bb9e6089211..28a9d62c7ee 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -3499,6 +3499,83 @@ ] } } + }, + "widgetConfigs": { + "methods": { + "get": { + "description": "Gets a WidgetConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/widgetConfigs/{widgetConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "acceptCache": { + "description": "Optional. Whether it's acceptable to load the widget config from cache. If set to true, recent changes on widget configs may take a few minutes to reflect on the end user's view. It's recommended to set to true for maturely developed widgets, as it improves widget performance. Set to false to see changes reflected in prod right away, if your widget is under development.", + "location": "query", + "type": "boolean" + }, + "getWidgetConfigRequestOption.turnOffCollectionComponents": { + "description": "Optional. Whether to turn off collection_components in WidgetConfig to reduce latency and data transmission.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Full WidgetConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/widgetConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, + "patch": { + "description": "Update a WidgetConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/widgetConfigs/{widgetConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/widgetConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided WidgetConfig to update. The following are the only supported fields: * WidgetConfig.enable_autocomplete If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + } + } } } }, @@ -4727,6 +4804,83 @@ } } } + }, + "widgetConfigs": { + "methods": { + "get": { + "description": "Gets a WidgetConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/widgetConfigs/{widgetConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.widgetConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "acceptCache": { + "description": "Optional. Whether it's acceptable to load the widget config from cache. If set to true, recent changes on widget configs may take a few minutes to reflect on the end user's view. It's recommended to set to true for maturely developed widgets, as it improves widget performance. Set to false to see changes reflected in prod right away, if your widget is under development.", + "location": "query", + "type": "boolean" + }, + "getWidgetConfigRequestOption.turnOffCollectionComponents": { + "description": "Optional. Whether to turn off collection_components in WidgetConfig to reduce latency and data transmission.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Full WidgetConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/widgetConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, + "patch": { + "description": "Update a WidgetConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/widgetConfigs/{widgetConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.widgetConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/widgetConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided WidgetConfig to update. The following are the only supported fields: * WidgetConfig.enable_autocomplete If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + } + } } } }, @@ -7252,6 +7406,83 @@ ] } } + }, + "widgetConfigs": { + "methods": { + "get": { + "description": "Gets a WidgetConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/widgetConfigs/{widgetConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.widgetConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "acceptCache": { + "description": "Optional. Whether it's acceptable to load the widget config from cache. If set to true, recent changes on widget configs may take a few minutes to reflect on the end user's view. It's recommended to set to true for maturely developed widgets, as it improves widget performance. Set to false to see changes reflected in prod right away, if your widget is under development.", + "location": "query", + "type": "boolean" + }, + "getWidgetConfigRequestOption.turnOffCollectionComponents": { + "description": "Optional. Whether to turn off collection_components in WidgetConfig to reduce latency and data transmission.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Full WidgetConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/widgetConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, + "patch": { + "description": "Update a WidgetConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/widgetConfigs/{widgetConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.widgetConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/widgetConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided WidgetConfig to update. The following are the only supported fields: * WidgetConfig.enable_autocomplete If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + } + } } } }, @@ -8108,6 +8339,36 @@ } }, "resources": { + "licenseConfigsUsageStats": { + "methods": { + "list": { + "description": "Lists all the LicenseConfigUsageStatss associated with the project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/userStores/{userStoresId}/licenseConfigsUsageStats", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/userStores/{user_store_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/userStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/licenseConfigsUsageStats", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + } + } + }, "userLicenses": { "methods": { "list": { @@ -8120,7 +8381,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filter for the list request. Supported fields: * `license_assignment_state` Examples: * `license_assignment_state = ASSIGNED` to list assigned user licenses. * `license_assignment_state = NO_LICENSE` to list not licensed users. * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.", + "description": "Optional. Filter for the list request. Supported fields: * `license`_`assignment`_`state` * `user_principal` * `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to list not licensed users. * `license`_`assignment`_`state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.", "location": "query", "type": "string" }, @@ -8267,7 +8528,7 @@ } } }, - "revision": "20251030", + "revision": "20251109", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GdataBlobstore2Info": { @@ -14107,6 +14368,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -14230,6 +14495,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1CmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -14304,6 +14574,23 @@ "$ref": "GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -15395,6 +15682,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1LicenseConfigUsageStats": { + "description": "Stats about users' licenses.", + "id": "GoogleCloudDiscoveryengineV1LicenseConfigUsageStats", + "properties": { + "licenseConfig": { + "description": "Required. The LicenseConfig name.", + "type": "string" + }, + "usedLicenseCount": { + "description": "Required. The number of licenses used.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1ListCmekConfigsResponse": { "description": "Response message for CmekConfigService.ListCmekConfigs method.", "id": "GoogleCloudDiscoveryengineV1ListCmekConfigsResponse", @@ -15549,6 +15852,20 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse": { + "description": "Response message for UserLicenseService.ListLicenseConfigUsageStats method.", + "id": "GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse", + "properties": { + "licenseConfigUsageStats": { + "description": "All the customer's LicenseConfigUsageStats.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1LicenseConfigUsageStats" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1ListSchemasResponse": { "description": "Response message for SchemaService.ListSchemas method.", "id": "GoogleCloudDiscoveryengineV1ListSchemasResponse", @@ -18750,29 +19067,757 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1WorkspaceConfig": { - "description": "Config to store data store type configuration for workspace data", - "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "GoogleCloudDiscoveryengineV1WidgetConfig": { + "description": "WidgetConfig captures configs at the Widget level.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfig", "properties": { - "dasherCustomerId": { - "description": "Obfuscated Dasher customer ID.", - "type": "string" + "accessSettings": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings", + "description": "Will be used for all widget access settings seen in cloud console integration page. Replaces top deprecated top level properties." }, - "superAdminEmailAddress": { - "description": "Optional. The super admin email address for the workspace that will be used for access token generation. For now we only use it for Native Google Drive connector data ingestion.", - "type": "string" + "allowPublicAccess": { + "deprecated": true, + "description": "Whether allow no-auth integration with widget. If set true, public access to search or other solutions from widget is allowed without authenication token provided by customer hosted backend server.", + "type": "boolean" }, - "superAdminServiceAccount": { - "description": "Optional. The super admin service account for the workspace that will be used for access token generation. For now we only use it for Native Google Drive connector data ingestion.", - "type": "string" + "allowlistedDomains": { + "deprecated": true, + "description": "Allowlisted domains that can load this widget.", + "items": { + "type": "string" + }, + "type": "array" }, - "type": { - "description": "The Google Workspace data source.", - "enum": [ - "TYPE_UNSPECIFIED", - "GOOGLE_DRIVE", - "GOOGLE_MAIL", - "GOOGLE_SITES", + "assistantSettings": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings", + "description": "Optional. Output only. Describes the assistant settings of the widget.", + "readOnly": true + }, + "collectionComponents": { + "description": "Output only. Collection components that lists all collections and child data stores associated with the widget config, those data sources can be used for filtering in widget service APIs, users can return results that from selected data sources.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent" + }, + "readOnly": true, + "type": "array" + }, + "configId": { + "description": "Output only. Unique obfuscated identifier of a WidgetConfig.", + "readOnly": true, + "type": "string" + }, + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "deprecated": true, + "description": "The content search spec that configs the desired behavior of content search." + }, + "createTime": { + "description": "Output only. Timestamp the WidgetConfig was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "customerProvidedConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig", + "description": "Optional. Output only. Describes the customer related configurations, currently only used for government customers. This field cannot be modified after project onboarding.", + "readOnly": true + }, + "dataStoreType": { + "description": "Output only. The type of the parent data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "SITE_SEARCH", + "STRUCTURED", + "UNSTRUCTURED", + "BLENDED" + ], + "enumDescriptions": [ + "Unspecified data store type.", + "The parent data store contains a site search engine.", + "The parent data store contains a search engine for structured data.", + "The parent data store contains a search engine for unstructured data.", + "The parent data store is served for blended search with multiple data stores." + ], + "readOnly": true, + "type": "string" + }, + "dataStoreUiConfigs": { + "deprecated": true, + "description": "Configurable UI configurations per data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig" + }, + "type": "array" + }, + "defaultSearchRequestOrderBy": { + "deprecated": true, + "description": "The default ordering for search results if specified. Used to set SearchRequest#order_by on applicable requests. https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/search#request-body", + "type": "string" + }, + "displayName": { + "description": "Required. The human readable widget config display name. Used in Discovery UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "enableAutocomplete": { + "deprecated": true, + "description": "Whether or not to enable autocomplete.", + "type": "boolean" + }, + "enableConversationalSearch": { + "deprecated": true, + "description": "Whether to allow conversational search (LLM, multi-turn) or not (non-LLM, single-turn).", + "type": "boolean" + }, + "enablePrivateKnowledgeGraph": { + "description": "Optional. Output only. Whether to enable private knowledge graph.", + "readOnly": true, + "type": "boolean" + }, + "enableQualityFeedback": { + "deprecated": true, + "description": "Turn on or off collecting the search result quality feedback from end users.", + "type": "boolean" + }, + "enableResultScore": { + "description": "Whether to show the result score.", + "type": "boolean" + }, + "enableSafeSearch": { + "deprecated": true, + "description": "Whether to enable safe search.", + "type": "boolean" + }, + "enableSearchAsYouType": { + "deprecated": true, + "description": "Whether to enable search-as-you-type behavior for the search widget", + "type": "boolean" + }, + "enableSnippetResultSummary": { + "deprecated": true, + "description": "Turn on or off summary for each snippets result.", + "type": "boolean" + }, + "enableSummarization": { + "deprecated": true, + "description": "Turn on or off summarization for the search response.", + "type": "boolean" + }, + "enableWebApp": { + "deprecated": true, + "description": "Whether to enable standalone web app.", + "type": "boolean" + }, + "facetField": { + "deprecated": true, + "description": "The configuration and appearance of facets in the end user view.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigFacetField" + }, + "type": "array" + }, + "fieldsUiComponentsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField" + }, + "deprecated": true, + "description": "The key is the UI component. Mock. Currently supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, `custom3`. The value is the name of the field along with its device visibility. The 3 custom fields are optional and can be added or removed. `title`, `thumbnail`, `url` are required UI components that cannot be removed.", + "type": "object" + }, + "geminiBundle": { + "description": "Output only. Whether the subscription is gemini bundle or not.", + "readOnly": true, + "type": "boolean" + }, + "homepageSetting": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting", + "description": "Optional. Describes the homepage settings of the widget." + }, + "industryVertical": { + "description": "Output only. The industry vertical that the WidgetConfig registers. The WidgetConfig industry vertical is based on the associated Engine.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "readOnly": true, + "type": "string" + }, + "llmEnabled": { + "description": "Output only. Whether LLM is enabled in the corresponding data store.", + "readOnly": true, + "type": "boolean" + }, + "minimumDataTermAccepted": { + "description": "Output only. Whether the customer accepted data use terms.", + "readOnly": true, + "type": "boolean" + }, + "name": { + "description": "Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "resultDisplayType": { + "deprecated": true, + "description": "The type of snippet to display in UCS widget. - RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new non-enterprise search users. - EXTRACTIVE_ANSWER for new enterprise search users.", + "enum": [ + "RESULT_DISPLAY_TYPE_UNSPECIFIED", + "SNIPPET", + "EXTRACTIVE_ANSWER" + ], + "enumDescriptions": [ + "Unspecified display type (default to showing snippet).", + "Display results from the snippet field.", + "Display results from extractive answers field." + ], + "type": "string" + }, + "solutionType": { + "description": "Required. Immutable. Specifies the solution type that this WidgetConfig can be used for.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "uiBranding": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings", + "description": "Describes search widget UI branding settings, such as the widget title, logo, favicons, and colors." + }, + "uiSettings": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigUiSettings", + "description": "Describes general widget search settings as seen in cloud console widget configuration page. Replaces top deprecated top level properties." + }, + "updateTime": { + "description": "Output only. Timestamp the WidgetConfig was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings": { + "description": "Describes widget access settings.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings", + "properties": { + "allowPublicAccess": { + "description": "Whether public unauthenticated access is allowed.", + "type": "boolean" + }, + "allowlistedDomains": { + "description": "List of domains that are allowed to integrate the search widget.", + "items": { + "type": "string" + }, + "type": "array" + }, + "enableWebApp": { + "description": "Whether web app access is enabled.", + "type": "boolean" + }, + "languageCode": { + "description": "Optional. Language code for user interface. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). If unset, the default language code is \"en-US\".", + "type": "string" + }, + "workforceIdentityPoolProvider": { + "description": "Optional. The workforce identity pool provider used to access the widget.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings": { + "description": "Describes the assistant settings of the widget.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings", + "properties": { + "defaultWebGroundingToggleOff": { + "description": "Output only. This field controls the default web grounding toggle for end users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.", + "readOnly": true, + "type": "boolean" + }, + "disableLocationContext": { + "description": "Optional. Output only. Whether to disable user location context.", + "readOnly": true, + "type": "boolean" + }, + "googleSearchGroundingEnabled": { + "deprecated": true, + "description": "Whether or not the Google search grounding toggle is shown. Deprecated. Use web_grounding_type instead.", + "type": "boolean" + }, + "webGroundingType": { + "description": "Optional. The type of web grounding to use.", + "enum": [ + "WEB_GROUNDING_TYPE_UNSPECIFIED", + "WEB_GROUNDING_TYPE_DISABLED", + "WEB_GROUNDING_TYPE_GOOGLE_SEARCH", + "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" + ], + "enumDescriptions": [ + "Default, unspecified setting. This is the same as disabled.", + "Web grounding is disabled.", + "Grounding with Google Search is enabled.", + "Grounding with Enterprise Web Search is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent": { + "description": "Read-only collection component that contains data store collections fields that may be used for filtering", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent", + "properties": { + "connectorIconLink": { + "description": "Output only. The icon link of the connector source.", + "readOnly": true, + "type": "string" + }, + "dataSource": { + "description": "The name of the data source, retrieved from `Collection.data_connector.data_source`.", + "type": "string" + }, + "dataSourceDisplayName": { + "description": "Output only. The display name of the data source.", + "readOnly": true, + "type": "string" + }, + "dataStoreComponents": { + "description": "For the data store collection, list of the children data stores.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent" + }, + "type": "array" + }, + "displayName": { + "description": "The display name of the collection.", + "type": "string" + }, + "id": { + "description": "Output only. the identifier of the collection, used for widget service. For now it refers to collection_id, in the future we will migrate the field to encrypted collection name UUID.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "The name of the collection. It should be collection resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}`. For APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the project number and location part is erased in this field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig": { + "description": "Customer provided configurations.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig", + "properties": { + "customerType": { + "description": "Customer type.", + "enum": [ + "DEFAULT_CUSTOMER", + "GOVERNMENT_CUSTOMER" + ], + "enumDescriptions": [ + "Default customer type.", + "Government customer type. Some features are disabled for government customers due to legal requirements." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent": { + "description": "Read-only data store component that contains data stores fields that may be used for filtering, it's the child of `CollectionComponent`.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent", + "properties": { + "dataStoreConfigType": { + "description": "Output only. The type of the data store config.", + "enum": [ + "DATA_STORE_CONFIG_TYPE_UNSPECIFIED", + "ALLOW_DB_CONFIG", + "THIRD_PARTY_OAUTH_CONFIG", + "NOTEBOOKLM_CONFIG" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data store is connected to AlloyDB", + "The data store is a connected to a third party data source.", + "The data store is a connected to NotebookLM Enterprise." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The display name of the data store.", + "type": "string" + }, + "entityName": { + "description": "The name of the entity, retrieved from `Collection.data_connector.entities.entityName`.", + "type": "string" + }, + "id": { + "description": "Output only. the identifier of the data store, used for widget service. For now it refers to data_store_id, in the future we will migrate the field to encrypted data store name UUID.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "The name of the data store. It should be data store resource name Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. For APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the project number and location part is erased in this field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig": { + "description": "UI component configuration for data store.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig", + "properties": { + "facetField": { + "description": "Facet fields that store the mapping of fields to end user widget appearance.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigFacetField" + }, + "type": "array" + }, + "fieldsUiComponentsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField" + }, + "description": "The key is the UI component. Mock. Currently supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, `custom3`. The value is the name of the field along with its device visibility. The 3 custom fields are optional and can be added or removed. `title`, `thumbnail`, `url` are required UI components that cannot be removed.", + "type": "object" + }, + "id": { + "description": "Output only. the identifier of the data store, used for widget service. For now it refers to data_store_id, in the future we will migrate the field to encrypted data store name UUID.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "The name of the data store. It should be data store resource name Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. For APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the project number and location part is erased in this field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigFacetField": { + "description": "Facet fields that store the mapping of fields to end user widget appearance.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigFacetField", + "properties": { + "displayName": { + "description": "Optional. The field name that end users will see.", + "type": "string" + }, + "field": { + "description": "Required. Registered field name. The format is `field.abc`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting": { + "description": "Describes the homepage setting of the widget. It includes all homepage related settings and configurations, such as shortcuts.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting", + "properties": { + "shortcuts": { + "description": "Optional. The shortcuts to display on the homepage.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut": { + "description": "Describes an entity of shortcut (aka pinned content) on the homepage. The home page will render these shortcuts in the same order as what the API returns. If a customer wants to reorder or remove a shortcut, the UI should always provide the new full list of shortcuts.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut", + "properties": { + "destinationUri": { + "description": "Optional. Destination URL of shortcut.", + "type": "string" + }, + "icon": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigImage", + "description": "Optional. Icon URL of shortcut." + }, + "title": { + "description": "Optional. Title of the shortcut.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigImage": { + "description": "Options to store an image.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigImage", + "properties": { + "url": { + "description": "Image URL.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField": { + "description": "Facet field that maps to a UI Component.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField", + "properties": { + "deviceVisibility": { + "description": "The field visibility on different types of devices.", + "items": { + "enum": [ + "DEVICE_VISIBILITY_UNSPECIFIED", + "MOBILE", + "DESKTOP" + ], + "enumDescriptions": [ + "Default value when not specified. Server returns INVALID_ARGUMENT if used in requests.", + "The UI component is visible on Mobile devices.", + "The UI component is visible on Browser-based client." + ], + "type": "string" + }, + "type": "array" + }, + "displayTemplate": { + "description": "The template to customize how the field is displayed. An example value would be a string that looks like: \"Price: {value}\".", + "type": "string" + }, + "field": { + "description": "Required. Registered field name. The format is `field.abc`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings": { + "description": "Describes widget UI branding settings.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings", + "properties": { + "logo": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigImage", + "description": "Logo image." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigUiSettings": { + "description": "Describes general widget (or web app) UI settings as seen in the cloud console UI configuration page.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigUiSettings", + "properties": { + "dataStoreUiConfigs": { + "description": "Per data store configuration.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig" + }, + "type": "array" + }, + "defaultSearchRequestOrderBy": { + "description": "The default ordering for search results if specified. Used to set SearchRequest#order_by on applicable requests. https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/search#request-body", + "type": "string" + }, + "disableUserEventsCollection": { + "description": "If set to true, the widget will not collect user events.", + "type": "boolean" + }, + "enableAutocomplete": { + "description": "Whether or not to enable autocomplete.", + "type": "boolean" + }, + "enableCreateAgentButton": { + "description": "Optional. If set to true, the widget will enable the create agent button.", + "type": "boolean" + }, + "enablePeopleSearch": { + "description": "Optional. If set to true, the widget will enable people search.", + "type": "boolean" + }, + "enableQualityFeedback": { + "description": "Turn on or off collecting the search result quality feedback from end users.", + "type": "boolean" + }, + "enableSafeSearch": { + "description": "Whether to enable safe search.", + "type": "boolean" + }, + "enableSearchAsYouType": { + "description": "Whether to enable search-as-you-type behavior for the search widget.", + "type": "boolean" + }, + "enableVisualContentSummary": { + "description": "If set to true, the widget will enable visual content summary on applicable search requests. Only used by healthcare search.", + "type": "boolean" + }, + "features": { + "additionalProperties": { + "enum": [ + "FEATURE_STATE_UNSPECIFIED", + "FEATURE_STATE_ON", + "FEATURE_STATE_OFF" + ], + "enumDescriptions": [ + "The feature state is unspecified.", + "The feature is turned on to be accessible.", + "The feature is turned off to be inaccessible." + ], + "type": "string" + }, + "description": "Output only. Feature config for the engine to opt in or opt out of features. Supported keys: * `agent-gallery` * `no-code-agent-builder` * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-org-chart` * `bi-directional-audio` * `feedback` * `session-sharing` * `personalization-memory` * `disable-agent-sharing` * `disable-image-generation` * `disable-video-generation` * `disable-onedrive-upload` * `disable-talk-to-content` * `disable-google-drive-upload`", + "readOnly": true, + "type": "object" + }, + "generativeAnswerConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig", + "description": "Describes generative answer configuration." + }, + "interactionType": { + "description": "Describes widget (or web app) interaction type", + "enum": [ + "INTERACTION_TYPE_UNSPECIFIED", + "SEARCH_ONLY", + "SEARCH_WITH_ANSWER", + "SEARCH_WITH_FOLLOW_UPS" + ], + "enumDescriptions": [ + "Not specified. Defaults to SEARCH_ONLY.", + "Search without a generative answer.", + "Search with the generative answer.", + "Search with the generative answer that supports follow up questions. Also known as multi-turn search." + ], + "type": "string" + }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Output only. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "readOnly": true, + "type": "object" + }, + "resultDescriptionType": { + "description": "Controls whether result extract is display and how (snippet or extractive answer). Default to no result if unspecified.", + "enum": [ + "RESULT_DISPLAY_TYPE_UNSPECIFIED", + "SNIPPET", + "EXTRACTIVE_ANSWER" + ], + "enumDescriptions": [ + "Unspecified display type (default to showing snippet).", + "Display results from the snippet field.", + "Display results from extractive answers field." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig": { + "description": "Describes configuration for generative answer.", + "id": "GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig", + "properties": { + "disableRelatedQuestions": { + "description": "Whether generated answer contains suggested related questions.", + "type": "boolean" + }, + "ignoreAdversarialQuery": { + "description": "Optional. Specifies whether to filter out queries that are adversarial.", + "type": "boolean" + }, + "ignoreLowRelevantContent": { + "description": "Optional. Specifies whether to filter out queries that are not relevant to the content.", + "type": "boolean" + }, + "ignoreNonAnswerSeekingQuery": { + "description": "Optional. Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.", + "type": "boolean" + }, + "imageSource": { + "description": "Optional. Source of image returned in the answer.", + "enum": [ + "IMAGE_SOURCE_UNSPECIFIED", + "ALL_AVAILABLE_SOURCES", + "CORPUS_IMAGE_ONLY", + "FIGURE_GENERATION_ONLY" + ], + "enumDescriptions": [ + "Unspecified image source (multimodal feature is disabled by default)", + "Behavior when service determines the pick from all available sources.", + "Include image from corpus in the answer.", + "Triggers figure generation in the answer." + ], + "type": "string" + }, + "languageCode": { + "description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", + "type": "string" + }, + "maxRephraseSteps": { + "description": "Max rephrase steps. The max number is 5 steps. If not set or set to \u003c 1, it will be set to 1 by default.", + "format": "int32", + "type": "integer" + }, + "modelPromptPreamble": { + "description": "Text at the beginning of the prompt that instructs the model that generates the answer.", + "type": "string" + }, + "modelVersion": { + "description": "The model version used to generate the answer.", + "type": "string" + }, + "resultCount": { + "description": "The number of top results to generate the answer from. Up to 10.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1WorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "superAdminEmailAddress": { + "description": "Optional. The super admin email address for the workspace that will be used for access token generation. For now we only use it for Native Google Drive connector data ingestion.", + "type": "string" + }, + "superAdminServiceAccount": { + "description": "Optional. The super admin service account for the workspace that will be used for access token generation. For now we only use it for Native Google Drive connector data ingestion.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", "GOOGLE_CALENDAR", "GOOGLE_CHAT", "GOOGLE_GROUPS", @@ -21925,6 +22970,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -22027,6 +23076,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -22101,6 +23155,23 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -26573,6 +27644,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -26675,6 +27750,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -26749,6 +27829,23 @@ "$ref": "GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index d7b59e877e4..2b3e686d28f 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -312,6 +312,7 @@ func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocat rs.SiteSearchEngine = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineService(s) rs.SuggestionDenyListEntries = NewProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService(s) rs.UserEvents = NewProjectsLocationsCollectionsDataStoresUserEventsService(s) + rs.WidgetConfigs = NewProjectsLocationsCollectionsDataStoresWidgetConfigsService(s) return rs } @@ -345,6 +346,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { SuggestionDenyListEntries *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService UserEvents *ProjectsLocationsCollectionsDataStoresUserEventsService + + WidgetConfigs *ProjectsLocationsCollectionsDataStoresWidgetConfigsService } func NewProjectsLocationsCollectionsDataStoresBranchesService(s *Service) *ProjectsLocationsCollectionsDataStoresBranchesService { @@ -581,6 +584,15 @@ type ProjectsLocationsCollectionsDataStoresUserEventsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresWidgetConfigsService(s *Service) *ProjectsLocationsCollectionsDataStoresWidgetConfigsService { + rs := &ProjectsLocationsCollectionsDataStoresWidgetConfigsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresWidgetConfigsService struct { + s *Service +} + func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocationsCollectionsEnginesService { rs := &ProjectsLocationsCollectionsEnginesService{s: s} rs.Assistants = NewProjectsLocationsCollectionsEnginesAssistantsService(s) @@ -590,6 +602,7 @@ func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocation rs.Operations = NewProjectsLocationsCollectionsEnginesOperationsService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsEnginesServingConfigsService(s) rs.Sessions = NewProjectsLocationsCollectionsEnginesSessionsService(s) + rs.WidgetConfigs = NewProjectsLocationsCollectionsEnginesWidgetConfigsService(s) return rs } @@ -609,6 +622,8 @@ type ProjectsLocationsCollectionsEnginesService struct { ServingConfigs *ProjectsLocationsCollectionsEnginesServingConfigsService Sessions *ProjectsLocationsCollectionsEnginesSessionsService + + WidgetConfigs *ProjectsLocationsCollectionsEnginesWidgetConfigsService } func NewProjectsLocationsCollectionsEnginesAssistantsService(s *Service) *ProjectsLocationsCollectionsEnginesAssistantsService { @@ -686,6 +701,15 @@ type ProjectsLocationsCollectionsEnginesSessionsAnswersService struct { s *Service } +func NewProjectsLocationsCollectionsEnginesWidgetConfigsService(s *Service) *ProjectsLocationsCollectionsEnginesWidgetConfigsService { + rs := &ProjectsLocationsCollectionsEnginesWidgetConfigsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsEnginesWidgetConfigsService struct { + s *Service +} + func NewProjectsLocationsCollectionsOperationsService(s *Service) *ProjectsLocationsCollectionsOperationsService { rs := &ProjectsLocationsCollectionsOperationsService{s: s} return rs @@ -710,6 +734,7 @@ func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataSto rs.SiteSearchEngine = NewProjectsLocationsDataStoresSiteSearchEngineService(s) rs.SuggestionDenyListEntries = NewProjectsLocationsDataStoresSuggestionDenyListEntriesService(s) rs.UserEvents = NewProjectsLocationsDataStoresUserEventsService(s) + rs.WidgetConfigs = NewProjectsLocationsDataStoresWidgetConfigsService(s) return rs } @@ -741,6 +766,8 @@ type ProjectsLocationsDataStoresService struct { SuggestionDenyListEntries *ProjectsLocationsDataStoresSuggestionDenyListEntriesService UserEvents *ProjectsLocationsDataStoresUserEventsService + + WidgetConfigs *ProjectsLocationsDataStoresWidgetConfigsService } func NewProjectsLocationsDataStoresBranchesService(s *Service) *ProjectsLocationsDataStoresBranchesService { @@ -932,6 +959,15 @@ type ProjectsLocationsDataStoresUserEventsService struct { s *Service } +func NewProjectsLocationsDataStoresWidgetConfigsService(s *Service) *ProjectsLocationsDataStoresWidgetConfigsService { + rs := &ProjectsLocationsDataStoresWidgetConfigsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresWidgetConfigsService struct { + s *Service +} + func NewProjectsLocationsGroundingConfigsService(s *Service) *ProjectsLocationsGroundingConfigsService { rs := &ProjectsLocationsGroundingConfigsService{s: s} return rs @@ -1021,6 +1057,7 @@ type ProjectsLocationsUserEventsService struct { func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserStoresService { rs := &ProjectsLocationsUserStoresService{s: s} + rs.LicenseConfigsUsageStats = NewProjectsLocationsUserStoresLicenseConfigsUsageStatsService(s) rs.UserLicenses = NewProjectsLocationsUserStoresUserLicensesService(s) return rs } @@ -1028,9 +1065,20 @@ func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserSto type ProjectsLocationsUserStoresService struct { s *Service + LicenseConfigsUsageStats *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService + UserLicenses *ProjectsLocationsUserStoresUserLicensesService } +func NewProjectsLocationsUserStoresLicenseConfigsUsageStatsService(s *Service) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService { + rs := &ProjectsLocationsUserStoresLicenseConfigsUsageStatsService{s: s} + return rs +} + +type ProjectsLocationsUserStoresLicenseConfigsUsageStatsService struct { + s *Service +} + func NewProjectsLocationsUserStoresUserLicensesService(s *Service) *ProjectsLocationsUserStoresUserLicensesService { rs := &ProjectsLocationsUserStoresUserLicensesService{s: s} return rs @@ -8857,6 +8905,9 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutPars // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -9012,6 +9063,8 @@ type GoogleCloudDiscoveryengineV1Engine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1EngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1CmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1EngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -9065,6 +9118,14 @@ type GoogleCloudDiscoveryengineV1Engine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -10682,6 +10743,31 @@ func (s GoogleCloudDiscoveryengineV1LicenseConfig) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1LicenseConfigUsageStats: Stats about users' +// licenses. +type GoogleCloudDiscoveryengineV1LicenseConfigUsageStats struct { + // LicenseConfig: Required. The LicenseConfig name. + LicenseConfig string `json:"licenseConfig,omitempty"` + // UsedLicenseCount: Required. The number of licenses used. + UsedLicenseCount int64 `json:"usedLicenseCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "LicenseConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LicenseConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1LicenseConfigUsageStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1LicenseConfigUsageStats + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1ListCmekConfigsResponse: Response message for // CmekConfigService.ListCmekConfigs method. type GoogleCloudDiscoveryengineV1ListCmekConfigsResponse struct { @@ -10936,6 +11022,32 @@ func (s GoogleCloudDiscoveryengineV1ListIdentityMappingsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse: Response +// message for UserLicenseService.ListLicenseConfigUsageStats method. +type GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse struct { + // LicenseConfigUsageStats: All the customer's LicenseConfigUsageStats. + LicenseConfigUsageStats []*GoogleCloudDiscoveryengineV1LicenseConfigUsageStats `json:"licenseConfigUsageStats,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "LicenseConfigUsageStats") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LicenseConfigUsageStats") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1ListSchemasResponse: Response message for // SchemaService.ListSchemas method. type GoogleCloudDiscoveryengineV1ListSchemasResponse struct { @@ -15719,6 +15831,722 @@ func (s GoogleCloudDiscoveryengineV1UserStore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1WidgetConfig: WidgetConfig captures configs at +// the Widget level. +type GoogleCloudDiscoveryengineV1WidgetConfig struct { + // AccessSettings: Will be used for all widget access settings seen in cloud + // console integration page. Replaces top deprecated top level properties. + AccessSettings *GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings `json:"accessSettings,omitempty"` + // AllowPublicAccess: Whether allow no-auth integration with widget. If set + // true, public access to search or other solutions from widget is allowed + // without authenication token provided by customer hosted backend server. + AllowPublicAccess bool `json:"allowPublicAccess,omitempty"` + // AllowlistedDomains: Allowlisted domains that can load this widget. + AllowlistedDomains []string `json:"allowlistedDomains,omitempty"` + // AssistantSettings: Optional. Output only. Describes the assistant settings + // of the widget. + AssistantSettings *GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings `json:"assistantSettings,omitempty"` + // CollectionComponents: Output only. Collection components that lists all + // collections and child data stores associated with the widget config, those + // data sources can be used for filtering in widget service APIs, users can + // return results that from selected data sources. + CollectionComponents []*GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent `json:"collectionComponents,omitempty"` + // ConfigId: Output only. Unique obfuscated identifier of a WidgetConfig. + ConfigId string `json:"configId,omitempty"` + // ContentSearchSpec: The content search spec that configs the desired behavior + // of content search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // CreateTime: Output only. Timestamp the WidgetConfig was created. + CreateTime string `json:"createTime,omitempty"` + // CustomerProvidedConfig: Optional. Output only. Describes the customer + // related configurations, currently only used for government customers. This + // field cannot be modified after project onboarding. + CustomerProvidedConfig *GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig `json:"customerProvidedConfig,omitempty"` + // DataStoreType: Output only. The type of the parent data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Unspecified data store type. + // "SITE_SEARCH" - The parent data store contains a site search engine. + // "STRUCTURED" - The parent data store contains a search engine for + // structured data. + // "UNSTRUCTURED" - The parent data store contains a search engine for + // unstructured data. + // "BLENDED" - The parent data store is served for blended search with + // multiple data stores. + DataStoreType string `json:"dataStoreType,omitempty"` + // DataStoreUiConfigs: Configurable UI configurations per data store. + DataStoreUiConfigs []*GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig `json:"dataStoreUiConfigs,omitempty"` + // DefaultSearchRequestOrderBy: The default ordering for search results if + // specified. Used to set SearchRequest#order_by on applicable requests. + // https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/search#request-body + DefaultSearchRequestOrderBy string `json:"defaultSearchRequestOrderBy,omitempty"` + // DisplayName: Required. The human readable widget config display name. Used + // in Discovery UI. This field must be a UTF-8 encoded string with a length + // limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + // EnableAutocomplete: Whether or not to enable autocomplete. + EnableAutocomplete bool `json:"enableAutocomplete,omitempty"` + // EnableConversationalSearch: Whether to allow conversational search (LLM, + // multi-turn) or not (non-LLM, single-turn). + EnableConversationalSearch bool `json:"enableConversationalSearch,omitempty"` + // EnablePrivateKnowledgeGraph: Optional. Output only. Whether to enable + // private knowledge graph. + EnablePrivateKnowledgeGraph bool `json:"enablePrivateKnowledgeGraph,omitempty"` + // EnableQualityFeedback: Turn on or off collecting the search result quality + // feedback from end users. + EnableQualityFeedback bool `json:"enableQualityFeedback,omitempty"` + // EnableResultScore: Whether to show the result score. + EnableResultScore bool `json:"enableResultScore,omitempty"` + // EnableSafeSearch: Whether to enable safe search. + EnableSafeSearch bool `json:"enableSafeSearch,omitempty"` + // EnableSearchAsYouType: Whether to enable search-as-you-type behavior for the + // search widget + EnableSearchAsYouType bool `json:"enableSearchAsYouType,omitempty"` + // EnableSnippetResultSummary: Turn on or off summary for each snippets result. + EnableSnippetResultSummary bool `json:"enableSnippetResultSummary,omitempty"` + // EnableSummarization: Turn on or off summarization for the search response. + EnableSummarization bool `json:"enableSummarization,omitempty"` + // EnableWebApp: Whether to enable standalone web app. + EnableWebApp bool `json:"enableWebApp,omitempty"` + // FacetField: The configuration and appearance of facets in the end user view. + FacetField []*GoogleCloudDiscoveryengineV1WidgetConfigFacetField `json:"facetField,omitempty"` + // FieldsUiComponentsMap: The key is the UI component. Mock. Currently + // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, `custom3`. The + // value is the name of the field along with its device visibility. The 3 + // custom fields are optional and can be added or removed. `title`, + // `thumbnail`, `url` are required UI components that cannot be removed. + FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` + // GeminiBundle: Output only. Whether the subscription is gemini bundle or not. + GeminiBundle bool `json:"geminiBundle,omitempty"` + // HomepageSetting: Optional. Describes the homepage settings of the widget. + HomepageSetting *GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting `json:"homepageSetting,omitempty"` + // IndustryVertical: Output only. The industry vertical that the WidgetConfig + // registers. The WidgetConfig industry vertical is based on the associated + // Engine. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not specific to + // any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + // LlmEnabled: Output only. Whether LLM is enabled in the corresponding data + // store. + LlmEnabled bool `json:"llmEnabled,omitempty"` + // MinimumDataTermAccepted: Output only. Whether the customer accepted data use + // terms. + MinimumDataTermAccepted bool `json:"minimumDataTermAccepted,omitempty"` + // Name: Immutable. The full resource name of the widget config. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a + // UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // ResultDisplayType: The type of snippet to display in UCS widget. - + // RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new + // non-enterprise search users. - EXTRACTIVE_ANSWER for new enterprise search + // users. + // + // Possible values: + // "RESULT_DISPLAY_TYPE_UNSPECIFIED" - Unspecified display type (default to + // showing snippet). + // "SNIPPET" - Display results from the snippet field. + // "EXTRACTIVE_ANSWER" - Display results from extractive answers field. + ResultDisplayType string `json:"resultDisplayType,omitempty"` + // SolutionType: Required. Immutable. Specifies the solution type that this + // WidgetConfig can be used for. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // UiBranding: Describes search widget UI branding settings, such as the widget + // title, logo, favicons, and colors. + UiBranding *GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings `json:"uiBranding,omitempty"` + // UiSettings: Describes general widget search settings as seen in cloud + // console widget configuration page. Replaces top deprecated top level + // properties. + UiSettings *GoogleCloudDiscoveryengineV1WidgetConfigUiSettings `json:"uiSettings,omitempty"` + // UpdateTime: Output only. Timestamp the WidgetConfig was updated. + 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. "AccessSettings") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccessSettings") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings: Describes widget +// access settings. +type GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings struct { + // AllowPublicAccess: Whether public unauthenticated access is allowed. + AllowPublicAccess bool `json:"allowPublicAccess,omitempty"` + // AllowlistedDomains: List of domains that are allowed to integrate the search + // widget. + AllowlistedDomains []string `json:"allowlistedDomains,omitempty"` + // EnableWebApp: Whether web app access is enabled. + EnableWebApp bool `json:"enableWebApp,omitempty"` + // LanguageCode: Optional. Language code for user interface. Use language tags + // defined by BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). If unset, + // the default language code is "en-US". + LanguageCode string `json:"languageCode,omitempty"` + // WorkforceIdentityPoolProvider: Optional. The workforce identity pool + // provider used to access the widget. + WorkforceIdentityPoolProvider string `json:"workforceIdentityPoolProvider,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowPublicAccess") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllowPublicAccess") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings: Describes the +// assistant settings of the widget. +type GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings struct { + // DefaultWebGroundingToggleOff: Output only. This field controls the default + // web grounding toggle for end users if `web_grounding_type` is set to + // `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or + // `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to + // false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or + // `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web + // grounding enabled by default on UI. If true, grounding toggle will be + // disabled by default on UI. End users can still enable web grounding in the + // UI if web grounding is enabled. + DefaultWebGroundingToggleOff bool `json:"defaultWebGroundingToggleOff,omitempty"` + // DisableLocationContext: Optional. Output only. Whether to disable user + // location context. + DisableLocationContext bool `json:"disableLocationContext,omitempty"` + // GoogleSearchGroundingEnabled: Whether or not the Google search grounding + // toggle is shown. Deprecated. Use web_grounding_type instead. + GoogleSearchGroundingEnabled bool `json:"googleSearchGroundingEnabled,omitempty"` + // WebGroundingType: Optional. The type of web grounding to use. + // + // Possible values: + // "WEB_GROUNDING_TYPE_UNSPECIFIED" - Default, unspecified setting. This is + // the same as disabled. + // "WEB_GROUNDING_TYPE_DISABLED" - Web grounding is disabled. + // "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" - Grounding with Google Search is + // enabled. + // "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" - Grounding with Enterprise Web + // Search is enabled. + WebGroundingType string `json:"webGroundingType,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "DefaultWebGroundingToggleOff") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DefaultWebGroundingToggleOff") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent: Read-only +// collection component that contains data store collections fields that may be +// used for filtering +type GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent struct { + // ConnectorIconLink: Output only. The icon link of the connector source. + ConnectorIconLink string `json:"connectorIconLink,omitempty"` + // DataSource: The name of the data source, retrieved from + // `Collection.data_connector.data_source`. + DataSource string `json:"dataSource,omitempty"` + // DataSourceDisplayName: Output only. The display name of the data source. + DataSourceDisplayName string `json:"dataSourceDisplayName,omitempty"` + // DataStoreComponents: For the data store collection, list of the children + // data stores. + DataStoreComponents []*GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent `json:"dataStoreComponents,omitempty"` + // DisplayName: The display name of the collection. + DisplayName string `json:"displayName,omitempty"` + // Id: Output only. the identifier of the collection, used for widget service. + // For now it refers to collection_id, in the future we will migrate the field + // to encrypted collection name UUID. + Id string `json:"id,omitempty"` + // Name: The name of the collection. It should be collection resource name. + // Format: + // `projects/{project}/locations/{location}/collections/{collection_id}`. For + // APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the + // project number and location part is erased in this field. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConnectorIconLink") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConnectorIconLink") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig: Customer +// provided configurations. +type GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig struct { + // CustomerType: Customer type. + // + // Possible values: + // "DEFAULT_CUSTOMER" - Default customer type. + // "GOVERNMENT_CUSTOMER" - Government customer type. Some features are + // disabled for government customers due to legal requirements. + CustomerType string `json:"customerType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomerType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomerType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent: Read-only data +// store component that contains data stores fields that may be used for +// filtering, it's the child of `CollectionComponent`. +type GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent struct { + // DataStoreConfigType: Output only. The type of the data store config. + // + // Possible values: + // "DATA_STORE_CONFIG_TYPE_UNSPECIFIED" - Default value. This value is + // unused. + // "ALLOW_DB_CONFIG" - The data store is connected to AlloyDB + // "THIRD_PARTY_OAUTH_CONFIG" - The data store is a connected to a third + // party data source. + // "NOTEBOOKLM_CONFIG" - The data store is a connected to NotebookLM + // Enterprise. + DataStoreConfigType string `json:"dataStoreConfigType,omitempty"` + // DisplayName: The display name of the data store. + DisplayName string `json:"displayName,omitempty"` + // EntityName: The name of the entity, retrieved from + // `Collection.data_connector.entities.entityName`. + EntityName string `json:"entityName,omitempty"` + // Id: Output only. the identifier of the data store, used for widget service. + // For now it refers to data_store_id, in the future we will migrate the field + // to encrypted data store name UUID. + Id string `json:"id,omitempty"` + // Name: The name of the data store. It should be data store resource name + // Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. For APIs under WidgetService, such as + // WidgetService.LookUpWidgetConfig, the project number and location part is + // erased in this field. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStoreConfigType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStoreConfigType") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig: UI component +// configuration for data store. +type GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig struct { + // FacetField: Facet fields that store the mapping of fields to end user widget + // appearance. + FacetField []*GoogleCloudDiscoveryengineV1WidgetConfigFacetField `json:"facetField,omitempty"` + // FieldsUiComponentsMap: The key is the UI component. Mock. Currently + // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, `custom3`. The + // value is the name of the field along with its device visibility. The 3 + // custom fields are optional and can be added or removed. `title`, + // `thumbnail`, `url` are required UI components that cannot be removed. + FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` + // Id: Output only. the identifier of the data store, used for widget service. + // For now it refers to data_store_id, in the future we will migrate the field + // to encrypted data store name UUID. + Id string `json:"id,omitempty"` + // Name: The name of the data store. It should be data store resource name + // Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. For APIs under WidgetService, such as + // WidgetService.LookUpWidgetConfig, the project number and location part is + // erased in this field. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "FacetField") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FacetField") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigFacetField: Facet fields that store +// the mapping of fields to end user widget appearance. +type GoogleCloudDiscoveryengineV1WidgetConfigFacetField struct { + // DisplayName: Optional. The field name that end users will see. + DisplayName string `json:"displayName,omitempty"` + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigFacetField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigFacetField + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting: Describes the +// homepage setting of the widget. It includes all homepage related settings +// and configurations, such as shortcuts. +type GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting struct { + // Shortcuts: Optional. The shortcuts to display on the homepage. + Shortcuts []*GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut `json:"shortcuts,omitempty"` + // ForceSendFields is a list of field names (e.g. "Shortcuts") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Shortcuts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut: Describes +// an entity of shortcut (aka pinned content) on the homepage. The home page +// will render these shortcuts in the same order as what the API returns. If a +// customer wants to reorder or remove a shortcut, the UI should always provide +// the new full list of shortcuts. +type GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut struct { + // DestinationUri: Optional. Destination URL of shortcut. + DestinationUri string `json:"destinationUri,omitempty"` + // Icon: Optional. Icon URL of shortcut. + Icon *GoogleCloudDiscoveryengineV1WidgetConfigImage `json:"icon,omitempty"` + // Title: Optional. Title of the shortcut. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. "DestinationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DestinationUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigImage: Options to store an image. +type GoogleCloudDiscoveryengineV1WidgetConfigImage struct { + // Url: Image URL. + Url string `json:"url,omitempty"` + // ForceSendFields is a list of field names (e.g. "Url") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Url") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigImage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigImage + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField: Facet field that +// maps to a UI Component. +type GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField struct { + // DeviceVisibility: The field visibility on different types of devices. + // + // Possible values: + // "DEVICE_VISIBILITY_UNSPECIFIED" - Default value when not specified. Server + // returns INVALID_ARGUMENT if used in requests. + // "MOBILE" - The UI component is visible on Mobile devices. + // "DESKTOP" - The UI component is visible on Browser-based client. + DeviceVisibility []string `json:"deviceVisibility,omitempty"` + // DisplayTemplate: The template to customize how the field is displayed. An + // example value would be a string that looks like: "Price: {value}". + DisplayTemplate string `json:"displayTemplate,omitempty"` + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeviceVisibility") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DeviceVisibility") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings: Describes widget +// UI branding settings. +type GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings struct { + // Logo: Logo image. + Logo *GoogleCloudDiscoveryengineV1WidgetConfigImage `json:"logo,omitempty"` + // ForceSendFields is a list of field names (e.g. "Logo") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Logo") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigUiSettings: Describes general widget +// (or web app) UI settings as seen in the cloud console UI configuration page. +type GoogleCloudDiscoveryengineV1WidgetConfigUiSettings struct { + // DataStoreUiConfigs: Per data store configuration. + DataStoreUiConfigs []*GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig `json:"dataStoreUiConfigs,omitempty"` + // DefaultSearchRequestOrderBy: The default ordering for search results if + // specified. Used to set SearchRequest#order_by on applicable requests. + // https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/search#request-body + DefaultSearchRequestOrderBy string `json:"defaultSearchRequestOrderBy,omitempty"` + // DisableUserEventsCollection: If set to true, the widget will not collect + // user events. + DisableUserEventsCollection bool `json:"disableUserEventsCollection,omitempty"` + // EnableAutocomplete: Whether or not to enable autocomplete. + EnableAutocomplete bool `json:"enableAutocomplete,omitempty"` + // EnableCreateAgentButton: Optional. If set to true, the widget will enable + // the create agent button. + EnableCreateAgentButton bool `json:"enableCreateAgentButton,omitempty"` + // EnablePeopleSearch: Optional. If set to true, the widget will enable people + // search. + EnablePeopleSearch bool `json:"enablePeopleSearch,omitempty"` + // EnableQualityFeedback: Turn on or off collecting the search result quality + // feedback from end users. + EnableQualityFeedback bool `json:"enableQualityFeedback,omitempty"` + // EnableSafeSearch: Whether to enable safe search. + EnableSafeSearch bool `json:"enableSafeSearch,omitempty"` + // EnableSearchAsYouType: Whether to enable search-as-you-type behavior for the + // search widget. + EnableSearchAsYouType bool `json:"enableSearchAsYouType,omitempty"` + // EnableVisualContentSummary: If set to true, the widget will enable visual + // content summary on applicable search requests. Only used by healthcare + // search. + EnableVisualContentSummary bool `json:"enableVisualContentSummary,omitempty"` + // Features: Output only. Feature config for the engine to opt in or opt out of + // features. Supported keys: * `agent-gallery` * `no-code-agent-builder` * + // `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * + // `people-search-org-chart` * `bi-directional-audio` * `feedback` * + // `session-sharing` * `personalization-memory` * `disable-agent-sharing` * + // `disable-image-generation` * `disable-video-generation` * + // `disable-onedrive-upload` * `disable-talk-to-content` * + // `disable-google-drive-upload` + Features map[string]string `json:"features,omitempty"` + // GenerativeAnswerConfig: Describes generative answer configuration. + GenerativeAnswerConfig *GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig `json:"generativeAnswerConfig,omitempty"` + // InteractionType: Describes widget (or web app) interaction type + // + // Possible values: + // "INTERACTION_TYPE_UNSPECIFIED" - Not specified. Defaults to SEARCH_ONLY. + // "SEARCH_ONLY" - Search without a generative answer. + // "SEARCH_WITH_ANSWER" - Search with the generative answer. + // "SEARCH_WITH_FOLLOW_UPS" - Search with the generative answer that supports + // follow up questions. Also known as multi-turn search. + InteractionType string `json:"interactionType,omitempty"` + // ModelConfigs: Output only. Maps a model name to its specific configuration + // for this engine. This allows admin users to turn on/off individual models. + // This only stores models whose states are overridden by the admin. When the + // state is unspecified, or model_configs is empty for this model, the system + // will decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` + // ResultDescriptionType: Controls whether result extract is display and how + // (snippet or extractive answer). Default to no result if unspecified. + // + // Possible values: + // "RESULT_DISPLAY_TYPE_UNSPECIFIED" - Unspecified display type (default to + // showing snippet). + // "SNIPPET" - Display results from the snippet field. + // "EXTRACTIVE_ANSWER" - Display results from extractive answers field. + ResultDescriptionType string `json:"resultDescriptionType,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStoreUiConfigs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStoreUiConfigs") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigUiSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigUiSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig: +// Describes configuration for generative answer. +type GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig struct { + // DisableRelatedQuestions: Whether generated answer contains suggested related + // questions. + DisableRelatedQuestions bool `json:"disableRelatedQuestions,omitempty"` + // IgnoreAdversarialQuery: Optional. Specifies whether to filter out queries + // that are adversarial. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreLowRelevantContent: Optional. Specifies whether to filter out queries + // that are not relevant to the content. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,omitempty"` + // IgnoreNonAnswerSeekingQuery: Optional. Specifies whether to filter out + // queries that are not answer-seeking. The default value is `false`. No answer + // is returned if the search query is classified as a non-answer seeking query. + // If this field is set to `true`, we skip generating answers for non-answer + // seeking queries and return fallback messages instead. + IgnoreNonAnswerSeekingQuery bool `json:"ignoreNonAnswerSeekingQuery,omitempty"` + // ImageSource: Optional. Source of image returned in the answer. + // + // Possible values: + // "IMAGE_SOURCE_UNSPECIFIED" - Unspecified image source (multimodal feature + // is disabled by default) + // "ALL_AVAILABLE_SOURCES" - Behavior when service determines the pick from + // all available sources. + // "CORPUS_IMAGE_ONLY" - Include image from corpus in the answer. + // "FIGURE_GENERATION_ONLY" - Triggers figure generation in the answer. + ImageSource string `json:"imageSource,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by BCP47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an + // experimental feature. + LanguageCode string `json:"languageCode,omitempty"` + // MaxRephraseSteps: Max rephrase steps. The max number is 5 steps. If not set + // or set to < 1, it will be set to 1 by default. + MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` + // ModelPromptPreamble: Text at the beginning of the prompt that instructs the + // model that generates the answer. + ModelPromptPreamble string `json:"modelPromptPreamble,omitempty"` + // ModelVersion: The model version used to generate the answer. + ModelVersion string `json:"modelVersion,omitempty"` + // ResultCount: The number of top results to generate the answer from. Up to + // 10. + ResultCount int64 `json:"resultCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisableRelatedQuestions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisableRelatedQuestions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1WorkspaceConfig: Config to store data store type // configuration for workspace data type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { @@ -19566,6 +20394,9 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayou // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -19677,6 +20508,8 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1alphaCmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -19730,6 +20563,14 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -25933,6 +26774,9 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayout // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -26044,6 +26888,8 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1betaCmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -26097,6 +26943,14 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -42425,6 +43279,254 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g return ret, nil } +type ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a WidgetConfig. +// +// - name: Full WidgetConfig resource name. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/widgetConfigs/{widget_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresWidgetConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall { + c := &ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AcceptCache sets the optional parameter "acceptCache": Whether it's +// acceptable to load the widget config from cache. If set to true, recent +// changes on widget configs may take a few minutes to reflect on the end +// user's view. It's recommended to set to true for maturely developed widgets, +// as it improves widget performance. Set to false to see changes reflected in +// prod right away, if your widget is under development. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) AcceptCache(acceptCache bool) *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall { + c.urlParams_.Set("acceptCache", fmt.Sprint(acceptCache)) + return c +} + +// GetWidgetConfigRequestOptionTurnOffCollectionComponents sets the optional +// parameter "getWidgetConfigRequestOption.turnOffCollectionComponents": +// Whether to turn off collection_components in WidgetConfig to reduce latency +// and data transmission. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) GetWidgetConfigRequestOptionTurnOffCollectionComponents(getWidgetConfigRequestOptionTurnOffCollectionComponents bool) *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall { + c.urlParams_.Set("getWidgetConfigRequestOption.turnOffCollectionComponents", fmt.Sprint(getWidgetConfigRequestOptionTurnOffCollectionComponents)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1WidgetConfig.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 *ProjectsLocationsCollectionsDataStoresWidgetConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1WidgetConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1WidgetConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1widgetconfig *GoogleCloudDiscoveryengineV1WidgetConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a WidgetConfig. +// +// - name: Immutable. The full resource name of the widget config. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be +// a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresWidgetConfigsService) Patch(name string, googleclouddiscoveryenginev1widgetconfig *GoogleCloudDiscoveryengineV1WidgetConfig) *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1widgetconfig = googleclouddiscoveryenginev1widgetconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided WidgetConfig to update. The following are the only supported +// fields: * WidgetConfig.enable_autocomplete If not set, all supported fields +// are updated. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall { + 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 +// details. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1widgetconfig) + if err != nil { + return nil, err + } + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1WidgetConfig.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 *ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1WidgetConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1WidgetConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.dataStores.widgetConfigs.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsEnginesCreateCall struct { s *Service parent string @@ -46874,6 +47976,254 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...g return ret, nil } +type ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a WidgetConfig. +// +// - name: Full WidgetConfig resource name. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/widgetConfigs/{widget_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesWidgetConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AcceptCache sets the optional parameter "acceptCache": Whether it's +// acceptable to load the widget config from cache. If set to true, recent +// changes on widget configs may take a few minutes to reflect on the end +// user's view. It's recommended to set to true for maturely developed widgets, +// as it improves widget performance. Set to false to see changes reflected in +// prod right away, if your widget is under development. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) AcceptCache(acceptCache bool) *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall { + c.urlParams_.Set("acceptCache", fmt.Sprint(acceptCache)) + return c +} + +// GetWidgetConfigRequestOptionTurnOffCollectionComponents sets the optional +// parameter "getWidgetConfigRequestOption.turnOffCollectionComponents": +// Whether to turn off collection_components in WidgetConfig to reduce latency +// and data transmission. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) GetWidgetConfigRequestOptionTurnOffCollectionComponents(getWidgetConfigRequestOptionTurnOffCollectionComponents bool) *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall { + c.urlParams_.Set("getWidgetConfigRequestOption.turnOffCollectionComponents", fmt.Sprint(getWidgetConfigRequestOptionTurnOffCollectionComponents)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.widgetConfigs.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.widgetConfigs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1WidgetConfig.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 *ProjectsLocationsCollectionsEnginesWidgetConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1WidgetConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1WidgetConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.widgetConfigs.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1widgetconfig *GoogleCloudDiscoveryengineV1WidgetConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a WidgetConfig. +// +// - name: Immutable. The full resource name of the widget config. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be +// a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsEnginesWidgetConfigsService) Patch(name string, googleclouddiscoveryenginev1widgetconfig *GoogleCloudDiscoveryengineV1WidgetConfig) *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1widgetconfig = googleclouddiscoveryenginev1widgetconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided WidgetConfig to update. The following are the only supported +// fields: * WidgetConfig.enable_autocomplete If not set, all supported fields +// are updated. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall { + 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 +// details. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1widgetconfig) + if err != nil { + return nil, err + } + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.widgetConfigs.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.widgetConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1WidgetConfig.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 *ProjectsLocationsCollectionsEnginesWidgetConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1WidgetConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1WidgetConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.widgetConfigs.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string @@ -55946,6 +57296,254 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsDataStoresWidgetConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a WidgetConfig. +// +// - name: Full WidgetConfig resource name. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/widgetConfigs/{widget_config_id}`. +func (r *ProjectsLocationsDataStoresWidgetConfigsService) Get(name string) *ProjectsLocationsDataStoresWidgetConfigsGetCall { + c := &ProjectsLocationsDataStoresWidgetConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AcceptCache sets the optional parameter "acceptCache": Whether it's +// acceptable to load the widget config from cache. If set to true, recent +// changes on widget configs may take a few minutes to reflect on the end +// user's view. It's recommended to set to true for maturely developed widgets, +// as it improves widget performance. Set to false to see changes reflected in +// prod right away, if your widget is under development. +func (c *ProjectsLocationsDataStoresWidgetConfigsGetCall) AcceptCache(acceptCache bool) *ProjectsLocationsDataStoresWidgetConfigsGetCall { + c.urlParams_.Set("acceptCache", fmt.Sprint(acceptCache)) + return c +} + +// GetWidgetConfigRequestOptionTurnOffCollectionComponents sets the optional +// parameter "getWidgetConfigRequestOption.turnOffCollectionComponents": +// Whether to turn off collection_components in WidgetConfig to reduce latency +// and data transmission. +func (c *ProjectsLocationsDataStoresWidgetConfigsGetCall) GetWidgetConfigRequestOptionTurnOffCollectionComponents(getWidgetConfigRequestOptionTurnOffCollectionComponents bool) *ProjectsLocationsDataStoresWidgetConfigsGetCall { + c.urlParams_.Set("getWidgetConfigRequestOption.turnOffCollectionComponents", fmt.Sprint(getWidgetConfigRequestOptionTurnOffCollectionComponents)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresWidgetConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresWidgetConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDataStoresWidgetConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresWidgetConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresWidgetConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresWidgetConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresWidgetConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresWidgetConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.dataStores.widgetConfigs.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.widgetConfigs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1WidgetConfig.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 *ProjectsLocationsDataStoresWidgetConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1WidgetConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1WidgetConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.dataStores.widgetConfigs.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataStoresWidgetConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1widgetconfig *GoogleCloudDiscoveryengineV1WidgetConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a WidgetConfig. +// +// - name: Immutable. The full resource name of the widget config. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be +// a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresWidgetConfigsService) Patch(name string, googleclouddiscoveryenginev1widgetconfig *GoogleCloudDiscoveryengineV1WidgetConfig) *ProjectsLocationsDataStoresWidgetConfigsPatchCall { + c := &ProjectsLocationsDataStoresWidgetConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1widgetconfig = googleclouddiscoveryenginev1widgetconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided WidgetConfig to update. The following are the only supported +// fields: * WidgetConfig.enable_autocomplete If not set, all supported fields +// are updated. +func (c *ProjectsLocationsDataStoresWidgetConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresWidgetConfigsPatchCall { + 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 +// details. +func (c *ProjectsLocationsDataStoresWidgetConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresWidgetConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresWidgetConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresWidgetConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresWidgetConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresWidgetConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1widgetconfig) + if err != nil { + return nil, err + } + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.dataStores.widgetConfigs.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.widgetConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1WidgetConfig.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 *ProjectsLocationsDataStoresWidgetConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1WidgetConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1WidgetConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.dataStores.widgetConfigs.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsGroundingConfigsCheckCall struct { s *Service groundingConfig string @@ -58936,6 +60534,117 @@ func (c *ProjectsLocationsUserStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the LicenseConfigUsageStatss associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/userStores/{user_store_id}`. +func (r *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService) List(parent string) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c := &ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Context(ctx context.Context) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/licenseConfigsUsageStats") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse.ServerRespo +// nse.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 *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsUserStoresUserLicensesListCall struct { s *Service parent string @@ -58956,13 +60665,13 @@ func (r *ProjectsLocationsUserStoresUserLicensesService) List(parent string) *Pr } // Filter sets the optional parameter "filter": Filter for the list request. -// Supported fields: * `license_assignment_state` Examples: * -// `license_assignment_state = ASSIGNED` to list assigned user licenses. * -// `license_assignment_state = NO_LICENSE` to list not licensed users. * -// `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who -// attempted login but no license assigned. * `license_assignment_state != -// NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no -// license assigned. +// Supported fields: * `license`_`assignment`_`state` * `user_principal` * +// `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list +// assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to +// list not licensed users. * `license`_`assignment`_`state = +// NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license +// assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to +// filter out users who attempted login but no license assigned. func (c *ProjectsLocationsUserStoresUserLicensesListCall) Filter(filter string) *ProjectsLocationsUserStoresUserLicensesListCall { c.urlParams_.Set("filter", filter) return c diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index f22ded7de3a..861dd0e9cf2 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -5136,6 +5136,82 @@ "https://www.googleapis.com/auth/discoveryengine.readwrite" ] }, + "listAvailableAgentViews": { + "description": "Lists the data for displaying the Agents under an Assistant which are available to the caller.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}:listAvailableAgentViews", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.assistants.listAvailableAgentViews", + "parameterOrder": [ + "parent" + ], + "parameters": { + "agentOrigin": { + "description": "Optional. The origin of the Agent.", + "enum": [ + "AGENT_ORIGIN_UNSPECIFIED", + "GOOGLE", + "ORGANIZATION", + "USER" + ], + "enumDescriptions": [ + "The origin is unspecified.", + "Agent defined by Google.", + "Agent defined by the organization.", + "Agent defined by the user." + ], + "location": "query", + "type": "string" + }, + "filter": { + "description": "Optional. The filter syntax consists of an expression language for constructing a predicate from one or more fields of the files being filtered. Filter expression is case-sensitive. Allowed fields are: * `display_name` * `state` Some examples of filters would be: * `display_name = 'agent_1'` * `display_name = 'agent_1' AND state = ENABLED` For a full description of the filter format, please see https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The UI language currently shown to the user. Specifying this field request that the texts in the AgentViews in the response should be translated to this language.", + "location": "query", + "type": "string" + }, + "maxSuggestedPrompts": { + "description": "Optional. The maximum number of suggested prompts to return per agent.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageSize": { + "description": "Optional. Maximum number of AgentViewss to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token ListAvailableAgentViewsResponse.next_page_token, received from a previous AgentService.ListAvailableAgentViews call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAvailableAgentViews must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+$", + "required": true, + "type": "string" + }, + "sortBy": { + "description": "Optional. The field to sort by. Can have the following values: - display-name: The display name of the agent. - description: The description of the agent. - create-time: The creation time of the agent. - state: The state of the agent.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}:listAvailableAgentViews", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, "patch": { "description": "Updates an Assistant", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}", @@ -5263,6 +5339,60 @@ "https://www.googleapis.com/auth/discoveryengine.readwrite" ] }, + "disableAgent": { + "description": "Disables an Agent. The `state` of the Agent becomes `DISABLED`. Can be called on an Agent in the state `ENABLED` or`SUSPENDED`, otherwise it returns an error.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents/{agentsId}:disableAgent", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.assistants.agents.disableAgent", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Agent to disable. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:disableAgent", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, + "enableAgent": { + "description": "Enables an Agent. The `state` of the Agent becomes `ENABLED`. Can be called on an Agent in the state `DISABLED` or 'SUSPENDED', otherwise it returns an error.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents/{agentsId}:enableAgent", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.assistants.agents.enableAgent", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Agent to enable. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:enableAgent", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, "get": { "description": "Gets an Agent.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents/{agentsId}", @@ -5290,6 +5420,77 @@ "https://www.googleapis.com/auth/discoveryengine.readwrite" ] }, + "getAgentView": { + "description": "Returns a AgentView for a given Agent, which contains additional information about the Agent.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents/{agentsId}:getAgentView", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.assistants.agents.getAgentView", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "Optional. The UI language currently shown to the user. Specifying this field request that the texts in the AgentView in the response should be translated to this language.", + "location": "query", + "type": "string" + }, + "maxSuggestedPrompts": { + "description": "Optional. The maximum number of suggested prompts to return per agent.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "name": { + "description": "Required. The name of the Agent to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:getAgentView", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for an agent resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents/{agentsId}:getIamPolicy", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.assistants.agents.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, "list": { "description": "Lists all Agents under an Assistant which were created by the caller.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents", @@ -5368,6 +5569,68 @@ "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", "https://www.googleapis.com/auth/discoveryengine.readwrite" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy for an agent resource. A `NOT_FOUND` error is returned if the resource does not exist. Policy can only contain `roles/discoveryengine.agentUser`, `roles/discoveryengine.agentViewer` and `roles/discoveryengine.agentEditor` roles.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents/{agentsId}:setIamPolicy", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.assistants.agents.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + }, + "suspendAgent": { + "description": "Suspends an Agent. It is still available for viewing but not for use. The `state` of the Agent becomes `SUSPENDED`. Can be called on an Agent in the state `ENABLED`, otherwise it returns an error.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/assistants/{assistantsId}/agents/{agentsId}:suspendAgent", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.assistants.agents.suspendAgent", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Agent to suspend. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + }, + "suspensionReason": { + "description": "Required. The reason for suspending the Agent. This will be shown to the users of the Agent.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}:suspendAgent", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] } }, "resources": { @@ -11327,6 +11590,36 @@ } }, "resources": { + "licenseConfigsUsageStats": { + "methods": { + "list": { + "description": "Lists all the LicenseConfigUsageStatss associated with the project.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userStores/{userStoresId}/licenseConfigsUsageStats", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/userStores/{user_store_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/userStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/licenseConfigsUsageStats", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + } + } + }, "operations": { "methods": { "get": { @@ -11416,7 +11709,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filter for the list request. Supported fields: * `license_assignment_state` Examples: * `license_assignment_state = ASSIGNED` to list assigned user licenses. * `license_assignment_state = NO_LICENSE` to list not licensed users. * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.", + "description": "Optional. Filter for the list request. Supported fields: * `license`_`assignment`_`state` * `user_principal` * `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to list not licensed users. * `license`_`assignment`_`state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.", "location": "query", "type": "string" }, @@ -11534,7 +11827,7 @@ } } }, - "revision": "20251030", + "revision": "20251109", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "ApiservingMediaRequestInfo": { @@ -14447,6 +14740,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -14549,6 +14846,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1CmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -14623,6 +14925,23 @@ "$ref": "GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -16846,6 +17165,10 @@ "readOnly": true, "type": "string" }, + "sharingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgentSharingConfig", + "description": "Optional. The sharing config of the agent." + }, "starterPrompts": { "description": "Optional. The starter prompt suggestions to show the user on the landing page of the agent.", "items": { @@ -16926,6 +17249,27 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAgentSharingConfig": { + "description": "Sharing related configuration.", + "id": "GoogleCloudDiscoveryengineV1alphaAgentSharingConfig", + "properties": { + "scope": { + "description": "Optional. The sharing scope of the agent.", + "enum": [ + "SCOPE_UNSPECIFIED", + "RESTRICTED", + "ALL_USERS" + ], + "enumDescriptions": [ + "Default value. Behaves as `RESTRICTED`.", + "The agent is shared based on the IAM policy.", + "The agent is shared with all users." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAgentStarterPrompt": { "description": "The starter prompt suggestion to show the user on the landing page of the agent.", "id": "GoogleCloudDiscoveryengineV1alphaAgentStarterPrompt", @@ -16937,6 +17281,191 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAgentView": { + "description": "The data for displaying an Agent.", + "id": "GoogleCloudDiscoveryengineV1alphaAgentView", + "properties": { + "agentOrigin": { + "description": "Immutable. The origin of the Agent.", + "enum": [ + "AGENT_ORIGIN_UNSPECIFIED", + "GOOGLE", + "ORGANIZATION", + "USER" + ], + "enumDescriptions": [ + "The origin is unspecified.", + "Agent defined by Google.", + "Agent defined by the organization.", + "Agent defined by the user." + ], + "type": "string" + }, + "agentSharingState": { + "description": "Output only. The sharing state of the agent.", + "enum": [ + "AGENT_SHARING_STATE_UNSPECIFIED", + "NOT_SHARED", + "PENDING", + "SHARED", + "REJECTED" + ], + "enumDescriptions": [ + "The sharing state is unspecified.", + "The agent is not shared.", + "The agent is pending review.", + "The agent is shared with other users.", + "The agent sharing request was rejected." + ], + "readOnly": true, + "type": "string" + }, + "agentType": { + "description": "Output only. The type of the agent.", + "enum": [ + "AGENT_TYPE_UNSPECIFIED", + "NO_CODE", + "HTTP", + "ADK", + "MANAGED", + "A2A", + "DIALOGFLOW", + "LOW_CODE" + ], + "enumDescriptions": [ + "The agent type is unspecified.", + "No-code agent.", + "HTTP agent.", + "ADK agent.", + "Google managed agent.", + "A2A agent.", + "Dialogflow agent.", + "Low-code agent." + ], + "readOnly": true, + "type": "string" + }, + "customPlaceholderText": { + "description": "The custom placeholder text that appears in the text box before the user enters any text.", + "type": "string" + }, + "deploymentFailureReason": { + "description": "The reason why the agent deployment failed. Only set if the state is DEPLOYMENT_FAILED.", + "type": "string" + }, + "description": { + "description": "Required. Human-readable description of the agent. This might be used by an LLM to automatically select an agent to respond to a user query and to generate the first version of the steps for the agent that can be modified by the user. The language of this is either Agent.language_code, or ListAvailableAgentViewsRequest.language_code if translations are enabled.", + "type": "string" + }, + "displayName": { + "description": "Required. Display name of the agent. The language of this is either Agent.language_code, or ListAvailableAgentViewsRequest.language_code if translations are enabled.", + "type": "string" + }, + "icon": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgentImage", + "description": "Optional. The icon that represents the agent on the UI." + }, + "name": { + "description": "Resource name of the agent. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}`", + "type": "string" + }, + "rejectionReason": { + "description": "The reason why the agent was rejected. Only set if the state is PRIVATE, and got there via rejection.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the Agent.", + "enum": [ + "STATE_UNSPECIFIED", + "CONFIGURED", + "DEPLOYING", + "DISABLED", + "DEPLOYMENT_FAILED", + "PRIVATE", + "ENABLED", + "SUSPENDED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The agent is configured, but no deployment triggered yet.", + "The agent is being deployed.", + "The agent is available for admins only.", + "The agent deployment failed.", + "Agent is available only to its creator..", + "Agent is available for users who have access.", + "Agent is temporarily unavailable, though visible to users who have access." + ], + "readOnly": true, + "type": "string" + }, + "suggestedPrompts": { + "description": "Optional. The suggested prompts for the agent, to be shown on the agent landing page.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt" + }, + "type": "array" + }, + "suspensionReason": { + "description": "The reason why the agent was suspended. Only set if the state is SUSPENDED.", + "type": "string" + }, + "userAnnotations": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserAnnotations", + "description": "Optional. Per-user annotations of the current caller for the agent." + }, + "userPermissions": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions", + "description": "The permissions of the user for this Agent." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt": { + "description": "A suggested prompt for the agent, to be shown on the agent landing page.", + "id": "GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt", + "properties": { + "text": { + "description": "Required. The text of the suggested prompt. The language of this is either Agent.language_code, or ListAvailableAgentViewsRequest.language_code if translations are enabled.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions": { + "description": "The permissions of the user on an Agent.", + "id": "GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions", + "properties": { + "canDelete": { + "description": "If the user can delete this Agent.", + "type": "boolean" + }, + "canEdit": { + "description": "If the user can edit this Agent.", + "type": "boolean" + }, + "canProposeUsers": { + "description": "If the user can propose other users to share the Agent with.", + "type": "boolean" + }, + "canRequestReview": { + "description": "If the user can request a review for this Agent.", + "type": "boolean" + }, + "canRun": { + "description": "If the user can run this Agent.", + "type": "boolean" + }, + "canView": { + "description": "If the user can view the source of this Agent.", + "type": "boolean" + }, + "canWithdraw": { + "description": "If the user can withdraw this Agent.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAlertPolicyConfig": { "description": "The connector level alert config.", "id": "GoogleCloudDiscoveryengineV1alphaAlertPolicyConfig", @@ -22628,6 +23157,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -22762,6 +23295,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -22836,6 +23374,23 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -23823,6 +24378,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse": { + "description": "Response message for the AgentService.GetAgentView method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse", + "properties": { + "agentView": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgentView", + "description": "The data for displaying an Agent." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaGetConnectorSecretResponse": { "description": "Response message for DataConnectorService.GetConnectorSecret.", "id": "GoogleCloudDiscoveryengineV1alphaGetConnectorSecretResponse", @@ -24812,6 +25378,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats": { + "description": "Stats about users' licenses.", + "id": "GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats", + "properties": { + "licenseConfig": { + "description": "Required. The LicenseConfig name.", + "type": "string" + }, + "usedLicenseCount": { + "description": "Required. The number of licenses used.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListAgentsResponse": { "description": "Response message for the AgentService.ListAgents method.", "id": "GoogleCloudDiscoveryengineV1alphaListAgentsResponse", @@ -24848,6 +25430,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse": { + "description": "Response message for the AgentService.ListAvailableAgentViews method.", + "id": "GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse", + "properties": { + "agentViews": { + "description": "The agent sources visible to the caller under the parent Assistant.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAgentView" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as ListAvailableAgentViewsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListBillingAccountLicenseConfigsResponse": { "description": "Response message for LicenseConfigService.ListBillingAccountLicenseConfigs method.", "id": "GoogleCloudDiscoveryengineV1alphaListBillingAccountLicenseConfigsResponse", @@ -25177,6 +25777,20 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse": { + "description": "Response message for UserLicenseService.ListLicenseConfigUsageStats method.", + "id": "GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse", + "properties": { + "licenseConfigUsageStats": { + "description": "All the customer's LicenseConfigUsageStats.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse": { "description": "Response message for SampleQueryService.ListSampleQueries method.", "id": "GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse", @@ -29805,6 +30419,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUserAnnotations": { + "description": "Per-user annotations for an Agent, based on UserAnnotation.", + "id": "GoogleCloudDiscoveryengineV1alphaUserAnnotations", + "properties": { + "pinned": { + "description": "Optional. Whether the agent is pinned, pinned agent will be displayed on the top of the agent list.", + "type": "boolean" + }, + "viewed": { + "description": "Optional. Whether the agent has been viewed by the user.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUserEvent": { "description": "UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with your website.", "id": "GoogleCloudDiscoveryengineV1alphaUserEvent", @@ -30757,6 +31386,24 @@ ], "type": "string" }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Output only. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "readOnly": true, + "type": "object" + }, "resultDescriptionType": { "description": "Controls whether result extract is display and how (snippet or extractive answer). Default to no result if unspecified.", "enum": [ @@ -31941,6 +32588,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -32043,6 +32694,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -32117,6 +32773,23 @@ "$ref": "GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -35502,6 +36175,63 @@ }, "type": "object" }, + "GoogleIamV1Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "GoogleIamV1Binding", + "properties": { + "condition": { + "$ref": "GoogleTypeExpr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "GoogleIamV1Policy", + "properties": { + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "GoogleIamV1Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleIamV1SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "GoogleIamV1SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "GoogleIamV1Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 4d2d3b25d45..314769cc0a5 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -1297,6 +1297,7 @@ type ProjectsLocationsUserEventsService struct { func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserStoresService { rs := &ProjectsLocationsUserStoresService{s: s} + rs.LicenseConfigsUsageStats = NewProjectsLocationsUserStoresLicenseConfigsUsageStatsService(s) rs.Operations = NewProjectsLocationsUserStoresOperationsService(s) rs.UserLicenses = NewProjectsLocationsUserStoresUserLicensesService(s) return rs @@ -1305,11 +1306,22 @@ func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserSto type ProjectsLocationsUserStoresService struct { s *Service + LicenseConfigsUsageStats *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService + Operations *ProjectsLocationsUserStoresOperationsService UserLicenses *ProjectsLocationsUserStoresUserLicensesService } +func NewProjectsLocationsUserStoresLicenseConfigsUsageStatsService(s *Service) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService { + rs := &ProjectsLocationsUserStoresLicenseConfigsUsageStatsService{s: s} + return rs +} + +type ProjectsLocationsUserStoresLicenseConfigsUsageStatsService struct { + s *Service +} + func NewProjectsLocationsUserStoresOperationsService(s *Service) *ProjectsLocationsUserStoresOperationsService { rs := &ProjectsLocationsUserStoresOperationsService{s: s} return rs @@ -5123,6 +5135,9 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutPars // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -5234,6 +5249,8 @@ type GoogleCloudDiscoveryengineV1Engine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1EngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1CmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1EngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -5287,6 +5304,14 @@ type GoogleCloudDiscoveryengineV1Engine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -8357,6 +8382,8 @@ type GoogleCloudDiscoveryengineV1alphaAgent struct { // RejectionReason: Output only. The reason why the agent was rejected. Only // set if the state is PRIVATE, and got there via rejection. RejectionReason string `json:"rejectionReason,omitempty"` + // SharingConfig: Optional. The sharing config of the agent. + SharingConfig *GoogleCloudDiscoveryengineV1alphaAgentSharingConfig `json:"sharingConfig,omitempty"` // StarterPrompts: Optional. The starter prompt suggestions to show the user on // the landing page of the agent. StarterPrompts []*GoogleCloudDiscoveryengineV1alphaAgentStarterPrompt `json:"starterPrompts,omitempty"` @@ -8453,6 +8480,34 @@ func (s GoogleCloudDiscoveryengineV1alphaAgentImage) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAgentSharingConfig: Sharing related +// configuration. +type GoogleCloudDiscoveryengineV1alphaAgentSharingConfig struct { + // Scope: Optional. The sharing scope of the agent. + // + // Possible values: + // "SCOPE_UNSPECIFIED" - Default value. Behaves as `RESTRICTED`. + // "RESTRICTED" - The agent is shared based on the IAM policy. + // "ALL_USERS" - The agent is shared with all users. + Scope string `json:"scope,omitempty"` + // ForceSendFields is a list of field names (e.g. "Scope") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Scope") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAgentSharingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAgentSharingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAgentStarterPrompt: The starter prompt // suggestion to show the user on the landing page of the agent. type GoogleCloudDiscoveryengineV1alphaAgentStarterPrompt struct { @@ -8476,6 +8531,166 @@ func (s GoogleCloudDiscoveryengineV1alphaAgentStarterPrompt) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAgentView: The data for displaying an +// Agent. +type GoogleCloudDiscoveryengineV1alphaAgentView struct { + // AgentOrigin: Immutable. The origin of the Agent. + // + // Possible values: + // "AGENT_ORIGIN_UNSPECIFIED" - The origin is unspecified. + // "GOOGLE" - Agent defined by Google. + // "ORGANIZATION" - Agent defined by the organization. + // "USER" - Agent defined by the user. + AgentOrigin string `json:"agentOrigin,omitempty"` + // AgentSharingState: Output only. The sharing state of the agent. + // + // Possible values: + // "AGENT_SHARING_STATE_UNSPECIFIED" - The sharing state is unspecified. + // "NOT_SHARED" - The agent is not shared. + // "PENDING" - The agent is pending review. + // "SHARED" - The agent is shared with other users. + // "REJECTED" - The agent sharing request was rejected. + AgentSharingState string `json:"agentSharingState,omitempty"` + // AgentType: Output only. The type of the agent. + // + // Possible values: + // "AGENT_TYPE_UNSPECIFIED" - The agent type is unspecified. + // "NO_CODE" - No-code agent. + // "HTTP" - HTTP agent. + // "ADK" - ADK agent. + // "MANAGED" - Google managed agent. + // "A2A" - A2A agent. + // "DIALOGFLOW" - Dialogflow agent. + // "LOW_CODE" - Low-code agent. + AgentType string `json:"agentType,omitempty"` + // CustomPlaceholderText: The custom placeholder text that appears in the text + // box before the user enters any text. + CustomPlaceholderText string `json:"customPlaceholderText,omitempty"` + // DeploymentFailureReason: The reason why the agent deployment failed. Only + // set if the state is DEPLOYMENT_FAILED. + DeploymentFailureReason string `json:"deploymentFailureReason,omitempty"` + // Description: Required. Human-readable description of the agent. This might + // be used by an LLM to automatically select an agent to respond to a user + // query and to generate the first version of the steps for the agent that can + // be modified by the user. The language of this is either Agent.language_code, + // or ListAvailableAgentViewsRequest.language_code if translations are enabled. + Description string `json:"description,omitempty"` + // DisplayName: Required. Display name of the agent. The language of this is + // either Agent.language_code, or ListAvailableAgentViewsRequest.language_code + // if translations are enabled. + DisplayName string `json:"displayName,omitempty"` + // Icon: Optional. The icon that represents the agent on the UI. + Icon *GoogleCloudDiscoveryengineV1alphaAgentImage `json:"icon,omitempty"` + // Name: Resource name of the agent. Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}/assistants/{assistant}/agents/{agent}` + Name string `json:"name,omitempty"` + // RejectionReason: The reason why the agent was rejected. Only set if the + // state is PRIVATE, and got there via rejection. + RejectionReason string `json:"rejectionReason,omitempty"` + // State: Output only. The state of the Agent. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "CONFIGURED" - The agent is configured, but no deployment triggered yet. + // "DEPLOYING" - The agent is being deployed. + // "DISABLED" - The agent is available for admins only. + // "DEPLOYMENT_FAILED" - The agent deployment failed. + // "PRIVATE" - Agent is available only to its creator.. + // "ENABLED" - Agent is available for users who have access. + // "SUSPENDED" - Agent is temporarily unavailable, though visible to users + // who have access. + State string `json:"state,omitempty"` + // SuggestedPrompts: Optional. The suggested prompts for the agent, to be shown + // on the agent landing page. + SuggestedPrompts []*GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt `json:"suggestedPrompts,omitempty"` + // SuspensionReason: The reason why the agent was suspended. Only set if the + // state is SUSPENDED. + SuspensionReason string `json:"suspensionReason,omitempty"` + // UserAnnotations: Optional. Per-user annotations of the current caller for + // the agent. + UserAnnotations *GoogleCloudDiscoveryengineV1alphaUserAnnotations `json:"userAnnotations,omitempty"` + // UserPermissions: The permissions of the user for this Agent. + UserPermissions *GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions `json:"userPermissions,omitempty"` + // ForceSendFields is a list of field names (e.g. "AgentOrigin") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AgentOrigin") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAgentView) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAgentView + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt: A suggested +// prompt for the agent, to be shown on the agent landing page. +type GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt struct { + // Text: Required. The text of the suggested prompt. The language of this is + // either Agent.language_code, or ListAvailableAgentViewsRequest.language_code + // if translations are enabled. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "Text") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Text") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions: The permissions +// of the user on an Agent. +type GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions struct { + // CanDelete: If the user can delete this Agent. + CanDelete bool `json:"canDelete,omitempty"` + // CanEdit: If the user can edit this Agent. + CanEdit bool `json:"canEdit,omitempty"` + // CanProposeUsers: If the user can propose other users to share the Agent + // with. + CanProposeUsers bool `json:"canProposeUsers,omitempty"` + // CanRequestReview: If the user can request a review for this Agent. + CanRequestReview bool `json:"canRequestReview,omitempty"` + // CanRun: If the user can run this Agent. + CanRun bool `json:"canRun,omitempty"` + // CanView: If the user can view the source of this Agent. + CanView bool `json:"canView,omitempty"` + // CanWithdraw: If the user can withdraw this Agent. + CanWithdraw bool `json:"canWithdraw,omitempty"` + // ForceSendFields is a list of field names (e.g. "CanDelete") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CanDelete") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAlertPolicyConfig: The connector level // alert config. type GoogleCloudDiscoveryengineV1alphaAlertPolicyConfig struct { @@ -15897,6 +16112,9 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayou // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -16075,6 +16293,8 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1alphaCmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -16128,6 +16348,14 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -17471,6 +17699,32 @@ func (s GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse: Response message for +// the AgentService.GetAgentView method. +type GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse struct { + // AgentView: The data for displaying an Agent. + AgentView *GoogleCloudDiscoveryengineV1alphaAgentView `json:"agentView,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AgentView") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AgentView") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGetConnectorSecretResponse: Response // message for DataConnectorService.GetConnectorSecret. type GoogleCloudDiscoveryengineV1alphaGetConnectorSecretResponse struct { @@ -18822,6 +19076,31 @@ func (s GoogleCloudDiscoveryengineV1alphaLicenseConfig) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats: Stats about users' +// licenses. +type GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats struct { + // LicenseConfig: Required. The LicenseConfig name. + LicenseConfig string `json:"licenseConfig,omitempty"` + // UsedLicenseCount: Required. The number of licenses used. + UsedLicenseCount int64 `json:"usedLicenseCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "LicenseConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LicenseConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListAgentsResponse: Response message for // the AgentService.ListAgents method. type GoogleCloudDiscoveryengineV1alphaListAgentsResponse struct { @@ -18882,6 +19161,37 @@ func (s GoogleCloudDiscoveryengineV1alphaListAuthorizationsResponse) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse: Response +// message for the AgentService.ListAvailableAgentViews method. +type GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse struct { + // AgentViews: The agent sources visible to the caller under the parent + // Assistant. + AgentViews []*GoogleCloudDiscoveryengineV1alphaAgentView `json:"agentViews,omitempty"` + // NextPageToken: A token that can be sent as + // ListAvailableAgentViewsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + 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. "AgentViews") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AgentViews") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListBillingAccountLicenseConfigsResponse: // Response message for LicenseConfigService.ListBillingAccountLicenseConfigs // method. @@ -19429,6 +19739,32 @@ func (s GoogleCloudDiscoveryengineV1alphaListIdentityMappingsResponse) MarshalJS return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse: +// Response message for UserLicenseService.ListLicenseConfigUsageStats method. +type GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse struct { + // LicenseConfigUsageStats: All the customer's LicenseConfigUsageStats. + LicenseConfigUsageStats []*GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats `json:"licenseConfigUsageStats,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "LicenseConfigUsageStats") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LicenseConfigUsageStats") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse: Response message // for SampleQueryService.ListSampleQueries method. type GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse struct { @@ -26237,6 +26573,32 @@ func (s GoogleCloudDiscoveryengineV1alphaUploadSessionFileResponse) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaUserAnnotations: Per-user annotations for +// an Agent, based on UserAnnotation. +type GoogleCloudDiscoveryengineV1alphaUserAnnotations struct { + // Pinned: Optional. Whether the agent is pinned, pinned agent will be + // displayed on the top of the agent list. + Pinned bool `json:"pinned,omitempty"` + // Viewed: Optional. Whether the agent has been viewed by the user. + Viewed bool `json:"viewed,omitempty"` + // ForceSendFields is a list of field names (e.g. "Pinned") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Pinned") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUserAnnotations) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserAnnotations + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaUserEvent: UserEvent captures all metadata // information Discovery Engine API needs to know about how end users interact // with your website. @@ -27241,6 +27603,14 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigUiSettings struct { // "SEARCH_WITH_FOLLOW_UPS" - Search with the generative answer that supports // follow up questions. Also known as multi-turn search. InteractionType string `json:"interactionType,omitempty"` + // ModelConfigs: Output only. Maps a model name to its specific configuration + // for this engine. This allows admin users to turn on/off individual models. + // This only stores models whose states are overridden by the admin. When the + // state is unspecified, or model_configs is empty for this model, the system + // will decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // ResultDescriptionType: Controls whether result extract is display and how // (snippet or extractive answer). Default to no result if unspecified. // @@ -28818,6 +29188,9 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayout // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -28929,6 +29302,8 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1betaCmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -28982,6 +29357,14 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -33849,6 +34232,220 @@ func (s GoogleCloudNotebooklmV1alphaYoutubeMetadata) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleIamV1Binding: Associates `members`, or principals, with a `role`. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the current + // request. If the condition evaluates to `false`, then this binding does not + // apply to the current request. However, a different role binding might grant + // the same role to one or more of the principals in this binding. To learn + // which resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + // Members: Specifies the principals requesting access for a Google Cloud + // resource. `members` can have the following values: * `allUsers`: A special + // identifier that represents anyone who is on the internet; with or without a + // Google account. * `allAuthenticatedUsers`: A special identifier that + // represents anyone who is authenticated with a Google account or a service + // account. Does not include identities that come from external identity + // providers (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that + // represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An + // identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * + // `group:{emailid}`: An email address that represents a Google group. For + // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain + // (primary) that represents all the users of that domain. For example, + // `google.com` or `example.com`. * + // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub + // ject/{subject_attribute_value}`: A single identity in a workforce identity + // pool. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // group/{group_id}`: All workforce identities in a group. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // attribute.{attribute_name}/{attribute_value}`: All workforce identities with + // a specific attribute value. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // *`: All identities in a workforce identity pool. * + // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo + // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single + // identity in a workload identity pool. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool + // group. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} + // `: All identities in a workload identity pool with a certain attribute. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity + // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently deleted. For + // example, `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered user + // retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a service account that has been recently + // deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the + // service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains the + // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email + // address (plus unique identifier) representing a Google group that has been + // recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is recovered, + // this value reverts to `group:{emailid}` and the recovered group retains the + // role in the binding. * + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool + // _id}/subject/{subject_attribute_value}`: Deleted single identity in a + // workforce identity pool. For example, + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po + // ol-id/subject/my-subject-attribute-value`. + Members []string `json:"members,omitempty"` + // Role: Role that is assigned to the list of `members`, or principals. For + // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview + // of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). + Role string `json:"role,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, service +// accounts, Google groups, and domains (such as G Suite). A `role` is a named +// list of permissions; each `role` can be an IAM predefined role or a +// user-created custom role. For some types of Google Cloud resources, a +// `binding` can also specify a `condition`, which is a logical expression that +// allows access to a resource only if the expression evaluates to `true`. A +// condition can add constraints based on attributes of the request, the +// resource, or both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON +// example:** ``` { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": +// "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": +// "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com +// role: roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access after +// Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') +// etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, +// see the IAM documentation (https://cloud.google.com/iam/docs/). +type GoogleIamV1Policy struct { + // Bindings: Associates a list of `members`, or principals, with a `role`. + // Optionally, may specify a `condition` that determines how and when the + // `bindings` are applied. Each of the `bindings` must contain at least one + // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; + // up to 250 of these principals can be Google groups. Each occurrence of a + // principal counts towards these limits. For example, if the `bindings` grant + // 50 different roles to `user:alice@example.com`, and not to any other + // principal, then you can add another 1,450 principals to the `bindings` in + // the `Policy`. + Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` + // Etag: `etag` is used for optimistic concurrency control as a way to help + // prevent simultaneous updates of a policy from overwriting each other. It is + // strongly suggested that systems make use of the `etag` in the + // read-modify-write cycle to perform policy updates in order to avoid race + // conditions: An `etag` is returned in the response to `getIamPolicy`, and + // systems are expected to put that etag in the request to `setIamPolicy` to + // ensure that their change will be applied to the same version of the policy. + // **Important:** If you use IAM Conditions, you must include the `etag` field + // whenever you call `setIamPolicy`. If you omit this field, then IAM allows + // you to overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + // Version: Specifies the format of the policy. Valid values are `0`, `1`, and + // `3`. Requests that specify an invalid value are rejected. Any operation that + // affects conditional role bindings must specify version `3`. This requirement + // applies to the following operations: * Getting a policy that includes a + // conditional role binding * Adding a conditional role binding to a policy * + // Changing a conditional role binding in a policy * Removing any role binding, + // with or without a condition, from a policy that includes conditions + // **Important:** If you use IAM Conditions, you must include the `etag` field + // whenever you call `setIamPolicy`. If you omit this field, then IAM allows + // you to overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. If a policy does not + // include any conditions, operations on that policy may specify any valid + // version or leave the field unset. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Bindings") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bindings") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type GoogleIamV1SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the `resource`. The + // size of the policy is limited to a few 10s of KB. An empty policy is a valid + // policy but certain Google Cloud services (such as Projects) might reject + // them. + Policy *GoogleIamV1Policy `json:"policy,omitempty"` + // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1SetIamPolicyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -52245,6 +52842,196 @@ func (c *ProjectsLocationsCollectionsEnginesAssistantsGetCall) Do(opts ...google return ret, nil } +type ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListAvailableAgentViews: Lists the data for displaying the Agents under an +// Assistant which are available to the caller. +// +// - parent: The parent resource name. Format: +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/assistants/{assistant}`. +func (r *ProjectsLocationsCollectionsEnginesAssistantsService) ListAvailableAgentViews(parent string) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c := &ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// AgentOrigin sets the optional parameter "agentOrigin": The origin of the +// Agent. +// +// Possible values: +// +// "AGENT_ORIGIN_UNSPECIFIED" - The origin is unspecified. +// "GOOGLE" - Agent defined by Google. +// "ORGANIZATION" - Agent defined by the organization. +// "USER" - Agent defined by the user. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) AgentOrigin(agentOrigin string) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("agentOrigin", agentOrigin) + return c +} + +// Filter sets the optional parameter "filter": The filter syntax consists of +// an expression language for constructing a predicate from one or more fields +// of the files being filtered. Filter expression is case-sensitive. Allowed +// fields are: * `display_name` * `state` Some examples of filters would be: * +// `display_name = 'agent_1'` * `display_name = 'agent_1' AND state = ENABLED` +// For a full description of the filter format, please see +// https://google.aip.dev/160. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LanguageCode sets the optional parameter "languageCode": The UI language +// currently shown to the user. Specifying this field request that the texts in +// the AgentViews in the response should be translated to this language. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) LanguageCode(languageCode string) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// MaxSuggestedPrompts sets the optional parameter "maxSuggestedPrompts": The +// maximum number of suggested prompts to return per agent. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) MaxSuggestedPrompts(maxSuggestedPrompts int64) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("maxSuggestedPrompts", fmt.Sprint(maxSuggestedPrompts)) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// AgentViewss to return. If unspecified, defaults to 100. The maximum allowed +// value is 1000; anything above that will be coerced down to 1000. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListAvailableAgentViewsResponse.next_page_token, received from a previous +// AgentService.ListAvailableAgentViews call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// ListAvailableAgentViews must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// SortBy sets the optional parameter "sortBy": The field to sort by. Can have +// the following values: - display-name: The display name of the agent. - +// description: The description of the agent. - create-time: The creation time +// of the agent. - state: The state of the agent. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) SortBy(sortBy string) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("sortBy", sortBy) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}:listAvailableAgentViews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.listAvailableAgentViews", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.assistants.listAvailableAgentViews" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse.ServerRespo +// nse.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 *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.listAvailableAgentViews", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *ProjectsLocationsCollectionsEnginesAssistantsListAvailableAgentViewsCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsCollectionsEnginesAssistantsPatchCall struct { s *Service name string @@ -52674,6 +53461,210 @@ func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsDeleteCall) Do(opts return ret, nil } +type ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DisableAgent: Disables an Agent. The `state` of the Agent becomes +// `DISABLED`. Can be called on an Agent in the state `ENABLED` or`SUSPENDED`, +// otherwise it returns an error. +// +// - name: The name of the Agent to disable. Format: +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/assistants/{assistant}/agents/{agent}`. +func (r *ProjectsLocationsCollectionsEnginesAssistantsAgentsService) DisableAgent(name string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall { + c := &ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall{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 +// details. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:disableAgent") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.disableAgent", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.assistants.agents.disableAgent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAgent.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 *ProjectsLocationsCollectionsEnginesAssistantsAgentsDisableAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAgent, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaAgent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.disableAgent", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EnableAgent: Enables an Agent. The `state` of the Agent becomes `ENABLED`. +// Can be called on an Agent in the state `DISABLED` or 'SUSPENDED', otherwise +// it returns an error. +// +// - name: The name of the Agent to enable. Format: +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/assistants/{assistant}/agents/{agent}`. +func (r *ProjectsLocationsCollectionsEnginesAssistantsAgentsService) EnableAgent(name string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall { + c := &ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall{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 +// details. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:enableAgent") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.enableAgent", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.assistants.agents.enableAgent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAgent.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 *ProjectsLocationsCollectionsEnginesAssistantsAgentsEnableAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAgent, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaAgent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.enableAgent", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsEnginesAssistantsAgentsGetCall struct { s *Service name string @@ -52786,6 +53777,266 @@ func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetCall) Do(opts ... return ret, nil } +type ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetAgentView: Returns a AgentView for a given Agent, which contains +// additional information about the Agent. +// +// - name: The name of the Agent to get. Format: +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/assistants/{assistant}/agents/{agent}`. +func (r *ProjectsLocationsCollectionsEnginesAssistantsAgentsService) GetAgentView(name string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall { + c := &ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// LanguageCode sets the optional parameter "languageCode": The UI language +// currently shown to the user. Specifying this field request that the texts in +// the AgentView in the response should be translated to this language. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) LanguageCode(languageCode string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// MaxSuggestedPrompts sets the optional parameter "maxSuggestedPrompts": The +// maximum number of suggested prompts to return per agent. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) MaxSuggestedPrompts(maxSuggestedPrompts int64) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall { + c.urlParams_.Set("maxSuggestedPrompts", fmt.Sprint(maxSuggestedPrompts)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:getAgentView") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.getAgentView", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.assistants.agents.getAgentView" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse.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 *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetAgentViewCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.getAgentView", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for an agent resource. A +// `NOT_FOUND` error is returned if the resource does not exist. An empty +// policy is returned if the resource exists but does not have a policy set on +// it. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsCollectionsEnginesAssistantsAgentsService) GetIamPolicy(resource string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall { + c := &ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.assistants.agents.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsCollectionsEnginesAssistantsAgentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsEnginesAssistantsAgentsListCall struct { s *Service parent string @@ -53060,6 +54311,226 @@ func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsPatchCall) Do(opts . return ret, nil } +type ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy for an agent resource. A +// `NOT_FOUND` error is returned if the resource does not exist. Policy can +// only contain `roles/discoveryengine.agentUser`, +// `roles/discoveryengine.agentViewer` and `roles/discoveryengine.agentEditor` +// roles. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsCollectionsEnginesAssistantsAgentsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall { + c := &ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") + 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{ + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.assistants.agents.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsCollectionsEnginesAssistantsAgentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SuspendAgent: Suspends an Agent. It is still available for viewing but not +// for use. The `state` of the Agent becomes `SUSPENDED`. Can be called on an +// Agent in the state `ENABLED`, otherwise it returns an error. +// +// - name: The name of the Agent to suspend. Format: +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/assistants/{assistant}/agents/{agent}`. +func (r *ProjectsLocationsCollectionsEnginesAssistantsAgentsService) SuspendAgent(name string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall { + c := &ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// SuspensionReason sets the optional parameter "suspensionReason": Required. +// The reason for suspending the Agent. This will be shown to the users of the +// Agent. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall) SuspensionReason(suspensionReason string) *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall { + c.urlParams_.Set("suspensionReason", suspensionReason) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:suspendAgent") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.suspendAgent", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.assistants.agents.suspendAgent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAgent.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 *ProjectsLocationsCollectionsEnginesAssistantsAgentsSuspendAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAgent, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaAgent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.assistants.agents.suspendAgent", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsEnginesAssistantsAgentsFilesImportCall struct { s *Service parent string @@ -74357,6 +75828,117 @@ func (c *ProjectsLocationsUserStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the LicenseConfigUsageStatss associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/userStores/{user_store_id}`. +func (r *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService) List(parent string) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c := &ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Context(ctx context.Context) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/licenseConfigsUsageStats") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse.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 *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsUserStoresOperationsGetCall struct { s *Service name string @@ -74654,13 +76236,13 @@ func (r *ProjectsLocationsUserStoresUserLicensesService) List(parent string) *Pr } // Filter sets the optional parameter "filter": Filter for the list request. -// Supported fields: * `license_assignment_state` Examples: * -// `license_assignment_state = ASSIGNED` to list assigned user licenses. * -// `license_assignment_state = NO_LICENSE` to list not licensed users. * -// `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who -// attempted login but no license assigned. * `license_assignment_state != -// NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no -// license assigned. +// Supported fields: * `license`_`assignment`_`state` * `user_principal` * +// `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list +// assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to +// list not licensed users. * `license`_`assignment`_`state = +// NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license +// assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to +// filter out users who attempted login but no license assigned. func (c *ProjectsLocationsUserStoresUserLicensesListCall) Filter(filter string) *ProjectsLocationsUserStoresUserLicensesListCall { c.urlParams_.Set("filter", filter) return c diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 2ad0fd91901..2d5103569c6 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -8672,6 +8672,36 @@ } }, "resources": { + "licenseConfigsUsageStats": { + "methods": { + "list": { + "description": "Lists all the LicenseConfigUsageStatss associated with the project.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userStores/{userStoresId}/licenseConfigsUsageStats", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/userStores/{user_store_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/userStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/licenseConfigsUsageStats", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/discoveryengine.readwrite" + ] + } + } + }, "userLicenses": { "methods": { "list": { @@ -8684,7 +8714,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filter for the list request. Supported fields: * `license_assignment_state` Examples: * `license_assignment_state = ASSIGNED` to list assigned user licenses. * `license_assignment_state = NO_LICENSE` to list not licensed users. * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.", + "description": "Optional. Filter for the list request. Supported fields: * `license`_`assignment`_`state` * `user_principal` * `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to list not licensed users. * `license`_`assignment`_`state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.", "location": "query", "type": "string" }, @@ -8802,7 +8832,7 @@ } } }, - "revision": "20251030", + "revision": "20251109", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GdataBlobstore2Info": { @@ -11548,6 +11578,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -11650,6 +11684,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1CmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -11724,6 +11763,23 @@ "$ref": "GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -16589,6 +16645,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -16691,6 +16751,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -16765,6 +16830,23 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -24666,6 +24748,10 @@ "description": "Optional. If true, the LLM based annotation is added to the image during parsing.", "type": "boolean" }, + "enableLlmLayoutParsing": { + "description": "Optional. If true, the pdf layout will be refined using an LLM.", + "type": "boolean" + }, "enableTableAnnotation": { "description": "Optional. If true, the LLM based annotation is added to the table during parsing.", "type": "boolean" @@ -24800,6 +24886,11 @@ "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", "readOnly": true }, + "cmekConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaCmekConfig", + "description": "Output only. CMEK-related information for the Engine.", + "readOnly": true + }, "commonConfig": { "$ref": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", "description": "Common config spec that specifies the metadata of the engine." @@ -24874,6 +24965,23 @@ "$ref": "GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig", "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, + "modelConfigs": { + "additionalProperties": { + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "MODEL_ENABLED", + "MODEL_DISABLED" + ], + "enumDescriptions": [ + "The model state is unspecified.", + "The model is enabled by admin.", + "The model is disabled by admin." + ], + "type": "string" + }, + "description": "Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.", + "type": "object" + }, "name": { "description": "Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" @@ -26152,6 +26260,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats": { + "description": "Stats about users' licenses.", + "id": "GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats", + "properties": { + "licenseConfig": { + "description": "Required. The LicenseConfig name.", + "type": "string" + }, + "usedLicenseCount": { + "description": "Required. The number of licenses used.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaListCmekConfigsResponse": { "description": "Response message for CmekConfigService.ListCmekConfigs method.", "id": "GoogleCloudDiscoveryengineV1betaListCmekConfigsResponse", @@ -26359,6 +26483,20 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse": { + "description": "Response message for UserLicenseService.ListLicenseConfigUsageStats method.", + "id": "GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse", + "properties": { + "licenseConfigUsageStats": { + "description": "All the customer's LicenseConfigUsageStats.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse": { "description": "Response message for SampleQueryService.ListSampleQueries method.", "id": "GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index fa63564b851..eda09b83183 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1081,6 +1081,7 @@ type ProjectsLocationsUserEventsService struct { func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserStoresService { rs := &ProjectsLocationsUserStoresService{s: s} + rs.LicenseConfigsUsageStats = NewProjectsLocationsUserStoresLicenseConfigsUsageStatsService(s) rs.UserLicenses = NewProjectsLocationsUserStoresUserLicensesService(s) return rs } @@ -1088,9 +1089,20 @@ func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserSto type ProjectsLocationsUserStoresService struct { s *Service + LicenseConfigsUsageStats *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService + UserLicenses *ProjectsLocationsUserStoresUserLicensesService } +func NewProjectsLocationsUserStoresLicenseConfigsUsageStatsService(s *Service) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService { + rs := &ProjectsLocationsUserStoresLicenseConfigsUsageStatsService{s: s} + return rs +} + +type ProjectsLocationsUserStoresLicenseConfigsUsageStatsService struct { + s *Service +} + func NewProjectsLocationsUserStoresUserLicensesService(s *Service) *ProjectsLocationsUserStoresUserLicensesService { rs := &ProjectsLocationsUserStoresUserLicensesService{s: s} return rs @@ -4699,6 +4711,9 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutPars // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -4810,6 +4825,8 @@ type GoogleCloudDiscoveryengineV1Engine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1EngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1CmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1EngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -4863,6 +4880,14 @@ type GoogleCloudDiscoveryengineV1Engine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -11066,6 +11091,9 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayou // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -11177,6 +11205,8 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1alphaCmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -11230,6 +11260,14 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -22104,6 +22142,9 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayout // EnableImageAnnotation: Optional. If true, the LLM based annotation is added // to the image during parsing. EnableImageAnnotation bool `json:"enableImageAnnotation,omitempty"` + // EnableLlmLayoutParsing: Optional. If true, the pdf layout will be refined + // using an LLM. + EnableLlmLayoutParsing bool `json:"enableLlmLayoutParsing,omitempty"` // EnableTableAnnotation: Optional. If true, the LLM based annotation is added // to the table during parsing. EnableTableAnnotation bool `json:"enableTableAnnotation,omitempty"` @@ -22282,6 +22323,8 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // ChatEngineMetadata: Output only. Additional information of the Chat Engine. // Only applicable if solution_type is SOLUTION_TYPE_CHAT. ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CmekConfig: Output only. CMEK-related information for the Engine. + CmekConfig *GoogleCloudDiscoveryengineV1betaCmekConfig `json:"cmekConfig,omitempty"` // CommonConfig: Common config spec that specifies the metadata of the engine. CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` // ConfigurableBillingApproach: Optional. Configuration for configurable @@ -22335,6 +22378,14 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // applicable on the data stores with solution_type // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + // ModelConfigs: Optional. Maps a model name to its specific configuration for + // this engine. This allows admin users to turn on/off individual models. This + // only stores models whose states are overridden by the admin. When the state + // is unspecified, or model_configs is empty for this model, the system will + // decide if this model should be available or not based on the default + // configuration. For example, a preview model should be disabled by default if + // the admin has not chosen to enable it. + ModelConfigs map[string]string `json:"modelConfigs,omitempty"` // Name: Immutable. Identifier. The fully qualified resource name of the // engine. This field must be a UTF-8 encoded string with a length limit of // 1024 characters. Format: @@ -24178,6 +24229,31 @@ func (s GoogleCloudDiscoveryengineV1betaLicenseConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats: Stats about users' +// licenses. +type GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats struct { + // LicenseConfig: Required. The LicenseConfig name. + LicenseConfig string `json:"licenseConfig,omitempty"` + // UsedLicenseCount: Required. The number of licenses used. + UsedLicenseCount int64 `json:"usedLicenseCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "LicenseConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LicenseConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaListCmekConfigsResponse: Response message // for CmekConfigService.ListCmekConfigs method. type GoogleCloudDiscoveryengineV1betaListCmekConfigsResponse struct { @@ -24518,6 +24594,32 @@ func (s GoogleCloudDiscoveryengineV1betaListIdentityMappingsResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse: +// Response message for UserLicenseService.ListLicenseConfigUsageStats method. +type GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse struct { + // LicenseConfigUsageStats: All the customer's LicenseConfigUsageStats. + LicenseConfigUsageStats []*GoogleCloudDiscoveryengineV1betaLicenseConfigUsageStats `json:"licenseConfigUsageStats,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "LicenseConfigUsageStats") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LicenseConfigUsageStats") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse: Response message // for SampleQueryService.ListSampleQueries method. type GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse struct { @@ -61861,6 +61963,117 @@ func (c *ProjectsLocationsUserStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the LicenseConfigUsageStatss associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/userStores/{user_store_id}`. +func (r *ProjectsLocationsUserStoresLicenseConfigsUsageStatsService) List(parent string) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c := &ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Context(ctx context.Context) *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/licenseConfigsUsageStats") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse.ServerR +// esponse.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 *ProjectsLocationsUserStoresLicenseConfigsUsageStatsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaListLicenseConfigsUsageStatsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsUserStoresUserLicensesListCall struct { s *Service parent string @@ -61881,13 +62094,13 @@ func (r *ProjectsLocationsUserStoresUserLicensesService) List(parent string) *Pr } // Filter sets the optional parameter "filter": Filter for the list request. -// Supported fields: * `license_assignment_state` Examples: * -// `license_assignment_state = ASSIGNED` to list assigned user licenses. * -// `license_assignment_state = NO_LICENSE` to list not licensed users. * -// `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who -// attempted login but no license assigned. * `license_assignment_state != -// NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no -// license assigned. +// Supported fields: * `license`_`assignment`_`state` * `user_principal` * +// `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list +// assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to +// list not licensed users. * `license`_`assignment`_`state = +// NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license +// assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to +// filter out users who attempted login but no license assigned. func (c *ProjectsLocationsUserStoresUserLicensesListCall) Filter(filter string) *ProjectsLocationsUserStoresUserLicensesListCall { c.urlParams_.Set("filter", filter) return c diff --git a/docs/v1/docs-api.json b/docs/v1/docs-api.json index 4593144a5f5..f532308a243 100644 --- a/docs/v1/docs-api.json +++ b/docs/v1/docs-api.json @@ -221,7 +221,7 @@ } } }, - "revision": "20251022", + "revision": "20251110", "rootUrl": "https://docs.googleapis.com/", "schemas": { "AutoText": { @@ -3302,18 +3302,15 @@ "id": "RichLinkProperties", "properties": { "mimeType": { - "description": "Output only. The [MIME type](https://developers.google.com/drive/api/v3/mime-types) of the RichLink, if there's one (for example, when it's a file in Drive).", - "readOnly": true, + "description": "The [MIME type](https://developers.google.com/drive/api/v3/mime-types) of the RichLink, if there's one (for example, when it's a file in Drive).", "type": "string" }, "title": { - "description": "Output only. The title of the RichLink as displayed in the link. This title matches the title of the linked resource at the time of the insertion or last update of the link. This field is always present.", - "readOnly": true, + "description": "The title of the RichLink as displayed in the link. This title matches the title of the linked resource at the time of the insertion or last update of the link. This field is always present.", "type": "string" }, "uri": { - "description": "Output only. The URI to the RichLink. This is always present.", - "readOnly": true, + "description": "The URI to the RichLink. This is always present.", "type": "string" } }, diff --git a/docs/v1/docs-gen.go b/docs/v1/docs-gen.go index a5bab460b89..5bc44dc4c08 100644 --- a/docs/v1/docs-gen.go +++ b/docs/v1/docs-gen.go @@ -4211,15 +4211,15 @@ func (s RichLink) MarshalJSON() ([]byte, error) { // RichLinkProperties: Properties specific to a RichLink. type RichLinkProperties struct { - // MimeType: Output only. The MIME type + // MimeType: The MIME type // (https://developers.google.com/drive/api/v3/mime-types) of the RichLink, if // there's one (for example, when it's a file in Drive). MimeType string `json:"mimeType,omitempty"` - // Title: Output only. The title of the RichLink as displayed in the link. This - // title matches the title of the linked resource at the time of the insertion - // or last update of the link. This field is always present. + // Title: The title of the RichLink as displayed in the link. This title + // matches the title of the linked resource at the time of the insertion or + // last update of the link. This field is always present. Title string `json:"title,omitempty"` - // Uri: Output only. The URI to the RichLink. This is always present. + // Uri: The URI to the RichLink. This is always present. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "MimeType") to // unconditionally include in API requests. By default, fields with empty or diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 99ecbd446d8..ff4b2ffcf45 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -661,8 +661,10 @@ }, "resources": { "humanReviewConfig": { + "deprecated": true, "methods": { "reviewDocument": { + "deprecated": true, "description": "Send a document for Human Review. The input document should be processed by the specified processor.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/humanReviewConfig:reviewDocument", "httpMethod": "POST", @@ -1392,7 +1394,7 @@ } } }, - "revision": "20251030", + "revision": "20251108", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "CloudAiDocumentaiLabHifiaToolsValidationValidatorInput": { diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index e6af814556f..aa3b86e273f 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -904,8 +904,10 @@ } }, "humanReviewConfig": { + "deprecated": true, "methods": { "reviewDocument": { + "deprecated": true, "description": "Send a document for Human Review. The input document should be processed by the specified processor.", "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/humanReviewConfig:reviewDocument", "httpMethod": "POST", @@ -1634,7 +1636,7 @@ } } }, - "revision": "20251030", + "revision": "20251108", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "CloudAiDocumentaiLabHifiaToolsValidationValidatorInput": { diff --git a/firebaseappdistribution/v1/firebaseappdistribution-api.json b/firebaseappdistribution/v1/firebaseappdistribution-api.json index 06e9147f5b6..11e670deffd 100644 --- a/firebaseappdistribution/v1/firebaseappdistribution-api.json +++ b/firebaseappdistribution/v1/firebaseappdistribution-api.json @@ -548,7 +548,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -946,7 +946,7 @@ } } }, - "revision": "20251104", + "revision": "20251113", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "GdataBlobstore2Info": { @@ -1869,7 +1869,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/firebaseappdistribution/v1/firebaseappdistribution-gen.go b/firebaseappdistribution/v1/firebaseappdistribution-gen.go index 23e195851e4..2dc2af2592b 100644 --- a/firebaseappdistribution/v1/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1/firebaseappdistribution-gen.go @@ -1410,8 +1410,8 @@ type GoogleLongrunningListOperationsResponse struct { Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -3173,9 +3173,9 @@ func (c *ProjectsAppsReleasesOperationsListCall) PageToken(pageToken string) *Pr // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsAppsReleasesOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsAppsReleasesOperationsListCall { diff --git a/firebaseapphosting/v1/firebaseapphosting-api.json b/firebaseapphosting/v1/firebaseapphosting-api.json index a84592a2459..58c11c74766 100644 --- a/firebaseapphosting/v1/firebaseapphosting-api.json +++ b/firebaseapphosting/v1/firebaseapphosting-api.json @@ -1086,7 +1086,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -1106,7 +1106,7 @@ } } }, - "revision": "20251030", + "revision": "20251113", "rootUrl": "https://firebaseapphosting.googleapis.com/", "schemas": { "ArchiveSource": { @@ -2128,7 +2128,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/firebaseapphosting/v1/firebaseapphosting-gen.go b/firebaseapphosting/v1/firebaseapphosting-gen.go index 3216b38761c..be9f3558c1a 100644 --- a/firebaseapphosting/v1/firebaseapphosting-gen.go +++ b/firebaseapphosting/v1/firebaseapphosting-gen.go @@ -1300,8 +1300,8 @@ type ListOperationsResponse struct { Operations []*Operation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -5244,9 +5244,9 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { diff --git a/firebaseml/v1/firebaseml-api.json b/firebaseml/v1/firebaseml-api.json index 3de20a64cc3..9fe13351d7f 100644 --- a/firebaseml/v1/firebaseml-api.json +++ b/firebaseml/v1/firebaseml-api.json @@ -193,7 +193,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -209,7 +209,7 @@ } } }, - "revision": "20250929", + "revision": "20251116", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -240,7 +240,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/firebaseml/v1/firebaseml-gen.go b/firebaseml/v1/firebaseml-gen.go index 711290b6017..9b33c7b7433 100644 --- a/firebaseml/v1/firebaseml-gen.go +++ b/firebaseml/v1/firebaseml-gen.go @@ -185,8 +185,8 @@ type ListOperationsResponse struct { Operations []*Operation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -569,9 +569,9 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *OperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OperationsListCall { diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 0c6368150c1..8bda16d13db 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20251022", + "revision": "20251116", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -870,6 +870,17 @@ "name": { "description": "Optional. The name of the function to call. Matches [FunctionDeclaration.name].", "type": "string" + }, + "partialArgs": { + "description": "Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1PartialArg" + }, + "type": "array" + }, + "willContinue": { + "description": "Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.", + "type": "boolean" } }, "type": "object" @@ -902,6 +913,10 @@ "Model is constrained to predict either function calls or natural language response. If \"allowed_function_names\" are set, the predicted function calls will be limited to any one of \"allowed_function_names\", else the predicted function calls will be any one of the provided \"function_declarations\"." ], "type": "string" + }, + "streamFunctionCallArguments": { + "description": "Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the [FunctionCall.partial_args] field.", + "type": "boolean" } }, "type": "object" @@ -1471,6 +1486,20 @@ "description": "Optional. The token budget for the model's thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.", "format": "int32", "type": "integer" + }, + "thinkingLevel": { + "description": "Optional. The number of thoughts tokens that the model should generate.", + "enum": [ + "THINKING_LEVEL_UNSPECIFIED", + "LOW", + "HIGH" + ], + "enumDescriptions": [ + "Unspecified thinking level.", + "Low thinking level.", + "High thinking level." + ], + "type": "string" } }, "type": "object" @@ -1734,6 +1763,10 @@ "$ref": "GoogleCloudAiplatformV1beta1ImageConfigImageOutputOptions", "description": "Optional. The image output format for generated images." }, + "imageSize": { + "description": "Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.", + "type": "string" + }, "personGeneration": { "description": "Optional. Controls whether the model can generate people.", "enum": [ @@ -1914,6 +1947,10 @@ "$ref": "GoogleCloudAiplatformV1beta1Blob", "description": "Optional. The inline data content of the part. This can be used to include images, audio, or video in a request." }, + "mediaResolution": { + "$ref": "GoogleCloudAiplatformV1beta1PartMediaResolution", + "description": "per part media resolution. Media resolution for the input media." + }, "text": { "description": "Optional. The text content of the part.", "type": "string" @@ -1934,6 +1971,67 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PartMediaResolution": { + "description": "per part media resolution. Media resolution for the input media.", + "id": "GoogleCloudAiplatformV1beta1PartMediaResolution", + "properties": { + "level": { + "description": "The tokenization quality used for given media.", + "enum": [ + "MEDIA_RESOLUTION_UNSPECIFIED", + "MEDIA_RESOLUTION_LOW", + "MEDIA_RESOLUTION_MEDIUM", + "MEDIA_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Media resolution has not been set.", + "Media resolution set to low.", + "Media resolution set to medium.", + "Media resolution set to high." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PartialArg": { + "description": "Partial argument value of the function call.", + "id": "GoogleCloudAiplatformV1beta1PartialArg", + "properties": { + "boolValue": { + "description": "Optional. Represents a boolean value.", + "type": "boolean" + }, + "jsonPath": { + "description": "Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. \"$.foo.bar[0].data\".", + "type": "string" + }, + "nullValue": { + "description": "Optional. Represents a null value.", + "enum": [ + "NULL_VALUE" + ], + "enumDescriptions": [ + "Null value." + ], + "type": "string" + }, + "numberValue": { + "description": "Optional. Represents a double value.", + "format": "double", + "type": "number" + }, + "stringValue": { + "description": "Optional. Represents a string value.", + "type": "string" + }, + "willContinue": { + "description": "Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig": { "description": "Configuration for a prebuilt voice.", "id": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index ccd74d6b76c..a461849ba6f 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -1070,6 +1070,13 @@ type GoogleCloudAiplatformV1beta1FunctionCall struct { // Name: Optional. The name of the function to call. Matches // [FunctionDeclaration.name]. Name string `json:"name,omitempty"` + // PartialArgs: Optional. The partial argument value of the function call. If + // provided, represents the arguments/fields that are streamed incrementally. + PartialArgs []*GoogleCloudAiplatformV1beta1PartialArg `json:"partialArgs,omitempty"` + // WillContinue: Optional. Whether this is the last part of the FunctionCall. + // If true, another partial message for the current FunctionCall is expected to + // follow. + WillContinue bool `json:"willContinue,omitempty"` // ForceSendFields is a list of field names (e.g. "Args") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -1114,6 +1121,11 @@ type GoogleCloudAiplatformV1beta1FunctionCallingConfig struct { // "allowed_function_names", else the predicted function calls will be any one // of the provided "function_declarations". Mode string `json:"mode,omitempty"` + // StreamFunctionCallArguments: Optional. When set to true, arguments of a + // single function call will be streamed out in multiple + // parts/contents/responses. Partial parameter results will be returned in the + // [FunctionCall.partial_args] field. + StreamFunctionCallArguments bool `json:"streamFunctionCallArguments,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedFunctionNames") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1827,6 +1839,14 @@ type GoogleCloudAiplatformV1beta1GenerationConfigThinkingConfig struct { // The model will make a best effort to stay within this budget. This can be // used to control the trade-off between response quality and latency. ThinkingBudget int64 `json:"thinkingBudget,omitempty"` + // ThinkingLevel: Optional. The number of thoughts tokens that the model should + // generate. + // + // Possible values: + // "THINKING_LEVEL_UNSPECIFIED" - Unspecified thinking level. + // "LOW" - Low thinking level. + // "HIGH" - High thinking level. + ThinkingLevel string `json:"thinkingLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IncludeThoughts") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2227,6 +2247,10 @@ type GoogleCloudAiplatformV1beta1ImageConfig struct { AspectRatio string `json:"aspectRatio,omitempty"` // ImageOutputOptions: Optional. The image output format for generated images. ImageOutputOptions *GoogleCloudAiplatformV1beta1ImageConfigImageOutputOptions `json:"imageOutputOptions,omitempty"` + // ImageSize: Optional. Specifies the size of generated images. Supported + // values are `1K`, `2K`, `4K`. If not specified, the model will use default + // value `1K`. + ImageSize string `json:"imageSize,omitempty"` // PersonGeneration: Optional. Controls whether the model can generate people. // // Possible values: @@ -2513,6 +2537,9 @@ type GoogleCloudAiplatformV1beta1Part struct { // InlineData: Optional. The inline data content of the part. This can be used // to include images, audio, or video in a request. InlineData *GoogleCloudAiplatformV1beta1Blob `json:"inlineData,omitempty"` + // MediaResolution: per part media resolution. Media resolution for the input + // media. + MediaResolution *GoogleCloudAiplatformV1beta1PartMediaResolution `json:"mediaResolution,omitempty"` // Text: Optional. The text content of the part. Text string `json:"text,omitempty"` // Thought: Optional. Indicates whether the `part` represents the model's @@ -2542,6 +2569,88 @@ func (s GoogleCloudAiplatformV1beta1Part) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PartMediaResolution: per part media resolution. +// Media resolution for the input media. +type GoogleCloudAiplatformV1beta1PartMediaResolution struct { + // Level: The tokenization quality used for given media. + // + // Possible values: + // "MEDIA_RESOLUTION_UNSPECIFIED" - Media resolution has not been set. + // "MEDIA_RESOLUTION_LOW" - Media resolution set to low. + // "MEDIA_RESOLUTION_MEDIUM" - Media resolution set to medium. + // "MEDIA_RESOLUTION_HIGH" - Media resolution set to high. + Level string `json:"level,omitempty"` + // ForceSendFields is a list of field names (e.g. "Level") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Level") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PartMediaResolution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PartMediaResolution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PartialArg: Partial argument value of the +// function call. +type GoogleCloudAiplatformV1beta1PartialArg struct { + // BoolValue: Optional. Represents a boolean value. + BoolValue bool `json:"boolValue,omitempty"` + // JsonPath: Required. A JSON Path (RFC 9535) to the argument being streamed. + // https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". + JsonPath string `json:"jsonPath,omitempty"` + // NullValue: Optional. Represents a null value. + // + // Possible values: + // "NULL_VALUE" - Null value. + NullValue string `json:"nullValue,omitempty"` + // NumberValue: Optional. Represents a double value. + NumberValue float64 `json:"numberValue,omitempty"` + // StringValue: Optional. Represents a string value. + StringValue string `json:"stringValue,omitempty"` + // WillContinue: Optional. Whether this is not the last part of the same + // json_path. If true, another PartialArg message for the current json_path is + // expected to follow. + WillContinue bool `json:"willContinue,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoolValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoolValue") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PartialArg) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PartialArg + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1PartialArg) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1PartialArg + var s1 struct { + NumberValue gensupport.JSONFloat64 `json:"numberValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.NumberValue = float64(s1.NumberValue) + return nil +} + // GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig: Configuration for a // prebuilt voice. type GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig struct { diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 4f1f7baad4a..9822421871b 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -2416,7 +2416,7 @@ } } }, - "revision": "20251026", + "revision": "20251111", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -3783,7 +3783,7 @@ "id": "GoogleFirestoreAdminV1ExportDocumentsRequest", "properties": { "collectionIds": { - "description": "Which collection IDs to export. Unspecified means all collections. Each collection ID in this list must be unique.", + "description": "IDs of the collection groups to export. Unspecified means all collection groups. Each collection group in this list must be unique.", "items": { "type": "string" }, @@ -3986,7 +3986,7 @@ "id": "GoogleFirestoreAdminV1ImportDocumentsRequest", "properties": { "collectionIds": { - "description": "Which collection IDs to import. Unspecified means all collections included in the import. Each collection ID in this list must be unique.", + "description": "IDs of the collection groups to import. Unspecified means all collection groups that were included in the export. Each collection group in this list must be unique.", "items": { "type": "string" }, diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 86d3317bcd9..a5b60f66c4f 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -2107,8 +2107,8 @@ func (s GoogleFirestoreAdminV1ExportDocumentsMetadata) MarshalJSON() ([]byte, er // GoogleFirestoreAdminV1ExportDocumentsRequest: The request for // FirestoreAdmin.ExportDocuments. type GoogleFirestoreAdminV1ExportDocumentsRequest struct { - // CollectionIds: Which collection IDs to export. Unspecified means all - // collections. Each collection ID in this list must be unique. + // CollectionIds: IDs of the collection groups to export. Unspecified means all + // collection groups. Each collection group in this list must be unique. CollectionIds []string `json:"collectionIds,omitempty"` // NamespaceIds: An empty list represents all namespaces. This is the preferred // usage for databases that don't use namespaces. An empty string element @@ -2344,9 +2344,9 @@ func (s GoogleFirestoreAdminV1ImportDocumentsMetadata) MarshalJSON() ([]byte, er // GoogleFirestoreAdminV1ImportDocumentsRequest: The request for // FirestoreAdmin.ImportDocuments. type GoogleFirestoreAdminV1ImportDocumentsRequest struct { - // CollectionIds: Which collection IDs to import. Unspecified means all - // collections included in the import. Each collection ID in this list must be - // unique. + // CollectionIds: IDs of the collection groups to import. Unspecified means all + // collection groups that were included in the export. Each collection group in + // this list must be unique. CollectionIds []string `json:"collectionIds,omitempty"` // InputUriPrefix: Location of the exported files. This must match the // output_uri_prefix of an ExportDocumentsResponse from an export that has diff --git a/gkebackup/v1/gkebackup-api.json b/gkebackup/v1/gkebackup-api.json index e58610d68e0..3ff4923d87f 100644 --- a/gkebackup/v1/gkebackup-api.json +++ b/gkebackup/v1/gkebackup-api.json @@ -144,7 +144,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -2232,7 +2232,7 @@ } } }, - "revision": "20251001", + "revision": "20251027", "rootUrl": "https://gkebackup.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/gkebackup/v1/gkebackup-gen.go b/gkebackup/v1/gkebackup-gen.go index 1d8cc70f062..161d8ed869e 100644 --- a/gkebackup/v1/gkebackup-gen.go +++ b/gkebackup/v1/gkebackup-gen.go @@ -3525,9 +3525,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 1b9b2c293e8..78c035e3262 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -2498,7 +2498,7 @@ } } }, - "revision": "20251103", + "revision": "20251108", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -4559,7 +4559,7 @@ "type": "object" }, "FeatureUpdate": { - "description": "LINT.IfChange Feature config to use for Rollout.", + "description": "Feature config to use for Rollout.", "id": "FeatureUpdate", "properties": { "binaryAuthorizationConfig": { diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 501716feb53..0a11da74550 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -2825,7 +2825,7 @@ func (s FeatureState) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// FeatureUpdate: LINT.IfChange Feature config to use for Rollout. +// FeatureUpdate: Feature config to use for Rollout. type FeatureUpdate struct { // BinaryAuthorizationConfig: Optional. Configuration for Binary Authorization. BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"` diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 06bdf8471b3..3180aa2d60d 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -1480,6 +1480,238 @@ } } }, + "rolloutSequences": { + "methods": { + "create": { + "description": "Create a new rollout sequence resource.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/rolloutSequences", + "httpMethod": "POST", + "id": "gkehub.projects.locations.rolloutSequences.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this rollout sequence will be created. projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "rolloutSequenceId": { + "description": "Required. User provided identifier that is used as part of the resource name; must conform to RFC-1034 and additionally restrict to lower-cased letters. This comes out roughly to: /^a-z+[a-z0-9]$/", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/rolloutSequences", + "request": { + "$ref": "RolloutSequence" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Remove a RolloutSequence.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/rolloutSequences/{rolloutSequencesId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.rolloutSequences.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the rollout sequence to delete. projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/rolloutSequences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieve a single rollout sequence.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/rolloutSequences/{rolloutSequencesId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.rolloutSequences.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the rollout sequence to retrieve. projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/rolloutSequences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "RolloutSequence" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Retrieve the list of all rollout sequences.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/rolloutSequences", + "httpMethod": "GET", + "id": "gkehub.projects.locations.rolloutSequences.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists Rollout Sequences that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of rollout sequences to return. The service may return fewer than this value. If unspecified, at most 50 rollout sequences will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListRolloutSequences` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRolloutSequences` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of rollout sequences. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/rolloutSequences", + "response": { + "$ref": "ListRolloutSequencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update a rollout sequence.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/rolloutSequences/{rolloutSequencesId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.rolloutSequences.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the rollout sequence in the format of: projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/rolloutSequences/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The list of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "RolloutSequence" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "rollouts": { + "methods": { + "get": { + "description": "Retrieve a single rollout.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/rollouts/{rolloutsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.rollouts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the rollout to retrieve. projects/{project}/locations/{location}/rollouts/{rollout}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/rollouts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Rollout" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Retrieve the list of all rollouts.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/rollouts", + "httpMethod": "GET", + "id": "gkehub.projects.locations.rollouts.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists Rollouts that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of rollout to return. The service may return fewer than this value. If unspecified, at most 50 rollouts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListRollouts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRollouts` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of rollout. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/rollouts", + "response": { + "$ref": "ListRolloutsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "scopes": { "methods": { "create": { @@ -2122,7 +2354,7 @@ } } }, - "revision": "20251026", + "revision": "20251108", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2293,6 +2525,17 @@ "properties": {}, "type": "object" }, + "ClusterSelector": { + "description": "Selector for clusters.", + "id": "ClusterSelector", + "properties": { + "labelSelector": { + "description": "The label selector must be a valid CEL (go/cel) expression which evaluates resource.labels.", + "type": "string" + } + }, + "type": "object" + }, "ClusterUpgradeFleetSpec": { "description": "**ClusterUpgrade**: The configuration for the fleet-level ClusterUpgrade feature.", "id": "ClusterUpgradeFleetSpec", @@ -3814,6 +4057,35 @@ "properties": {}, "type": "object" }, + "ExcludedCluster": { + "description": "An excluded cluster from the rollout.", + "id": "ExcludedCluster", + "properties": { + "membership": { + "description": "Output only. The name of the fleet Membership resource associated to the excluded cluster.", + "readOnly": true, + "type": "string" + }, + "reason": { + "description": "Output only. The reason for excluding the cluster from the rollout.", + "enum": [ + "REASON_UNSPECIFIED", + "EXCLUDED_BY_FILTER", + "ALREADY_UPGRADED", + "VERSION_TOO_OLD" + ], + "enumDescriptions": [ + "Default value.", + "The cluster was excluded by the rollout filter.", + "The cluster was already upgraded.", + "The cluster version is too old." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Expr": { "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", "id": "Expr", @@ -3989,6 +4261,21 @@ }, "type": "object" }, + "FeatureUpdate": { + "description": "Feature config to use for Rollout.", + "id": "FeatureUpdate", + "properties": { + "binaryAuthorizationConfig": { + "$ref": "BinaryAuthorizationConfig", + "description": "Optional. Configuration for Binary Authorization." + }, + "securityPostureConfig": { + "$ref": "SecurityPostureConfig", + "description": "Optional. Configuration for Security Posture." + } + }, + "type": "object" + }, "Fleet": { "description": "Fleet contains the Fleet-wide metadata and configuration.", "id": "Fleet", @@ -4943,6 +5230,42 @@ }, "type": "object" }, + "ListRolloutSequencesResponse": { + "description": "Response message for listing rollout sequences.", + "id": "ListRolloutSequencesResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "rolloutSequences": { + "description": "The rollout sequences from the specified parent resource.", + "items": { + "$ref": "RolloutSequence" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListRolloutsResponse": { + "description": "Response message for listing rollouts.", + "id": "ListRolloutsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "rollouts": { + "description": "The rollouts from the specified parent resource.", + "items": { + "$ref": "Rollout" + }, + "type": "array" + } + }, + "type": "object" + }, "ListScopeNamespacesResponse": { "description": "List of fleet namespaces.", "id": "ListScopeNamespacesResponse", @@ -6268,6 +6591,331 @@ }, "type": "object" }, + "Rollout": { + "description": "Rollout contains the Rollout metadata and configuration.", + "id": "Rollout", + "properties": { + "completeTime": { + "description": "Output only. The timestamp at which the Rollout was completed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp at which the Rollout was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. The timestamp at the Rollout was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. Human readable display name of the Rollout.", + "type": "string" + }, + "etag": { + "description": "Output only. etag of the Rollout Ex. abc1234", + "readOnly": true, + "type": "string" + }, + "excludedClusters": { + "description": "Optional. Output only. The excluded clusters from the rollout.", + "items": { + "$ref": "ExcludedCluster" + }, + "readOnly": true, + "type": "array" + }, + "feature": { + "$ref": "FeatureUpdate", + "description": "Optional. Feature config to use for Rollout." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels for this Rollout.", + "type": "object" + }, + "membershipStates": { + "additionalProperties": { + "$ref": "RolloutMembershipState" + }, + "description": "Output only. States of upgrading control plane or node pool targets of a single cluster (GKE Hub membership) that's part of this Rollout. The key is the membership name of the cluster. The value is the state of the cluster.", + "readOnly": true, + "type": "object" + }, + "name": { + "description": "Identifier. The full, unique resource name of this Rollout in the format of `projects/{project}/locations/global/rollouts/{rollout}`.", + "type": "string" + }, + "rolloutSequence": { + "description": "Optional. Immutable. The full, unique resource name of the rollout sequence that initiatied this Rollout. In the format of `projects/{project}/locations/global/rolloutSequences/{rollout_sequence}`. Empty for user initiated rollouts.", + "type": "string" + }, + "schedule": { + "$ref": "Schedule", + "description": "Output only. The schedule of the Rollout.", + "readOnly": true + }, + "stages": { + "description": "Output only. The stages of the Rollout. Note: this is only populated for google-initiated rollouts.", + "items": { + "$ref": "RolloutStage" + }, + "readOnly": true, + "type": "array" + }, + "state": { + "description": "Output only. State specifies various states of the Rollout.", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "PAUSED", + "CANCELLED", + "COMPLETED", + "SCHEDULED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The Rollout is running.", + "The Rollout is paused.", + "The Rollout is in a failure terminal state.", + "The Rollout is in a terminal state.", + "The Rollout is scheduled to start." + ], + "readOnly": true, + "type": "string" + }, + "stateReason": { + "description": "Output only. A human-readable description explaining the reason for the current state.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. Google-generated UUID for this resource. This is unique across all Rollout resources. If a Rollout resource is deleted and another resource with the same name is created, it gets a different uid.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp at which the Rollout was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "versionUpgrade": { + "$ref": "VersionUpgrade", + "description": "Optional. Config for version upgrade of clusters. Note: Currently for GDCE clusters only." + } + }, + "type": "object" + }, + "RolloutMembershipState": { + "description": "Metadata about single cluster (GKE Hub membership) that's part of this Rollout.", + "id": "RolloutMembershipState", + "properties": { + "lastUpdateTime": { + "description": "Optional. Output only. The time this status and any related Rollout-specific details for the membership were updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "stageAssignment": { + "description": "Output only. The stage assignment of this cluster in this rollout.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "targets": { + "description": "Output only. The targets of the rollout - clusters or node pools that are being upgraded. All targets belongs to the same cluster, identified by the membership name (key of membership_states map).", + "items": { + "$ref": "RolloutTarget" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "RolloutSequence": { + "description": "RolloutSequence defines the desired order of upgrades.", + "id": "RolloutSequence", + "properties": { + "createTime": { + "description": "Output only. The timestamp at which the Rollout Sequence was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. The timestamp at the Rollout Sequence was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. Human readable display name of the Rollout Sequence.", + "type": "string" + }, + "etag": { + "description": "Output only. etag of the Rollout Sequence Ex. abc1234", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels for this Rollout Sequence.", + "type": "object" + }, + "name": { + "description": "Identifier. Name of the rollout sequence in the format of: projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME}", + "type": "string" + }, + "stages": { + "description": "Required. Ordered list of stages that constitutes this Rollout.", + "items": { + "$ref": "Stage" + }, + "type": "array" + }, + "uid": { + "description": "Output only. Google-generated UUID for this resource. This is unique across all Rollout Sequence resources. If a Rollout Sequence resource is deleted and another resource with the same name is created, it gets a different uid.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp at which the Rollout Sequence was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RolloutStage": { + "description": "Stage represents a single stage in the Rollout.", + "id": "RolloutStage", + "properties": { + "endTime": { + "description": "Optional. Output only. The time at which the wave ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "soakDuration": { + "description": "Optional. Duration to soak after this wave before starting the next wave.", + "format": "google-duration", + "type": "string" + }, + "stageNumber": { + "description": "Output only. The wave number to which this status applies.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "startTime": { + "description": "Optional. Output only. The time at which the wave started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the wave.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SOAKING", + "COMPLETED", + "FORCED_SOAKING" + ], + "enumDescriptions": [ + "Default value.", + "The wave is pending.", + "The wave is running.", + "The wave is soaking.", + "The wave is completed.", + "The wave is force soaking." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RolloutTarget": { + "description": "Metadata about the status of targets (clusters or node pools) involved in the Rollout.", + "id": "RolloutTarget", + "properties": { + "cluster": { + "description": "Optional. Output only. The resource link of the Cluster resource upgraded in this Rollout. It is formatted as: ///projects//locations//clusters/. I.e. for GKE clusters, it is formatted as: //container.googleapis.com/projects//locations//clusters/. For GDCE, it is formatted as: //edgecontainer.googleapis.com/projects//locations//clusters/.", + "readOnly": true, + "type": "string" + }, + "nodePool": { + "description": "Optional. Output only. The resource link of the NodePool resource upgraded in this Rollout. It is formatted as: ///projects//locations//clusters//nodePools/.", + "readOnly": true, + "type": "string" + }, + "operation": { + "description": "Optional. Output only. The operation resource name performing the mutation.", + "readOnly": true, + "type": "string" + }, + "reason": { + "description": "Optional. Output only. A human-readable description of the current status.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The high-level, machine-readable status of this Rollout for the target.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "FAILED", + "SUCCEEDED", + "PAUSED", + "REMOVED", + "INELIGIBLE" + ], + "enumDescriptions": [ + "Unspecified state.", + "The Rollout is pending for the target.", + "The Rollout is running for the target.", + "The Rollout failed for the target.", + "The Rollout succeeded for the target.", + "The Rollout is paused for the target.", + "The target was removed from the Rollout.", + "The target is ineligible for the Rollout." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Schedule": { + "description": "Schedule represents the schedule of the Rollout.", + "id": "Schedule", + "properties": { + "waves": { + "description": "Output only. The schedule of each wave in the Rollout.", + "items": { + "$ref": "WaveSchedule" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "Scope": { "description": "Scope represents a Scope in a Fleet.", "id": "Scope", @@ -6754,6 +7402,29 @@ }, "type": "object" }, + "Stage": { + "description": "Rollout stage.", + "id": "Stage", + "properties": { + "clusterSelector": { + "$ref": "ClusterSelector", + "description": "Optional. Filter members of fleets (above) to a subset of clusters. If not specified, all clusters in the fleets are selected." + }, + "fleetProjects": { + "description": "Required. List of Fleet projects to select the clusters from. Expected format: projects/{project}", + "items": { + "type": "string" + }, + "type": "array" + }, + "soakDuration": { + "description": "Optional. Soak time after upgrading all the clusters in the stage.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "Status specifies state for the subcomponent.", "id": "Status", @@ -6823,6 +7494,58 @@ } }, "type": "object" + }, + "VersionUpgrade": { + "description": "Config for version upgrade of clusters.", + "id": "VersionUpgrade", + "properties": { + "desiredVersion": { + "description": "Optional. Desired version of the component.", + "type": "string" + }, + "type": { + "description": "Optional. Type of version upgrade specifies which component should be upgraded.", + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_CONTROL_PLANE", + "TYPE_NODE_POOL", + "TYPE_CONFIG_SYNC" + ], + "enumDescriptions": [ + "Default value.", + "Control plane upgrade.", + "Node pool upgrade.", + "Config Sync upgrade." + ], + "type": "string" + } + }, + "type": "object" + }, + "WaveSchedule": { + "description": "WaveSchedule represents the schedule of a single rollout wave.", + "id": "WaveSchedule", + "properties": { + "waveEndTime": { + "description": "Output only. The time at which the wave ends.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "waveNumber": { + "description": "Output only. The wave number to which this schedule applies.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "waveStartTime": { + "description": "Output only. The time at which the wave starts.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 2bcdf37b447..4a8e8a807bf 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -208,6 +208,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Fleets = NewProjectsLocationsFleetsService(s) rs.Memberships = NewProjectsLocationsMembershipsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.RolloutSequences = NewProjectsLocationsRolloutSequencesService(s) + rs.Rollouts = NewProjectsLocationsRolloutsService(s) rs.Scopes = NewProjectsLocationsScopesService(s) return rs } @@ -223,6 +225,10 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService + RolloutSequences *ProjectsLocationsRolloutSequencesService + + Rollouts *ProjectsLocationsRolloutsService + Scopes *ProjectsLocationsScopesService } @@ -286,6 +292,24 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsRolloutSequencesService(s *Service) *ProjectsLocationsRolloutSequencesService { + rs := &ProjectsLocationsRolloutSequencesService{s: s} + return rs +} + +type ProjectsLocationsRolloutSequencesService struct { + s *Service +} + +func NewProjectsLocationsRolloutsService(s *Service) *ProjectsLocationsRolloutsService { + rs := &ProjectsLocationsRolloutsService{s: s} + return rs +} + +type ProjectsLocationsRolloutsService struct { + s *Service +} + func NewProjectsLocationsScopesService(s *Service) *ProjectsLocationsScopesService { rs := &ProjectsLocationsScopesService{s: s} rs.Namespaces = NewProjectsLocationsScopesNamespacesService(s) @@ -636,6 +660,29 @@ func (s Binding) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ClusterSelector: Selector for clusters. +type ClusterSelector struct { + // LabelSelector: The label selector must be a valid CEL (go/cel) expression + // which evaluates resource.labels. + LabelSelector string `json:"labelSelector,omitempty"` + // ForceSendFields is a list of field names (e.g. "LabelSelector") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LabelSelector") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClusterSelector) MarshalJSON() ([]byte, error) { + type NoMethod ClusterSelector + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ClusterUpgradeFleetSpec: **ClusterUpgrade**: The configuration for the // fleet-level ClusterUpgrade feature. type ClusterUpgradeFleetSpec struct { @@ -2356,6 +2403,37 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// ExcludedCluster: An excluded cluster from the rollout. +type ExcludedCluster struct { + // Membership: Output only. The name of the fleet Membership resource + // associated to the excluded cluster. + Membership string `json:"membership,omitempty"` + // Reason: Output only. The reason for excluding the cluster from the rollout. + // + // Possible values: + // "REASON_UNSPECIFIED" - Default value. + // "EXCLUDED_BY_FILTER" - The cluster was excluded by the rollout filter. + // "ALREADY_UPGRADED" - The cluster was already upgraded. + // "VERSION_TOO_OLD" - The cluster version is too old. + Reason string `json:"reason,omitempty"` + // ForceSendFields is a list of field names (e.g. "Membership") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Membership") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExcludedCluster) MarshalJSON() ([]byte, error) { + type NoMethod ExcludedCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Expr: Represents a textual expression in the Common Expression Language // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics // of CEL are documented at https://github.com/google/cel-spec. Example @@ -2567,6 +2645,30 @@ func (s FeatureState) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// FeatureUpdate: Feature config to use for Rollout. +type FeatureUpdate struct { + // BinaryAuthorizationConfig: Optional. Configuration for Binary Authorization. + BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"` + // SecurityPostureConfig: Optional. Configuration for Security Posture. + SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "BinaryAuthorizationConfig") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BinaryAuthorizationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FeatureUpdate) MarshalJSON() ([]byte, error) { + type NoMethod FeatureUpdate + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Fleet: Fleet contains the Fleet-wide metadata and configuration. type Fleet struct { // CreateTime: Output only. When the Fleet was created. @@ -3859,6 +3961,63 @@ func (s ListPermittedScopesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListRolloutSequencesResponse: Response message for listing rollout +// sequences. +type ListRolloutSequencesResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // RolloutSequences: The rollout sequences from the specified parent resource. + RolloutSequences []*RolloutSequence `json:"rolloutSequences,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListRolloutSequencesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRolloutSequencesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListRolloutsResponse: Response message for listing rollouts. +type ListRolloutsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Rollouts: The rollouts from the specified parent resource. + Rollouts []*Rollout `json:"rollouts,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListRolloutsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRolloutsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListScopeNamespacesResponse: List of fleet namespaces. type ListScopeNamespacesResponse struct { // NextPageToken: A token to request the next page of resources from the @@ -5524,6 +5683,277 @@ func (s Role) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Rollout: Rollout contains the Rollout metadata and configuration. +type Rollout struct { + // CompleteTime: Output only. The timestamp at which the Rollout was completed. + CompleteTime string `json:"completeTime,omitempty"` + // CreateTime: Output only. The timestamp at which the Rollout was created. + CreateTime string `json:"createTime,omitempty"` + // DeleteTime: Output only. The timestamp at the Rollout was deleted. + DeleteTime string `json:"deleteTime,omitempty"` + // DisplayName: Optional. Human readable display name of the Rollout. + DisplayName string `json:"displayName,omitempty"` + // Etag: Output only. etag of the Rollout Ex. abc1234 + Etag string `json:"etag,omitempty"` + // ExcludedClusters: Optional. Output only. The excluded clusters from the + // rollout. + ExcludedClusters []*ExcludedCluster `json:"excludedClusters,omitempty"` + // Feature: Optional. Feature config to use for Rollout. + Feature *FeatureUpdate `json:"feature,omitempty"` + // Labels: Optional. Labels for this Rollout. + Labels map[string]string `json:"labels,omitempty"` + // MembershipStates: Output only. States of upgrading control plane or node + // pool targets of a single cluster (GKE Hub membership) that's part of this + // Rollout. The key is the membership name of the cluster. The value is the + // state of the cluster. + MembershipStates map[string]RolloutMembershipState `json:"membershipStates,omitempty"` + // Name: Identifier. The full, unique resource name of this Rollout in the + // format of `projects/{project}/locations/global/rollouts/{rollout}`. + Name string `json:"name,omitempty"` + // RolloutSequence: Optional. Immutable. The full, unique resource name of the + // rollout sequence that initiatied this Rollout. In the format of + // `projects/{project}/locations/global/rolloutSequences/{rollout_sequence}`. + // Empty for user initiated rollouts. + RolloutSequence string `json:"rolloutSequence,omitempty"` + // Schedule: Output only. The schedule of the Rollout. + Schedule *Schedule `json:"schedule,omitempty"` + // Stages: Output only. The stages of the Rollout. Note: this is only populated + // for google-initiated rollouts. + Stages []*RolloutStage `json:"stages,omitempty"` + // State: Output only. State specifies various states of the Rollout. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "RUNNING" - The Rollout is running. + // "PAUSED" - The Rollout is paused. + // "CANCELLED" - The Rollout is in a failure terminal state. + // "COMPLETED" - The Rollout is in a terminal state. + // "SCHEDULED" - The Rollout is scheduled to start. + State string `json:"state,omitempty"` + // StateReason: Output only. A human-readable description explaining the reason + // for the current state. + StateReason string `json:"stateReason,omitempty"` + // Uid: Output only. Google-generated UUID for this resource. This is unique + // across all Rollout resources. If a Rollout resource is deleted and another + // resource with the same name is created, it gets a different uid. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The timestamp at which the Rollout was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // VersionUpgrade: Optional. Config for version upgrade of clusters. Note: + // Currently for GDCE clusters only. + VersionUpgrade *VersionUpgrade `json:"versionUpgrade,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CompleteTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Rollout) MarshalJSON() ([]byte, error) { + type NoMethod Rollout + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutMembershipState: Metadata about single cluster (GKE Hub membership) +// that's part of this Rollout. +type RolloutMembershipState struct { + // LastUpdateTime: Optional. Output only. The time this status and any related + // Rollout-specific details for the membership were updated. + LastUpdateTime string `json:"lastUpdateTime,omitempty"` + // StageAssignment: Output only. The stage assignment of this cluster in this + // rollout. + StageAssignment int64 `json:"stageAssignment,omitempty"` + // Targets: Output only. The targets of the rollout - clusters or node pools + // that are being upgraded. All targets belongs to the same cluster, identified + // by the membership name (key of membership_states map). + Targets []*RolloutTarget `json:"targets,omitempty"` + // ForceSendFields is a list of field names (e.g. "LastUpdateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LastUpdateTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutMembershipState) MarshalJSON() ([]byte, error) { + type NoMethod RolloutMembershipState + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutSequence: RolloutSequence defines the desired order of upgrades. +type RolloutSequence struct { + // CreateTime: Output only. The timestamp at which the Rollout Sequence was + // created. + CreateTime string `json:"createTime,omitempty"` + // DeleteTime: Output only. The timestamp at the Rollout Sequence was deleted. + DeleteTime string `json:"deleteTime,omitempty"` + // DisplayName: Optional. Human readable display name of the Rollout Sequence. + DisplayName string `json:"displayName,omitempty"` + // Etag: Output only. etag of the Rollout Sequence Ex. abc1234 + Etag string `json:"etag,omitempty"` + // Labels: Optional. Labels for this Rollout Sequence. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. Name of the rollout sequence in the format of: + // projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME} + Name string `json:"name,omitempty"` + // Stages: Required. Ordered list of stages that constitutes this Rollout. + Stages []*Stage `json:"stages,omitempty"` + // Uid: Output only. Google-generated UUID for this resource. This is unique + // across all Rollout Sequence resources. If a Rollout Sequence resource is + // deleted and another resource with the same name is created, it gets a + // different uid. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The timestamp at which the Rollout Sequence was + // last updated. + 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. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutSequence) MarshalJSON() ([]byte, error) { + type NoMethod RolloutSequence + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutStage: Stage represents a single stage in the Rollout. +type RolloutStage struct { + // EndTime: Optional. Output only. The time at which the wave ended. + EndTime string `json:"endTime,omitempty"` + // SoakDuration: Optional. Duration to soak after this wave before starting the + // next wave. + SoakDuration string `json:"soakDuration,omitempty"` + // StageNumber: Output only. The wave number to which this status applies. + StageNumber int64 `json:"stageNumber,omitempty"` + // StartTime: Optional. Output only. The time at which the wave started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The state of the wave. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. + // "PENDING" - The wave is pending. + // "RUNNING" - The wave is running. + // "SOAKING" - The wave is soaking. + // "COMPLETED" - The wave is completed. + // "FORCED_SOAKING" - The wave is force soaking. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutStage) MarshalJSON() ([]byte, error) { + type NoMethod RolloutStage + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutTarget: Metadata about the status of targets (clusters or node pools) +// involved in the Rollout. +type RolloutTarget struct { + // Cluster: Optional. Output only. The resource link of the Cluster resource + // upgraded in this Rollout. It is formatted as: + // ///projects//locations//clusters/. I.e. for GKE clusters, it is formatted + // as: //container.googleapis.com/projects//locations//clusters/. For GDCE, it + // is formatted as: + // //edgecontainer.googleapis.com/projects//locations//clusters/. + Cluster string `json:"cluster,omitempty"` + // NodePool: Optional. Output only. The resource link of the NodePool resource + // upgraded in this Rollout. It is formatted as: + // ///projects//locations//clusters//nodePools/. + NodePool string `json:"nodePool,omitempty"` + // Operation: Optional. Output only. The operation resource name performing the + // mutation. + Operation string `json:"operation,omitempty"` + // Reason: Optional. Output only. A human-readable description of the current + // status. + Reason string `json:"reason,omitempty"` + // State: Output only. The high-level, machine-readable status of this Rollout + // for the target. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "PENDING" - The Rollout is pending for the target. + // "RUNNING" - The Rollout is running for the target. + // "FAILED" - The Rollout failed for the target. + // "SUCCEEDED" - The Rollout succeeded for the target. + // "PAUSED" - The Rollout is paused for the target. + // "REMOVED" - The target was removed from the Rollout. + // "INELIGIBLE" - The target is ineligible for the Rollout. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cluster") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutTarget) MarshalJSON() ([]byte, error) { + type NoMethod RolloutTarget + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Schedule: Schedule represents the schedule of the Rollout. +type Schedule struct { + // Waves: Output only. The schedule of each wave in the Rollout. + Waves []*WaveSchedule `json:"waves,omitempty"` + // ForceSendFields is a list of field names (e.g. "Waves") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Waves") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Schedule) MarshalJSON() ([]byte, error) { + type NoMethod Schedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Scope: Scope represents a Scope in a Fleet. type Scope struct { // CreateTime: Output only. When the scope was created. @@ -6008,6 +6438,35 @@ func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Stage: Rollout stage. +type Stage struct { + // ClusterSelector: Optional. Filter members of fleets (above) to a subset of + // clusters. If not specified, all clusters in the fleets are selected. + ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"` + // FleetProjects: Required. List of Fleet projects to select the clusters from. + // Expected format: projects/{project} + FleetProjects []string `json:"fleetProjects,omitempty"` + // SoakDuration: Optional. Soak time after upgrading all the clusters in the + // stage. + SoakDuration string `json:"soakDuration,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterSelector") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClusterSelector") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Stage) MarshalJSON() ([]byte, error) { + type NoMethod Stage + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Status: Status specifies state for the subcomponent. type Status struct { // Code: Code specifies AppDevExperienceFeature's subcomponent ready state. @@ -6120,16 +6579,73 @@ func (s TypeMeta) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrganizationsLocationsFleetsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns all fleets within an organization or a project that the caller +// VersionUpgrade: Config for version upgrade of clusters. +type VersionUpgrade struct { + // DesiredVersion: Optional. Desired version of the component. + DesiredVersion string `json:"desiredVersion,omitempty"` + // Type: Optional. Type of version upgrade specifies which component should be + // upgraded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "TYPE_CONTROL_PLANE" - Control plane upgrade. + // "TYPE_NODE_POOL" - Node pool upgrade. + // "TYPE_CONFIG_SYNC" - Config Sync upgrade. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DesiredVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DesiredVersion") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VersionUpgrade) MarshalJSON() ([]byte, error) { + type NoMethod VersionUpgrade + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// WaveSchedule: WaveSchedule represents the schedule of a single rollout wave. +type WaveSchedule struct { + // WaveEndTime: Output only. The time at which the wave ends. + WaveEndTime string `json:"waveEndTime,omitempty"` + // WaveNumber: Output only. The wave number to which this schedule applies. + WaveNumber int64 `json:"waveNumber,omitempty"` + // WaveStartTime: Output only. The time at which the wave starts. + WaveStartTime string `json:"waveStartTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "WaveEndTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "WaveEndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s WaveSchedule) MarshalJSON() ([]byte, error) { + type NoMethod WaveSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type OrganizationsLocationsFleetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all fleets within an organization or a project that the caller // has access to. // // - parent: The organization or project to list for Fleets under, in the @@ -11092,6 +11608,865 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } +type ProjectsLocationsRolloutSequencesCreateCall struct { + s *Service + parent string + rolloutsequence *RolloutSequence + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new rollout sequence resource. +// +// - parent: The parent resource where this rollout sequence will be created. +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsRolloutSequencesService) Create(parent string, rolloutsequence *RolloutSequence) *ProjectsLocationsRolloutSequencesCreateCall { + c := &ProjectsLocationsRolloutSequencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.rolloutsequence = rolloutsequence + return c +} + +// RolloutSequenceId sets the optional parameter "rolloutSequenceId": Required. +// User provided identifier that is used as part of the resource name; must +// conform to RFC-1034 and additionally restrict to lower-cased letters. This +// comes out roughly to: /^a-z+[a-z0-9]$/ +func (c *ProjectsLocationsRolloutSequencesCreateCall) RolloutSequenceId(rolloutSequenceId string) *ProjectsLocationsRolloutSequencesCreateCall { + c.urlParams_.Set("rolloutSequenceId", rolloutSequenceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsRolloutSequencesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRolloutSequencesCreateCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRolloutSequencesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRolloutSequencesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutsequence) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rolloutSequences") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.rolloutSequences.create" call. +// 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 *ProjectsLocationsRolloutSequencesCreateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRolloutSequencesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Remove a RolloutSequence. +// +// - name: The name of the rollout sequence to delete. +// projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}. +func (r *ProjectsLocationsRolloutSequencesService) Delete(name string) *ProjectsLocationsRolloutSequencesDeleteCall { + c := &ProjectsLocationsRolloutSequencesDeleteCall{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 +// details. +func (c *ProjectsLocationsRolloutSequencesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRolloutSequencesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRolloutSequencesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRolloutSequencesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.rolloutSequences.delete" call. +// 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 *ProjectsLocationsRolloutSequencesDeleteCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRolloutSequencesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve a single rollout sequence. +// +// - name: The name of the rollout sequence to retrieve. +// projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}. +func (r *ProjectsLocationsRolloutSequencesService) Get(name string) *ProjectsLocationsRolloutSequencesGetCall { + c := &ProjectsLocationsRolloutSequencesGetCall{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 +// details. +func (c *ProjectsLocationsRolloutSequencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsRolloutSequencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutSequencesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRolloutSequencesGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRolloutSequencesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRolloutSequencesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.rolloutSequences.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *RolloutSequence.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 *ProjectsLocationsRolloutSequencesGetCall) Do(opts ...googleapi.CallOption) (*RolloutSequence, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &RolloutSequence{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRolloutSequencesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve the list of all rollout sequences. +// +// - parent: The parent, which owns this collection of rollout sequences. +// Format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsRolloutSequencesService) List(parent string) *ProjectsLocationsRolloutSequencesListCall { + c := &ProjectsLocationsRolloutSequencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists Rollout Sequences that +// match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsRolloutSequencesListCall) Filter(filter string) *ProjectsLocationsRolloutSequencesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// rollout sequences to return. The service may return fewer than this value. +// If unspecified, at most 50 rollout sequences will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsRolloutSequencesListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutSequencesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListRolloutSequences` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListRolloutSequences` must match the call that provided the page token. +func (c *ProjectsLocationsRolloutSequencesListCall) PageToken(pageToken string) *ProjectsLocationsRolloutSequencesListCall { + 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 +// details. +func (c *ProjectsLocationsRolloutSequencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsRolloutSequencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutSequencesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRolloutSequencesListCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRolloutSequencesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRolloutSequencesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rolloutSequences") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.rolloutSequences.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListRolloutSequencesResponse.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 *ProjectsLocationsRolloutSequencesListCall) Do(opts ...googleapi.CallOption) (*ListRolloutSequencesResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListRolloutSequencesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *ProjectsLocationsRolloutSequencesListCall) Pages(ctx context.Context, f func(*ListRolloutSequencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsRolloutSequencesPatchCall struct { + s *Service + name string + rolloutsequence *RolloutSequence + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a rollout sequence. +// +// - name: Identifier. Name of the rollout sequence in the format of: +// projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME}. +func (r *ProjectsLocationsRolloutSequencesService) Patch(name string, rolloutsequence *RolloutSequence) *ProjectsLocationsRolloutSequencesPatchCall { + c := &ProjectsLocationsRolloutSequencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rolloutsequence = rolloutsequence + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of fields to +// update. +func (c *ProjectsLocationsRolloutSequencesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRolloutSequencesPatchCall { + 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 +// details. +func (c *ProjectsLocationsRolloutSequencesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRolloutSequencesPatchCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRolloutSequencesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRolloutSequencesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutsequence) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.rolloutSequences.patch" call. +// 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 *ProjectsLocationsRolloutSequencesPatchCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRolloutsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve a single rollout. +// +// - name: The name of the rollout to retrieve. +// projects/{project}/locations/{location}/rollouts/{rollout}. +func (r *ProjectsLocationsRolloutsService) Get(name string) *ProjectsLocationsRolloutsGetCall { + c := &ProjectsLocationsRolloutsGetCall{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 +// details. +func (c *ProjectsLocationsRolloutsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsRolloutsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRolloutsGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRolloutsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRolloutsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.rollouts.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Rollout.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 *ProjectsLocationsRolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Rollout{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRolloutsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieve the list of all rollouts. +// +// - parent: The parent, which owns this collection of rollout. Format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsRolloutsService) List(parent string) *ProjectsLocationsRolloutsListCall { + c := &ProjectsLocationsRolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists Rollouts that match the +// filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsRolloutsListCall) Filter(filter string) *ProjectsLocationsRolloutsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// rollout to return. The service may return fewer than this value. If +// unspecified, at most 50 rollouts will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsRolloutsListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListRollouts` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListRollouts` must +// match the call that provided the page token. +func (c *ProjectsLocationsRolloutsListCall) PageToken(pageToken string) *ProjectsLocationsRolloutsListCall { + 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 +// details. +func (c *ProjectsLocationsRolloutsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsRolloutsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRolloutsListCall) Context(ctx context.Context) *ProjectsLocationsRolloutsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRolloutsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRolloutsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rollouts") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.rollouts.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListRolloutsResponse.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 *ProjectsLocationsRolloutsListCall) Do(opts ...googleapi.CallOption) (*ListRolloutsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListRolloutsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *ProjectsLocationsRolloutsListCall) Pages(ctx context.Context, f func(*ListRolloutsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsScopesCreateCall struct { s *Service parent string diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index c5f34c63e08..160981cf7c2 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -1766,6 +1766,12 @@ "required": true, "type": "string" }, + "skipValidations": { + "description": "Optional. If set, skip the specified validations.", + "location": "query", + "repeated": true, + "type": "string" + }, "validateOnly": { "description": "Validate the request without actually doing any updates.", "location": "query", @@ -1964,6 +1970,12 @@ "required": true, "type": "string" }, + "skipValidations": { + "description": "Optional. If set, the server-side preflight checks will be skipped.", + "location": "query", + "repeated": true, + "type": "string" + }, "updateMask": { "description": "Required. Field mask is used to specify the fields to be overwritten in the VMwareAdminCluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all populated fields in the VmwareAdminCluster message will be updated. Empty fields will be ignored unless a field mask is used.", "format": "google-fieldmask", @@ -2190,6 +2202,12 @@ "required": true, "type": "string" }, + "skipValidations": { + "description": "Optional. List of validations to skip during cluster creation.", + "location": "query", + "repeated": true, + "type": "string" + }, "validateOnly": { "description": "Validate the request without actually doing any updates.", "location": "query", @@ -2443,6 +2461,11 @@ "required": true, "type": "string" }, + "skipValidations": { + "location": "query", + "repeated": true, + "type": "string" + }, "updateMask": { "description": "Required. Field mask is used to specify the fields to be overwritten in the VMwareCluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all populated fields in the VmwareCluster message will be updated. Empty fields will be ignored unless a field mask is used.", "format": "google-fieldmask", @@ -3140,7 +3163,7 @@ } } }, - "revision": "20251022", + "revision": "20251105", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -3172,6 +3195,59 @@ }, "type": "object" }, + "BareMetalAdminBgpLbConfig": { + "description": "BareMetalAdminBgpLbConfig represents configuration parameters for a Border Gateway Protocol (BGP) load balancer.", + "id": "BareMetalAdminBgpLbConfig", + "properties": { + "addressPools": { + "description": "Required. AddressPools is a list of non-overlapping IP pools used by load balancer typed services. All addresses must be routable to load balancer nodes. IngressVIP must be included in the pools.", + "items": { + "$ref": "BareMetalAdminLoadBalancerAddressPool" + }, + "type": "array" + }, + "asn": { + "description": "Required. BGP autonomous system number (ASN) of the cluster. This field can be updated after cluster creation.", + "format": "int64", + "type": "string" + }, + "bgpPeerConfigs": { + "description": "Required. The list of BGP peers that the cluster will connect to. At least one peer must be configured for each control plane node. Control plane nodes will connect to these peers to advertise the control plane VIP. The Services load balancer also uses these peers by default. This field can be updated after cluster creation.", + "items": { + "$ref": "BareMetalAdminBgpPeerConfig" + }, + "type": "array" + }, + "loadBalancerNodePoolConfig": { + "$ref": "BareMetalAdminLoadBalancerNodePoolConfig", + "description": "Specifies the node pool running data plane load balancing. L2 connectivity is required among nodes in this pool. If missing, the control plane node pool is used for data plane load balancing." + } + }, + "type": "object" + }, + "BareMetalAdminBgpPeerConfig": { + "description": "BareMetalAdminBgpPeerConfig represents configuration parameters for a Border Gateway Protocol (BGP) peer.", + "id": "BareMetalAdminBgpPeerConfig", + "properties": { + "asn": { + "description": "Required. BGP autonomous system number (ASN) for the network that contains the external peer device.", + "format": "int64", + "type": "string" + }, + "controlPlaneNodes": { + "description": "The IP address of the control plane node that connects to the external peer. If you don't specify any control plane nodes, all control plane nodes can connect to the external peer. If you specify one or more IP addresses, only the nodes specified participate in peering sessions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ipAddress": { + "description": "Required. The IP address of the external peer device.", + "type": "string" + } + }, + "type": "object" + }, "BareMetalAdminCluster": { "description": "Resource that represents a bare metal admin cluster.", "id": "BareMetalAdminCluster", @@ -3419,10 +3495,40 @@ }, "type": "object" }, + "BareMetalAdminLoadBalancerAddressPool": { + "description": "Represents an IP pool used by the load balancer.", + "id": "BareMetalAdminLoadBalancerAddressPool", + "properties": { + "addresses": { + "description": "Required. The addresses that are part of this pool. Each address must be either in the CIDR form (1.2.3.0/24) or range form (1.2.3.1-1.2.3.5).", + "items": { + "type": "string" + }, + "type": "array" + }, + "avoidBuggyIps": { + "description": "If true, avoid using IPs ending in .0 or .255. This avoids buggy consumer devices mistakenly dropping IPv4 traffic for those special IP addresses.", + "type": "boolean" + }, + "manualAssign": { + "description": "If true, prevent IP addresses from being automatically assigned.", + "type": "boolean" + }, + "pool": { + "description": "Required. The name of the address pool.", + "type": "string" + } + }, + "type": "object" + }, "BareMetalAdminLoadBalancerConfig": { "description": "BareMetalAdminLoadBalancerConfig specifies the load balancer configuration.", "id": "BareMetalAdminLoadBalancerConfig", "properties": { + "bgpLbConfig": { + "$ref": "BareMetalAdminBgpLbConfig", + "description": "Configuration for BGP typed load balancers." + }, "manualLbConfig": { "$ref": "BareMetalAdminManualLbConfig", "description": "Manually configured load balancers." @@ -3438,6 +3544,17 @@ }, "type": "object" }, + "BareMetalAdminLoadBalancerNodePoolConfig": { + "description": "Specifies the load balancer's node pool configuration.", + "id": "BareMetalAdminLoadBalancerNodePoolConfig", + "properties": { + "nodePoolConfig": { + "$ref": "BareMetalNodePoolConfig", + "description": "The generic configuration for a node pool running a load balancer." + } + }, + "type": "object" + }, "BareMetalAdminMachineDrainStatus": { "description": "BareMetalAdminMachineDrainStatus represents the status of bare metal node machines that are undergoing drain operations.", "id": "BareMetalAdminMachineDrainStatus", @@ -3495,13 +3612,32 @@ }, "type": "object" }, + "BareMetalAdminMultipleNetworkInterfacesConfig": { + "description": "Specifies the multiple networking interfaces cluster configuration.", + "id": "BareMetalAdminMultipleNetworkInterfacesConfig", + "properties": { + "enabled": { + "description": "Whether to enable multiple network interfaces for your pods. When set network_config.advanced_networking is automatically set to true.", + "type": "boolean" + } + }, + "type": "object" + }, "BareMetalAdminNetworkConfig": { "description": "BareMetalAdminNetworkConfig specifies the cluster network configuration.", "id": "BareMetalAdminNetworkConfig", "properties": { + "advancedNetworking": { + "description": "Enables the use of advanced Anthos networking features, such as Bundled Load Balancing with BGP or the egress NAT gateway. Setting configuration for advanced networking features will automatically set this flag.", + "type": "boolean" + }, "islandModeCidr": { "$ref": "BareMetalAdminIslandModeCidrConfig", "description": "Configuration for Island mode CIDR." + }, + "multipleNetworkInterfacesConfig": { + "$ref": "BareMetalAdminMultipleNetworkInterfacesConfig", + "description": "Configuration for multiple network interfaces." } }, "type": "object" diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index 1f5efde7a3d..fa523354bc8 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -386,6 +386,75 @@ func (s BareMetalAdminApiServerArgument) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BareMetalAdminBgpLbConfig: BareMetalAdminBgpLbConfig represents +// configuration parameters for a Border Gateway Protocol (BGP) load balancer. +type BareMetalAdminBgpLbConfig struct { + // AddressPools: Required. AddressPools is a list of non-overlapping IP pools + // used by load balancer typed services. All addresses must be routable to load + // balancer nodes. IngressVIP must be included in the pools. + AddressPools []*BareMetalAdminLoadBalancerAddressPool `json:"addressPools,omitempty"` + // Asn: Required. BGP autonomous system number (ASN) of the cluster. This field + // can be updated after cluster creation. + Asn int64 `json:"asn,omitempty,string"` + // BgpPeerConfigs: Required. The list of BGP peers that the cluster will + // connect to. At least one peer must be configured for each control plane + // node. Control plane nodes will connect to these peers to advertise the + // control plane VIP. The Services load balancer also uses these peers by + // default. This field can be updated after cluster creation. + BgpPeerConfigs []*BareMetalAdminBgpPeerConfig `json:"bgpPeerConfigs,omitempty"` + // LoadBalancerNodePoolConfig: Specifies the node pool running data plane load + // balancing. L2 connectivity is required among nodes in this pool. If missing, + // the control plane node pool is used for data plane load balancing. + LoadBalancerNodePoolConfig *BareMetalAdminLoadBalancerNodePoolConfig `json:"loadBalancerNodePoolConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AddressPools") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AddressPools") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BareMetalAdminBgpLbConfig) MarshalJSON() ([]byte, error) { + type NoMethod BareMetalAdminBgpLbConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BareMetalAdminBgpPeerConfig: BareMetalAdminBgpPeerConfig represents +// configuration parameters for a Border Gateway Protocol (BGP) peer. +type BareMetalAdminBgpPeerConfig struct { + // Asn: Required. BGP autonomous system number (ASN) for the network that + // contains the external peer device. + Asn int64 `json:"asn,omitempty,string"` + // ControlPlaneNodes: The IP address of the control plane node that connects to + // the external peer. If you don't specify any control plane nodes, all control + // plane nodes can connect to the external peer. If you specify one or more IP + // addresses, only the nodes specified participate in peering sessions. + ControlPlaneNodes []string `json:"controlPlaneNodes,omitempty"` + // IpAddress: Required. The IP address of the external peer device. + IpAddress string `json:"ipAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "Asn") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Asn") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BareMetalAdminBgpPeerConfig) MarshalJSON() ([]byte, error) { + type NoMethod BareMetalAdminBgpPeerConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BareMetalAdminCluster: Resource that represents a bare metal admin cluster. type BareMetalAdminCluster struct { // Annotations: Annotations on the bare metal admin cluster. This field has the @@ -664,24 +733,60 @@ func (s BareMetalAdminIslandModeCidrConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BareMetalAdminLoadBalancerAddressPool: Represents an IP pool used by the +// load balancer. +type BareMetalAdminLoadBalancerAddressPool struct { + // Addresses: Required. The addresses that are part of this pool. Each address + // must be either in the CIDR form (1.2.3.0/24) or range form + // (1.2.3.1-1.2.3.5). + Addresses []string `json:"addresses,omitempty"` + // AvoidBuggyIps: If true, avoid using IPs ending in .0 or .255. This avoids + // buggy consumer devices mistakenly dropping IPv4 traffic for those special IP + // addresses. + AvoidBuggyIps bool `json:"avoidBuggyIps,omitempty"` + // ManualAssign: If true, prevent IP addresses from being automatically + // assigned. + ManualAssign bool `json:"manualAssign,omitempty"` + // Pool: Required. The name of the address pool. + Pool string `json:"pool,omitempty"` + // ForceSendFields is a list of field names (e.g. "Addresses") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Addresses") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BareMetalAdminLoadBalancerAddressPool) MarshalJSON() ([]byte, error) { + type NoMethod BareMetalAdminLoadBalancerAddressPool + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BareMetalAdminLoadBalancerConfig: BareMetalAdminLoadBalancerConfig specifies // the load balancer configuration. type BareMetalAdminLoadBalancerConfig struct { + // BgpLbConfig: Configuration for BGP typed load balancers. + BgpLbConfig *BareMetalAdminBgpLbConfig `json:"bgpLbConfig,omitempty"` // ManualLbConfig: Manually configured load balancers. ManualLbConfig *BareMetalAdminManualLbConfig `json:"manualLbConfig,omitempty"` // PortConfig: Configures the ports that the load balancer will listen on. PortConfig *BareMetalAdminPortConfig `json:"portConfig,omitempty"` // VipConfig: The VIPs used by the load balancer. VipConfig *BareMetalAdminVipConfig `json:"vipConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ManualLbConfig") to + // ForceSendFields is a list of field names (e.g. "BgpLbConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManualLbConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "BgpLbConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -691,6 +796,30 @@ func (s BareMetalAdminLoadBalancerConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BareMetalAdminLoadBalancerNodePoolConfig: Specifies the load balancer's node +// pool configuration. +type BareMetalAdminLoadBalancerNodePoolConfig struct { + // NodePoolConfig: The generic configuration for a node pool running a load + // balancer. + NodePoolConfig *BareMetalNodePoolConfig `json:"nodePoolConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "NodePoolConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NodePoolConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BareMetalAdminLoadBalancerNodePoolConfig) MarshalJSON() ([]byte, error) { + type NoMethod BareMetalAdminLoadBalancerNodePoolConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BareMetalAdminMachineDrainStatus: BareMetalAdminMachineDrainStatus // represents the status of bare metal node machines that are undergoing drain // operations. @@ -792,20 +921,52 @@ func (s BareMetalAdminManualLbConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BareMetalAdminMultipleNetworkInterfacesConfig: Specifies the multiple +// networking interfaces cluster configuration. +type BareMetalAdminMultipleNetworkInterfacesConfig struct { + // Enabled: Whether to enable multiple network interfaces for your pods. When + // set network_config.advanced_networking is automatically set to true. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BareMetalAdminMultipleNetworkInterfacesConfig) MarshalJSON() ([]byte, error) { + type NoMethod BareMetalAdminMultipleNetworkInterfacesConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BareMetalAdminNetworkConfig: BareMetalAdminNetworkConfig specifies the // cluster network configuration. type BareMetalAdminNetworkConfig struct { + // AdvancedNetworking: Enables the use of advanced Anthos networking features, + // such as Bundled Load Balancing with BGP or the egress NAT gateway. Setting + // configuration for advanced networking features will automatically set this + // flag. + AdvancedNetworking bool `json:"advancedNetworking,omitempty"` // IslandModeCidr: Configuration for Island mode CIDR. IslandModeCidr *BareMetalAdminIslandModeCidrConfig `json:"islandModeCidr,omitempty"` - // ForceSendFields is a list of field names (e.g. "IslandModeCidr") to + // MultipleNetworkInterfacesConfig: Configuration for multiple network + // interfaces. + MultipleNetworkInterfacesConfig *BareMetalAdminMultipleNetworkInterfacesConfig `json:"multipleNetworkInterfacesConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdvancedNetworking") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IslandModeCidr") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "AdvancedNetworking") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -11075,6 +11236,13 @@ func (c *ProjectsLocationsVmwareAdminClustersCreateCall) AllowPreflightFailure(a return c } +// SkipValidations sets the optional parameter "skipValidations": If set, skip +// the specified validations. +func (c *ProjectsLocationsVmwareAdminClustersCreateCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareAdminClustersCreateCall { + c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...)) + return c +} + // ValidateOnly sets the optional parameter "validateOnly": Validate the // request without actually doing any updates. func (c *ProjectsLocationsVmwareAdminClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareAdminClustersCreateCall { @@ -11753,6 +11921,13 @@ func (r *ProjectsLocationsVmwareAdminClustersService) Patch(name string, vmwarea return c } +// SkipValidations sets the optional parameter "skipValidations": If set, the +// server-side preflight checks will be skipped. +func (c *ProjectsLocationsVmwareAdminClustersPatchCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareAdminClustersPatchCall { + c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...)) + return c +} + // UpdateMask sets the optional parameter "updateMask": Required. Field mask is // used to specify the fields to be overwritten in the VMwareAdminCluster // resource by the update. The fields specified in the update_mask are relative @@ -12517,6 +12692,13 @@ func (c *ProjectsLocationsVmwareClustersCreateCall) AllowPreflightFailure(allowP return c } +// SkipValidations sets the optional parameter "skipValidations": List of +// validations to skip during cluster creation. +func (c *ProjectsLocationsVmwareClustersCreateCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareClustersCreateCall { + c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...)) + return c +} + // ValidateOnly sets the optional parameter "validateOnly": Validate the // request without actually doing any updates. func (c *ProjectsLocationsVmwareClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersCreateCall { @@ -13342,6 +13524,12 @@ func (r *ProjectsLocationsVmwareClustersService) Patch(name string, vmwarecluste return c } +// SkipValidations sets the optional parameter "skipValidations": +func (c *ProjectsLocationsVmwareClustersPatchCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareClustersPatchCall { + c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...)) + return c +} + // UpdateMask sets the optional parameter "updateMask": Required. Field mask is // used to specify the fields to be overwritten in the VMwareCluster resource // by the update. The fields specified in the update_mask are relative to the diff --git a/gmail/v1/gmail-api.json b/gmail/v1/gmail-api.json index 5406d9b32d4..2928d82f94e 100644 --- a/gmail/v1/gmail-api.json +++ b/gmail/v1/gmail-api.json @@ -3077,7 +3077,7 @@ } } }, - "revision": "20250630", + "revision": "20251110", "rootUrl": "https://gmail.googleapis.com/", "schemas": { "AutoForwarding": { @@ -3153,6 +3153,39 @@ }, "type": "object" }, + "ClassificationLabelFieldValue": { + "description": "Field values for a classification label.", + "id": "ClassificationLabelFieldValue", + "properties": { + "fieldId": { + "description": "Required. The field ID for the Classification Label Value. Maps to the ID field of the Google Drive `Label.Field` object.", + "type": "string" + }, + "selection": { + "description": "Selection choice ID for the selection option. Should only be set if the field type is `SELECTION` in the Google Drive `Label.Field` object. Maps to the id field of the Google Drive `Label.Field.SelectionOptions` resource.", + "type": "string" + } + }, + "type": "object" + }, + "ClassificationLabelValue": { + "description": "Classification Labels applied to the email message. Classification Labels are different from Gmail inbox labels. Only used for Google Workspace accounts. [Learn more about classification labels](https://support.google.com/a/answer/9292382).", + "id": "ClassificationLabelValue", + "properties": { + "fields": { + "description": "Field values for the given classification label ID.", + "items": { + "$ref": "ClassificationLabelFieldValue" + }, + "type": "array" + }, + "labelId": { + "description": "Required. The canonical or raw alphanumeric classification label ID. Maps to the ID field of the Google Drive Label resource.", + "type": "string" + } + }, + "type": "object" + }, "CseIdentity": { "description": "The client-side encryption (CSE) configuration for the email address of an authenticated user. Gmail uses CSE configurations to save drafts of client-side encrypted email messages, and to sign and send encrypted email messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.", "id": "CseIdentity", @@ -3925,6 +3958,13 @@ "description": "An email message.", "id": "Message", "properties": { + "classificationLabelValues": { + "description": "Classification Label values on the message. Available Classification Label schemas can be queried using the Google Drive Labels API. Each classification label ID must be unique. If duplicate IDs are provided, only one will be retained, and the selection is arbitrary. Only used for Google Workspace accounts.", + "items": { + "$ref": "ClassificationLabelValue" + }, + "type": "array" + }, "historyId": { "description": "The ID of the last history record that modified this message.", "format": "uint64", diff --git a/gmail/v1/gmail-gen.go b/gmail/v1/gmail-gen.go index 224d7abe27d..090683cc7c5 100644 --- a/gmail/v1/gmail-gen.go +++ b/gmail/v1/gmail-gen.go @@ -486,6 +486,62 @@ func (s BatchModifyMessagesRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClassificationLabelFieldValue: Field values for a classification label. +type ClassificationLabelFieldValue struct { + // FieldId: Required. The field ID for the Classification Label Value. Maps to + // the ID field of the Google Drive `Label.Field` object. + FieldId string `json:"fieldId,omitempty"` + // Selection: Selection choice ID for the selection option. Should only be set + // if the field type is `SELECTION` in the Google Drive `Label.Field` object. + // Maps to the id field of the Google Drive `Label.Field.SelectionOptions` + // resource. + Selection string `json:"selection,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FieldId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClassificationLabelFieldValue) MarshalJSON() ([]byte, error) { + type NoMethod ClassificationLabelFieldValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ClassificationLabelValue: Classification Labels applied to the email +// message. Classification Labels are different from Gmail inbox labels. Only +// used for Google Workspace accounts. Learn more about classification labels +// (https://support.google.com/a/answer/9292382). +type ClassificationLabelValue struct { + // Fields: Field values for the given classification label ID. + Fields []*ClassificationLabelFieldValue `json:"fields,omitempty"` + // LabelId: Required. The canonical or raw alphanumeric classification label + // ID. Maps to the ID field of the Google Drive Label resource. + LabelId string `json:"labelId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Fields") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClassificationLabelValue) MarshalJSON() ([]byte, error) { + type NoMethod ClassificationLabelValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CseIdentity: The client-side encryption (CSE) configuration for the email // address of an authenticated user. Gmail uses CSE configurations to save // drafts of client-side encrypted email messages, and to sign and send @@ -1562,6 +1618,12 @@ func (s ListThreadsResponse) MarshalJSON() ([]byte, error) { // Message: An email message. type Message struct { + // ClassificationLabelValues: Classification Label values on the message. + // Available Classification Label schemas can be queried using the Google Drive + // Labels API. Each classification label ID must be unique. If duplicate IDs + // are provided, only one will be retained, and the selection is arbitrary. + // Only used for Google Workspace accounts. + ClassificationLabelValues []*ClassificationLabelValue `json:"classificationLabelValues,omitempty"` // HistoryId: The ID of the last history record that modified this message. HistoryId uint64 `json:"historyId,omitempty,string"` // Id: The immutable ID of the message. @@ -1594,15 +1656,15 @@ type Message struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "HistoryId") to - // unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "ClassificationLabelValues") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HistoryId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ClassificationLabelValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index c70269ab8b0..a8a715be0c1 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -148,7 +148,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -5137,7 +5137,7 @@ } } }, - "revision": "20251016", + "revision": "20251022", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index eba7577f88f..c5e82646026 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -6659,9 +6659,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index b8ddd47da94..a35c124f84a 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -148,7 +148,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -5684,7 +5684,7 @@ } } }, - "revision": "20251016", + "revision": "20251022", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 84eff2c4754..3e9d4adeb27 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -7420,9 +7420,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/licensing/v1/licensing-api.json b/licensing/v1/licensing-api.json index 5805ab76fd1..20abca1b629 100644 --- a/licensing/v1/licensing-api.json +++ b/licensing/v1/licensing-api.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/apps.licensing": { - "description": "View and manage G Suite licenses for your domain" + "description": "View and manage Google Workspace licenses for your domain" } } } @@ -400,7 +400,7 @@ } } }, - "revision": "20250419", + "revision": "20251108", "rootUrl": "https://licensing.googleapis.com/", "schemas": { "Empty": { diff --git a/licensing/v1/licensing-gen.go b/licensing/v1/licensing-gen.go index cb2614050a4..d171fd2bdb5 100644 --- a/licensing/v1/licensing-gen.go +++ b/licensing/v1/licensing-gen.go @@ -98,7 +98,7 @@ const mtlsBasePath = "https://licensing.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( - // View and manage G Suite licenses for your domain + // View and manage Google Workspace licenses for your domain AppsLicensingScope = "https://www.googleapis.com/auth/apps.licensing" ) diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 4c8f1179d02..bb9fc05cc83 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -635,7 +635,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -2472,7 +2472,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -4064,7 +4064,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -5312,7 +5312,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -7125,7 +7125,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -9152,7 +9152,7 @@ } } }, - "revision": "20251017", + "revision": "20251107", "rootUrl": "https://logging.googleapis.com/", "schemas": { "AppHub": { diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index c9e867aad6d..36bade18926 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -5717,9 +5717,9 @@ func (r *BillingAccountsLocationsService) List(name string) *BillingAccountsLoca return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *BillingAccountsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *BillingAccountsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c @@ -12480,9 +12480,9 @@ func (r *FoldersLocationsService) List(name string) *FoldersLocationsListCall { return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *FoldersLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *FoldersLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c @@ -18187,9 +18187,9 @@ func (r *LocationsService) List(name string) *LocationsListCall { return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *LocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *LocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c @@ -22733,9 +22733,9 @@ func (r *OrganizationsLocationsService) List(name string) *OrganizationsLocation return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *OrganizationsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *OrganizationsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c @@ -29277,9 +29277,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/merchantapi/accounts/v1/merchantapi-api.json b/merchantapi/accounts/v1/merchantapi-api.json index 6814f176498..d636f93c162 100644 --- a/merchantapi/accounts/v1/merchantapi-api.json +++ b/merchantapi/accounts/v1/merchantapi-api.json @@ -936,6 +936,76 @@ } } }, + "limits": { + "methods": { + "get": { + "description": "Retrieves an account limit.", + "flatPath": "accounts/v1/accounts/{accountsId}/limits/{limitsId}", + "httpMethod": "GET", + "id": "merchantapi.accounts.limits.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the limit to retrieve. Format: `accounts/{account}/limits/{limit}` For example: `accounts/123/limits/products~ADS_NON_EEA`", + "location": "path", + "pattern": "^accounts/[^/]+/limits/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "accounts/v1/{+name}", + "response": { + "$ref": "AccountLimit" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "list": { + "description": "Lists the limits of an account.", + "flatPath": "accounts/v1/accounts/{accountsId}/limits", + "httpMethod": "GET", + "id": "merchantapi.accounts.limits.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Required. A filter on the limit `type` is required, for example, `type = \"products\"`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of limits to return. The service may return fewer than this value. If unspecified, at most 100 limits will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListAccountLimits` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountLimits` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent account. Format: `accounts/{account}`", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "accounts/v1/{+parent}/limits", + "response": { + "$ref": "ListAccountLimitsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, "omnichannelSettings": { "methods": { "create": { @@ -2273,6 +2343,40 @@ "https://www.googleapis.com/auth/content" ] } + }, + "resources": { + "me": { + "methods": { + "verifySelf": { + "description": "Updates the user that is represented by the caller from pending to verified.", + "flatPath": "accounts/v1/accounts/{accountsId}/users/me:verifySelf", + "httpMethod": "PATCH", + "id": "merchantapi.accounts.users.me.verifySelf", + "parameterOrder": [ + "account" + ], + "parameters": { + "account": { + "description": "Required. The name of the account under which the caller is a user. Format: `accounts/{account}`", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "accounts/v1/{+account}/users/me:verifySelf", + "request": { + "$ref": "VerifySelfRequest" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + } } } } @@ -2376,7 +2480,7 @@ } } }, - "revision": "20251023", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "About": { @@ -2529,6 +2633,21 @@ }, "type": "object" }, + "AccountLimit": { + "description": "A limit of a certain type that is applied to an account.", + "id": "AccountLimit", + "properties": { + "name": { + "description": "Identifier. The limit part of the name will be a combination of the type and the scope. For example: `accounts/123/limits/products~ADS_NON_EEA` Format: `accounts/{account}/limits/{limit}`", + "type": "string" + }, + "products": { + "$ref": "ProductLimit", + "description": "The limit for products." + } + }, + "type": "object" + }, "AccountManagement": { "description": "`AccountManagement` payload.", "id": "AccountManagement", @@ -2575,6 +2694,10 @@ "$ref": "CampaignsManagement", "description": "Service type for managing advertising campaigns. Grants the provider access to create and manage the business's ad campaigns, including setting up campaigns, adjusting bids, and optimizing performance." }, + "comparisonShopping": { + "$ref": "ComparisonShopping", + "description": "Service type for comparison shopping. The provider is a CSS (Comparison Shopping Service) managing the account. See https://support.google.com/merchants/answer/12653197" + }, "externalAccountId": { "description": "Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify). If you have multiple accounts with the same provider - for instance, different accounts for various regions — the `external_account_id` differentiates between them, ensuring accurate linking and integration between Google and the provider.", "type": "string" @@ -2632,6 +2755,26 @@ "$ref": "AccountAggregation", "description": "The provider is an [aggregator](https://support.google.com/merchants/answer/188487) for the account. Payload for service type Account Aggregation." }, + "accountManagement": { + "$ref": "AccountManagement", + "description": "The provider manages this account. Payload for service type Account Management." + }, + "campaignsManagement": { + "$ref": "CampaignsManagement", + "description": "The provider manages campaigns for this account. Payload for service type campaigns management." + }, + "comparisonShopping": { + "$ref": "ComparisonShopping", + "description": "The provider is a CSS (Comparison Shopping Service) of this account. Payload for service type Comparison Shopping." + }, + "externalAccountId": { + "description": "Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify). If you have multiple accounts with the same provider - for instance, different accounts for various regions — the `external_account_id` differentiates between them, ensuring accurate linking and integration between Google and the provider. The external account ID must be specified for the campaigns management service type. The external account ID must not be specified for the account aggregation service type. The external account ID is optional / may be specified for all other service types.", + "type": "string" + }, + "productsManagement": { + "$ref": "ProductsManagement", + "description": "The provider manages products for this account. Payload for service type products management." + }, "provider": { "description": "Required. The provider of the service. Either the reference to an account such as `providers/123` or a well-known service provider (one of `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`).", "type": "string" @@ -2650,6 +2793,10 @@ "userId": { "description": "Required. The email address of the user (for example, `john.doe@gmail.com`).", "type": "string" + }, + "verificationMailSettings": { + "$ref": "VerificationMailSettings", + "description": "Optional. Settings related to configuring the verification email that is sent after adding a user." } }, "type": "object" @@ -3153,6 +3300,12 @@ }, "type": "object" }, + "ComparisonShopping": { + "description": "`ComparisonShopping` payload.", + "id": "ComparisonShopping", + "properties": {}, + "type": "object" + }, "CreateAndConfigureAccountRequest": { "description": "Request message for the `CreateAndConfigureAccount` method.", "id": "CreateAndConfigureAccountRequest", @@ -3168,6 +3321,13 @@ }, "type": "array" }, + "setAlias": { + "description": "Optional. If a relationship is created with a provider, you can set an alias for it with this field. The calling user must be an admin on the provider to be able to set an alias.", + "items": { + "$ref": "SetAliasForRelationship" + }, + "type": "array" + }, "user": { "description": "Optional. Users to be added to the account.", "items": { @@ -3977,6 +4137,24 @@ }, "type": "object" }, + "ListAccountLimitsResponse": { + "description": "Response message for the `ListAccountLimits` method.", + "id": "ListAccountLimitsResponse", + "properties": { + "accountLimits": { + "description": "The limits for the given account.", + "items": { + "$ref": "AccountLimit" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "ListAccountRelationshipsResponse": { "description": "Response after trying to list account relationships.", "id": "ListAccountRelationshipsResponse", @@ -4708,6 +4886,32 @@ }, "type": "object" }, + "ProductLimit": { + "description": "The limit for products.", + "id": "ProductLimit", + "properties": { + "limit": { + "description": "Required. The maximum number of products that are allowed in the account in the given scope.", + "format": "int64", + "type": "string" + }, + "scope": { + "description": "Required. The scope of the product limit.", + "enum": [ + "SCOPE_UNSPECIFIED", + "ADS_NON_EEA", + "ADS_EEA" + ], + "enumDescriptions": [ + "Default value. Should not be used.", + "Limit for products in non-EEA countries.", + "Limit for products in EEA countries." + ], + "type": "string" + } + }, + "type": "object" + }, "ProductStatusChangeMessage": { "description": "The message that the merchant will receive to notify about product status change event", "id": "ProductStatusChangeMessage", @@ -5143,6 +5347,21 @@ }, "type": "object" }, + "SetAliasForRelationship": { + "description": "Set an alias for a relationship between a provider and the account to be created.", + "id": "SetAliasForRelationship", + "properties": { + "accountIdAlias": { + "description": "Required. The unique ID of this account in the provider's system. The value must be unique across all accounts on the platform for this provider.", + "type": "string" + }, + "provider": { + "description": "Required. The provider of the service. This is a reference to an account such as `providers/123` or `accounts/123`. The same provider must be specified in at least one of the `service` fields.", + "type": "string" + } + }, + "type": "object" + }, "ShippingSettings": { "description": "The Merchant Center account's [shipping settings](https://support.google.com/merchants/answer/6069284). The `ShippingSettings` resource lets you retrieve and update the shipping settings of your advanced account and all its associated sub-accounts.", "id": "ShippingSettings", @@ -5530,6 +5749,33 @@ }, "type": "object" }, + "VerificationMailSettings": { + "description": "Settings related to the verification email that is sent after adding a user.", + "id": "VerificationMailSettings", + "properties": { + "verificationMailMode": { + "description": "Optional. Mode of the verification mail. If not set, the default is `SEND_VERIFICATION_MAIL`.", + "enum": [ + "VERIFICATION_MAIL_MODE_UNSPECIFIED", + "SEND_VERIFICATION_MAIL", + "SUPPRESS_VERIFICATION_MAIL" + ], + "enumDescriptions": [ + "Default first member of every enum. Do not use.", + "An invitation email is sent to the user added shortly after.", + "No invitation email is sent. This can be useful if the user is expected to accept the invitation through the API without needing another notification." + ], + "type": "string" + } + }, + "type": "object" + }, + "VerifySelfRequest": { + "description": "Request message for the `VerifySelf` method.", + "id": "VerifySelfRequest", + "properties": {}, + "type": "object" + }, "Warehouse": { "description": "A fulfillment warehouse, which stores and handles inventory.", "id": "Warehouse", diff --git a/merchantapi/accounts/v1/merchantapi-gen.go b/merchantapi/accounts/v1/merchantapi-gen.go index e49388f7f19..9c368416b32 100644 --- a/merchantapi/accounts/v1/merchantapi-gen.go +++ b/merchantapi/accounts/v1/merchantapi-gen.go @@ -167,6 +167,7 @@ func NewAccountsService(s *APIService) *AccountsService { rs.GbpAccounts = NewAccountsGbpAccountsService(s) rs.Homepage = NewAccountsHomepageService(s) rs.Issues = NewAccountsIssuesService(s) + rs.Limits = NewAccountsLimitsService(s) rs.OmnichannelSettings = NewAccountsOmnichannelSettingsService(s) rs.OnlineReturnPolicies = NewAccountsOnlineReturnPoliciesService(s) rs.Programs = NewAccountsProgramsService(s) @@ -200,6 +201,8 @@ type AccountsService struct { Issues *AccountsIssuesService + Limits *AccountsLimitsService + OmnichannelSettings *AccountsOmnichannelSettingsService OnlineReturnPolicies *AccountsOnlineReturnPoliciesService @@ -300,6 +303,15 @@ type AccountsIssuesService struct { s *APIService } +func NewAccountsLimitsService(s *APIService) *AccountsLimitsService { + rs := &AccountsLimitsService{s: s} + return rs +} + +type AccountsLimitsService struct { + s *APIService +} + func NewAccountsOmnichannelSettingsService(s *APIService) *AccountsOmnichannelSettingsService { rs := &AccountsOmnichannelSettingsService{s: s} rs.LfpProviders = NewAccountsOmnichannelSettingsLfpProvidersService(s) @@ -398,11 +410,23 @@ type AccountsTermsOfServiceAgreementStatesService struct { func NewAccountsUsersService(s *APIService) *AccountsUsersService { rs := &AccountsUsersService{s: s} + rs.Me = NewAccountsUsersMeService(s) return rs } type AccountsUsersService struct { s *APIService + + Me *AccountsUsersMeService +} + +func NewAccountsUsersMeService(s *APIService) *AccountsUsersMeService { + rs := &AccountsUsersMeService{s: s} + return rs +} + +type AccountsUsersMeService struct { + s *APIService } func NewTermsOfServiceService(s *APIService) *TermsOfServiceService { @@ -610,6 +634,35 @@ func (s AccountIssue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AccountLimit: A limit of a certain type that is applied to an account. +type AccountLimit struct { + // Name: Identifier. The limit part of the name will be a combination of the + // type and the scope. For example: `accounts/123/limits/products~ADS_NON_EEA` + // Format: `accounts/{account}/limits/{limit}` + Name string `json:"name,omitempty"` + // Products: The limit for products. + Products *ProductLimit `json:"products,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AccountLimit) MarshalJSON() ([]byte, error) { + type NoMethod AccountLimit + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AccountManagement: `AccountManagement` payload. type AccountManagement struct { } @@ -694,6 +747,10 @@ type AccountService struct { // the provider access to create and manage the business's ad campaigns, // including setting up campaigns, adjusting bids, and optimizing performance. CampaignsManagement *CampaignsManagement `json:"campaignsManagement,omitempty"` + // ComparisonShopping: Service type for comparison shopping. The provider is a + // CSS (Comparison Shopping Service) managing the account. See + // https://support.google.com/merchants/answer/12653197 + ComparisonShopping *ComparisonShopping `json:"comparisonShopping,omitempty"` // ExternalAccountId: Immutable. An optional, immutable identifier that Google // uses to refer to this account when communicating with the provider. This // should be the unique account ID within the provider's system (for example, @@ -762,6 +819,30 @@ type AddAccountService struct { // (https://support.google.com/merchants/answer/188487) for the account. // Payload for service type Account Aggregation. AccountAggregation *AccountAggregation `json:"accountAggregation,omitempty"` + // AccountManagement: The provider manages this account. Payload for service + // type Account Management. + AccountManagement *AccountManagement `json:"accountManagement,omitempty"` + // CampaignsManagement: The provider manages campaigns for this account. + // Payload for service type campaigns management. + CampaignsManagement *CampaignsManagement `json:"campaignsManagement,omitempty"` + // ComparisonShopping: The provider is a CSS (Comparison Shopping Service) of + // this account. Payload for service type Comparison Shopping. + ComparisonShopping *ComparisonShopping `json:"comparisonShopping,omitempty"` + // ExternalAccountId: Immutable. An optional, immutable identifier that Google + // uses to refer to this account when communicating with the provider. This + // should be the unique account ID within the provider's system (for example, + // your shop ID in Shopify). If you have multiple accounts with the same + // provider - for instance, different accounts for various regions — the + // `external_account_id` differentiates between them, ensuring accurate linking + // and integration between Google and the provider. The external account ID + // must be specified for the campaigns management service type. The external + // account ID must not be specified for the account aggregation service type. + // The external account ID is optional / may be specified for all other service + // types. + ExternalAccountId string `json:"externalAccountId,omitempty"` + // ProductsManagement: The provider manages products for this account. Payload + // for service type products management. + ProductsManagement *ProductsManagement `json:"productsManagement,omitempty"` // Provider: Required. The provider of the service. Either the reference to an // account such as `providers/123` or a well-known service provider (one of // `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). @@ -792,6 +873,9 @@ type AddUser struct { // UserId: Required. The email address of the user (for example, // `john.doe@gmail.com`). UserId string `json:"userId,omitempty"` + // VerificationMailSettings: Optional. Settings related to configuring the + // verification email that is sent after adding a user. + VerificationMailSettings *VerificationMailSettings `json:"verificationMailSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "User") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -1532,6 +1616,10 @@ func (s ClaimHomepageRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ComparisonShopping: `ComparisonShopping` payload. +type ComparisonShopping struct { +} + // CreateAndConfigureAccountRequest: Request message for the // `CreateAndConfigureAccount` method. type CreateAndConfigureAccountRequest struct { @@ -1545,6 +1633,10 @@ type CreateAndConfigureAccountRequest struct { // method. Additional `account_management` or `product_management` services may // be provided. Service []*AddAccountService `json:"service,omitempty"` + // SetAlias: Optional. If a relationship is created with a provider, you can + // set an alias for it with this field. The calling user must be an admin on + // the provider to be able to set an alias. + SetAlias []*SetAliasForRelationship `json:"setAlias,omitempty"` // User: Optional. Users to be added to the account. User []*AddUser `json:"user,omitempty"` // ForceSendFields is a list of field names (e.g. "Account") to unconditionally @@ -2633,6 +2725,35 @@ func (s ListAccountIssuesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListAccountLimitsResponse: Response message for the `ListAccountLimits` +// method. +type ListAccountLimitsResponse struct { + // AccountLimits: The limits for the given account. + AccountLimits []*AccountLimit `json:"accountLimits,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + 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. "AccountLimits") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountLimits") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAccountLimitsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAccountLimitsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListAccountRelationshipsResponse: Response after trying to list account // relationships. type ListAccountRelationshipsResponse struct { @@ -3626,6 +3747,36 @@ func (s ProductChange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ProductLimit: The limit for products. +type ProductLimit struct { + // Limit: Required. The maximum number of products that are allowed in the + // account in the given scope. + Limit int64 `json:"limit,omitempty,string"` + // Scope: Required. The scope of the product limit. + // + // Possible values: + // "SCOPE_UNSPECIFIED" - Default value. Should not be used. + // "ADS_NON_EEA" - Limit for products in non-EEA countries. + // "ADS_EEA" - Limit for products in EEA countries. + Scope string `json:"scope,omitempty"` + // ForceSendFields is a list of field names (e.g. "Limit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Limit") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ProductLimit) MarshalJSON() ([]byte, error) { + type NoMethod ProductLimit + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ProductStatusChangeMessage: The message that the merchant will receive to // notify about product status change event type ProductStatusChangeMessage struct { @@ -4156,6 +4307,35 @@ func (s Service) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SetAliasForRelationship: Set an alias for a relationship between a provider +// and the account to be created. +type SetAliasForRelationship struct { + // AccountIdAlias: Required. The unique ID of this account in the provider's + // system. The value must be unique across all accounts on the platform for + // this provider. + AccountIdAlias string `json:"accountIdAlias,omitempty"` + // Provider: Required. The provider of the service. This is a reference to an + // account such as `providers/123` or `accounts/123`. The same provider must be + // specified in at least one of the `service` fields. + Provider string `json:"provider,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccountIdAlias") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountIdAlias") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SetAliasForRelationship) MarshalJSON() ([]byte, error) { + type NoMethod SetAliasForRelationship + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ShippingSettings: The Merchant Center account's shipping settings // (https://support.google.com/merchants/answer/6069284). The // `ShippingSettings` resource lets you retrieve and update the shipping @@ -4715,6 +4895,43 @@ func (s Value) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VerificationMailSettings: Settings related to the verification email that is +// sent after adding a user. +type VerificationMailSettings struct { + // VerificationMailMode: Optional. Mode of the verification mail. If not set, + // the default is `SEND_VERIFICATION_MAIL`. + // + // Possible values: + // "VERIFICATION_MAIL_MODE_UNSPECIFIED" - Default first member of every enum. + // Do not use. + // "SEND_VERIFICATION_MAIL" - An invitation email is sent to the user added + // shortly after. + // "SUPPRESS_VERIFICATION_MAIL" - No invitation email is sent. This can be + // useful if the user is expected to accept the invitation through the API + // without needing another notification. + VerificationMailMode string `json:"verificationMailMode,omitempty"` + // ForceSendFields is a list of field names (e.g. "VerificationMailMode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VerificationMailMode") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VerificationMailSettings) MarshalJSON() ([]byte, error) { + type NoMethod VerificationMailSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VerifySelfRequest: Request message for the `VerifySelf` method. +type VerifySelfRequest struct { +} + // Warehouse: A fulfillment warehouse, which stores and handles inventory. type Warehouse struct { // BusinessDayConfig: Business days of the warehouse. If not set, will be @@ -8029,6 +8246,273 @@ func (c *AccountsIssuesListCall) Pages(ctx context.Context, f func(*ListAccountI } } +type AccountsLimitsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves an account limit. +// +// - name: The name of the limit to retrieve. Format: +// `accounts/{account}/limits/{limit}` For example: +// `accounts/123/limits/products~ADS_NON_EEA`. +func (r *AccountsLimitsService) Get(name string) *AccountsLimitsGetCall { + c := &AccountsLimitsGetCall{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 +// details. +func (c *AccountsLimitsGetCall) Fields(s ...googleapi.Field) *AccountsLimitsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *AccountsLimitsGetCall) IfNoneMatch(entityTag string) *AccountsLimitsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsLimitsGetCall) Context(ctx context.Context) *AccountsLimitsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsLimitsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsLimitsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.limits.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "merchantapi.accounts.limits.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountLimit.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 *AccountsLimitsGetCall) Do(opts ...googleapi.CallOption) (*AccountLimit, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &AccountLimit{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "merchantapi.accounts.limits.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type AccountsLimitsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the limits of an account. +// +// - parent: The parent account. Format: `accounts/{account}`. +func (r *AccountsLimitsService) List(parent string) *AccountsLimitsListCall { + c := &AccountsLimitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Required. A filter on the limit +// `type` is required, for example, `type = "products". +func (c *AccountsLimitsListCall) Filter(filter string) *AccountsLimitsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// limits to return. The service may return fewer than this value. If +// unspecified, at most 100 limits will be returned. The maximum value is 100; +// values above 100 will be coerced to 100. +func (c *AccountsLimitsListCall) PageSize(pageSize int64) *AccountsLimitsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListAccountLimits` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListAccountLimits` must match the call that provided the page token. +func (c *AccountsLimitsListCall) PageToken(pageToken string) *AccountsLimitsListCall { + 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 +// details. +func (c *AccountsLimitsListCall) Fields(s ...googleapi.Field) *AccountsLimitsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *AccountsLimitsListCall) IfNoneMatch(entityTag string) *AccountsLimitsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsLimitsListCall) Context(ctx context.Context) *AccountsLimitsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsLimitsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsLimitsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/v1/{+parent}/limits") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.limits.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "merchantapi.accounts.limits.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAccountLimitsResponse.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 *AccountsLimitsListCall) Do(opts ...googleapi.CallOption) (*ListAccountLimitsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListAccountLimitsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "merchantapi.accounts.limits.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *AccountsLimitsListCall) Pages(ctx context.Context, f func(*ListAccountLimitsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 AccountsOmnichannelSettingsCreateCall struct { s *APIService parent string @@ -13126,6 +13610,111 @@ func (c *AccountsUsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) return ret, nil } +type AccountsUsersMeVerifySelfCall struct { + s *APIService + account string + verifyselfrequest *VerifySelfRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// VerifySelf: Updates the user that is represented by the caller from pending +// to verified. +// +// - account: The name of the account under which the caller is a user. Format: +// `accounts/{account}`. +func (r *AccountsUsersMeService) VerifySelf(account string, verifyselfrequest *VerifySelfRequest) *AccountsUsersMeVerifySelfCall { + c := &AccountsUsersMeVerifySelfCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.account = account + c.verifyselfrequest = verifyselfrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *AccountsUsersMeVerifySelfCall) Fields(s ...googleapi.Field) *AccountsUsersMeVerifySelfCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsUsersMeVerifySelfCall) Context(ctx context.Context) *AccountsUsersMeVerifySelfCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsUsersMeVerifySelfCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsUsersMeVerifySelfCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.verifyselfrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/v1/{+account}/users/me:verifySelf") + 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{ + "account": c.account, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.users.me.verifySelf", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "merchantapi.accounts.users.me.verifySelf" call. +// Any non-2xx status code is an error. Response headers are in either +// *User.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AccountsUsersMeVerifySelfCall) Do(opts ...googleapi.CallOption) (*User, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "merchantapi.accounts.users.me.verifySelf", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type TermsOfServiceAcceptCall struct { s *APIService name string diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index d0c83b28a77..aea8209f054 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -2223,6 +2223,40 @@ "https://www.googleapis.com/auth/content" ] } + }, + "resources": { + "me": { + "methods": { + "verifySelf": { + "description": "Updates the user that is represented by the caller from pending to verified.", + "flatPath": "accounts/v1beta/accounts/{accountsId}/users/me:verifySelf", + "httpMethod": "PATCH", + "id": "merchantapi.accounts.users.me.verifySelf", + "parameterOrder": [ + "account" + ], + "parameters": { + "account": { + "description": "Required. The name of the account under which the caller is a user. Format: `accounts/{account}`", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "accounts/v1beta/{+account}/users/me:verifySelf", + "request": { + "$ref": "VerifySelfRequest" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + } } } } @@ -2326,7 +2360,7 @@ } } }, - "revision": "20251023", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "About": { @@ -2525,6 +2559,10 @@ "$ref": "CampaignsManagement", "description": "Service type for managing advertising campaigns. Grants the provider access to create and manage the business's ad campaigns, including setting up campaigns, adjusting bids, and optimizing performance." }, + "comparisonShopping": { + "$ref": "ComparisonShopping", + "description": "Service type for comparison shopping. The provider is a CSS (Comparison Shopping Service) managing the account. See https://support.google.com/merchants/answer/12653197" + }, "externalAccountId": { "description": "Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify). If you have multiple accounts with the same provider - for instance, different accounts for various regions — the `external_account_id` differentiates between them, ensuring accurate linking and integration between Google and the provider.", "type": "string" @@ -2582,6 +2620,26 @@ "$ref": "AccountAggregation", "description": "The provider is an [aggregator](https://support.google.com/merchants/answer/188487) for the account. Payload for service type Account Aggregation." }, + "accountManagement": { + "$ref": "AccountManagement", + "description": "The provider manages this account. Payload for service type Account Management." + }, + "campaignsManagement": { + "$ref": "CampaignsManagement", + "description": "The provider manages campaigns for this account. Payload for service type campaigns management." + }, + "comparisonShopping": { + "$ref": "ComparisonShopping", + "description": "The provider is a CSS (Comparison Shopping Service) of this account. Payload for service type Comparison Shopping." + }, + "externalAccountId": { + "description": "Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify). If you have multiple accounts with the same provider - for instance, different accounts for various regions — the `external_account_id` differentiates between them, ensuring accurate linking and integration between Google and the provider. The external account ID must be specified for the campaigns management service type. The external account ID must not be specified for the account aggregation service type. The external account ID is optional / may be specified for all other service types.", + "type": "string" + }, + "productsManagement": { + "$ref": "ProductsManagement", + "description": "The provider manages products for this account. Payload for service type products management." + }, "provider": { "description": "Required. The provider of the service. Either the reference to an account such as `providers/123` or a well-known service provider (one of `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`).", "type": "string" @@ -2600,6 +2658,10 @@ "userId": { "description": "Required. The email address of the user (for example, `john.doe@gmail.com`).", "type": "string" + }, + "verificationMailSettings": { + "$ref": "VerificationMailSettings", + "description": "Optional. Settings related to configuring the verification email that is sent after adding a user." } }, "type": "object" @@ -3033,6 +3095,12 @@ }, "type": "object" }, + "ComparisonShopping": { + "description": "`ComparisonShopping` payload.", + "id": "ComparisonShopping", + "properties": {}, + "type": "object" + }, "CreateAndConfigureAccountRequest": { "description": "Request message for the `CreateAndConfigureAccount` method.", "id": "CreateAndConfigureAccountRequest", @@ -3048,6 +3116,13 @@ }, "type": "array" }, + "setAlias": { + "description": "Optional. If a relationship is created with a provider, you can set an alias for it with this field. The calling user must be an admin on the provider to be able to set an alias.", + "items": { + "$ref": "SetAliasForRelationship" + }, + "type": "array" + }, "user": { "description": "Optional. Users to be added to the account.", "items": { @@ -5020,6 +5095,21 @@ }, "type": "object" }, + "SetAliasForRelationship": { + "description": "Set an alias for a relationship between a provider and the account to be created.", + "id": "SetAliasForRelationship", + "properties": { + "accountIdAlias": { + "description": "Required. The unique ID of this account in the provider's system. The value must be unique across all accounts on the platform for this provider.", + "type": "string" + }, + "provider": { + "description": "Required. The provider of the service. This is a reference to an account such as `providers/123` or `accounts/123`. The same provider must be specified in at least one of the `service` fields.", + "type": "string" + } + }, + "type": "object" + }, "ShippingSettings": { "description": "The Merchant Center account's [shipping settings](https://support.google.com/merchants/answer/6069284). The `ShippingSettings` resource lets you retrieve and update the shipping settings of your advanced account and all its associated sub-accounts.", "id": "ShippingSettings", @@ -5391,6 +5481,33 @@ }, "type": "object" }, + "VerificationMailSettings": { + "description": "Settings related to the verification email that is sent after adding a user.", + "id": "VerificationMailSettings", + "properties": { + "verificationMailMode": { + "description": "Optional. Mode of the verification mail. If not set, the default is `SEND_VERIFICATION_MAIL`.", + "enum": [ + "VERIFICATION_MAIL_MODE_UNSPECIFIED", + "SEND_VERIFICATION_MAIL", + "SUPPRESS_VERIFICATION_MAIL" + ], + "enumDescriptions": [ + "Default first member of every enum. Do not use.", + "An invitation email is sent to the user added shortly after.", + "No invitation email is sent. This can be useful if the user is expected to accept the invitation through the API without needing another notification." + ], + "type": "string" + } + }, + "type": "object" + }, + "VerifySelfRequest": { + "description": "Request message for the `VerifySelf` method.", + "id": "VerifySelfRequest", + "properties": {}, + "type": "object" + }, "Warehouse": { "description": "A fulfillment warehouse, which stores and handles inventory.", "id": "Warehouse", diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index 0f19e779af4..ac834a99052 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -398,11 +398,23 @@ type AccountsTermsOfServiceAgreementStatesService struct { func NewAccountsUsersService(s *APIService) *AccountsUsersService { rs := &AccountsUsersService{s: s} + rs.Me = NewAccountsUsersMeService(s) return rs } type AccountsUsersService struct { s *APIService + + Me *AccountsUsersMeService +} + +func NewAccountsUsersMeService(s *APIService) *AccountsUsersMeService { + rs := &AccountsUsersMeService{s: s} + return rs +} + +type AccountsUsersMeService struct { + s *APIService } func NewTermsOfServiceService(s *APIService) *TermsOfServiceService { @@ -694,6 +706,10 @@ type AccountService struct { // the provider access to create and manage the business's ad campaigns, // including setting up campaigns, adjusting bids, and optimizing performance. CampaignsManagement *CampaignsManagement `json:"campaignsManagement,omitempty"` + // ComparisonShopping: Service type for comparison shopping. The provider is a + // CSS (Comparison Shopping Service) managing the account. See + // https://support.google.com/merchants/answer/12653197 + ComparisonShopping *ComparisonShopping `json:"comparisonShopping,omitempty"` // ExternalAccountId: Immutable. An optional, immutable identifier that Google // uses to refer to this account when communicating with the provider. This // should be the unique account ID within the provider's system (for example, @@ -762,6 +778,30 @@ type AddAccountService struct { // (https://support.google.com/merchants/answer/188487) for the account. // Payload for service type Account Aggregation. AccountAggregation *AccountAggregation `json:"accountAggregation,omitempty"` + // AccountManagement: The provider manages this account. Payload for service + // type Account Management. + AccountManagement *AccountManagement `json:"accountManagement,omitempty"` + // CampaignsManagement: The provider manages campaigns for this account. + // Payload for service type campaigns management. + CampaignsManagement *CampaignsManagement `json:"campaignsManagement,omitempty"` + // ComparisonShopping: The provider is a CSS (Comparison Shopping Service) of + // this account. Payload for service type Comparison Shopping. + ComparisonShopping *ComparisonShopping `json:"comparisonShopping,omitempty"` + // ExternalAccountId: Immutable. An optional, immutable identifier that Google + // uses to refer to this account when communicating with the provider. This + // should be the unique account ID within the provider's system (for example, + // your shop ID in Shopify). If you have multiple accounts with the same + // provider - for instance, different accounts for various regions — the + // `external_account_id` differentiates between them, ensuring accurate linking + // and integration between Google and the provider. The external account ID + // must be specified for the campaigns management service type. The external + // account ID must not be specified for the account aggregation service type. + // The external account ID is optional / may be specified for all other service + // types. + ExternalAccountId string `json:"externalAccountId,omitempty"` + // ProductsManagement: The provider manages products for this account. Payload + // for service type products management. + ProductsManagement *ProductsManagement `json:"productsManagement,omitempty"` // Provider: Required. The provider of the service. Either the reference to an // account such as `providers/123` or a well-known service provider (one of // `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). @@ -792,6 +832,9 @@ type AddUser struct { // UserId: Required. The email address of the user (for example, // `john.doe@gmail.com`). UserId string `json:"userId,omitempty"` + // VerificationMailSettings: Optional. Settings related to configuring the + // verification email that is sent after adding a user. + VerificationMailSettings *VerificationMailSettings `json:"verificationMailSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "User") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -1408,6 +1451,10 @@ func (s ClaimHomepageRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ComparisonShopping: `ComparisonShopping` payload. +type ComparisonShopping struct { +} + // CreateAndConfigureAccountRequest: Request message for the // `CreateAndConfigureAccount` method. type CreateAndConfigureAccountRequest struct { @@ -1421,6 +1468,10 @@ type CreateAndConfigureAccountRequest struct { // method. Additional `account_management` or `product_management` services may // be provided. Service []*AddAccountService `json:"service,omitempty"` + // SetAlias: Optional. If a relationship is created with a provider, you can + // set an alias for it with this field. The calling user must be an admin on + // the provider to be able to set an alias. + SetAlias []*SetAliasForRelationship `json:"setAlias,omitempty"` // User: Optional. Users to be added to the account. User []*AddUser `json:"user,omitempty"` // Users: Optional. Users to be added to the account. This field is deprecated @@ -4013,6 +4064,35 @@ func (s Service) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SetAliasForRelationship: Set an alias for a relationship between a provider +// and the account to be created. +type SetAliasForRelationship struct { + // AccountIdAlias: Required. The unique ID of this account in the provider's + // system. The value must be unique across all accounts on the platform for + // this provider. + AccountIdAlias string `json:"accountIdAlias,omitempty"` + // Provider: Required. The provider of the service. This is a reference to an + // account such as `providers/123` or `accounts/123`. The same provider must be + // specified in at least one of the `service` fields. + Provider string `json:"provider,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccountIdAlias") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountIdAlias") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SetAliasForRelationship) MarshalJSON() ([]byte, error) { + type NoMethod SetAliasForRelationship + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ShippingSettings: The Merchant Center account's shipping settings // (https://support.google.com/merchants/answer/6069284). The // `ShippingSettings` resource lets you retrieve and update the shipping @@ -4547,6 +4627,43 @@ func (s Value) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VerificationMailSettings: Settings related to the verification email that is +// sent after adding a user. +type VerificationMailSettings struct { + // VerificationMailMode: Optional. Mode of the verification mail. If not set, + // the default is `SEND_VERIFICATION_MAIL`. + // + // Possible values: + // "VERIFICATION_MAIL_MODE_UNSPECIFIED" - Default first member of every enum. + // Do not use. + // "SEND_VERIFICATION_MAIL" - An invitation email is sent to the user added + // shortly after. + // "SUPPRESS_VERIFICATION_MAIL" - No invitation email is sent. This can be + // useful if the user is expected to accept the invitation through the API + // without needing another notification. + VerificationMailMode string `json:"verificationMailMode,omitempty"` + // ForceSendFields is a list of field names (e.g. "VerificationMailMode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VerificationMailMode") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VerificationMailSettings) MarshalJSON() ([]byte, error) { + type NoMethod VerificationMailSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VerifySelfRequest: Request message for the `VerifySelf` method. +type VerifySelfRequest struct { +} + // Warehouse: A fulfillment warehouse, which stores and handles inventory. type Warehouse struct { // BusinessDayConfig: Business days of the warehouse. If not set, will be @@ -12755,6 +12872,111 @@ func (c *AccountsUsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) return ret, nil } +type AccountsUsersMeVerifySelfCall struct { + s *APIService + account string + verifyselfrequest *VerifySelfRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// VerifySelf: Updates the user that is represented by the caller from pending +// to verified. +// +// - account: The name of the account under which the caller is a user. Format: +// `accounts/{account}`. +func (r *AccountsUsersMeService) VerifySelf(account string, verifyselfrequest *VerifySelfRequest) *AccountsUsersMeVerifySelfCall { + c := &AccountsUsersMeVerifySelfCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.account = account + c.verifyselfrequest = verifyselfrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *AccountsUsersMeVerifySelfCall) Fields(s ...googleapi.Field) *AccountsUsersMeVerifySelfCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsUsersMeVerifySelfCall) Context(ctx context.Context) *AccountsUsersMeVerifySelfCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsUsersMeVerifySelfCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsUsersMeVerifySelfCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.verifyselfrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/v1beta/{+account}/users/me:verifySelf") + 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{ + "account": c.account, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.users.me.verifySelf", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "merchantapi.accounts.users.me.verifySelf" call. +// Any non-2xx status code is an error. Response headers are in either +// *User.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AccountsUsersMeVerifySelfCall) Do(opts ...googleapi.CallOption) (*User, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "merchantapi.accounts.users.me.verifySelf", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type TermsOfServiceAcceptCall struct { s *APIService name string diff --git a/merchantapi/inventories/v1/merchantapi-api.json b/merchantapi/inventories/v1/merchantapi-api.json index 7287cd72b53..13de7bf762b 100644 --- a/merchantapi/inventories/v1/merchantapi-api.json +++ b/merchantapi/inventories/v1/merchantapi-api.json @@ -121,7 +121,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the local inventory for the given product to delete. Format: `accounts/{account}/products/{product}/localInventories/{store_code}`", + "description": "Required. The name of the local inventory for the given product to delete. Format: `accounts/{account}/products/{product}/localInventories/{store_code}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+/localInventories/[^/]+$", "required": true, @@ -146,7 +146,7 @@ ], "parameters": { "parent": { - "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}`", + "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -185,7 +185,7 @@ "type": "string" }, "parent": { - "description": "Required. The `name` of the parent product to list local inventories for. Format: `accounts/{account}/products/{product}`", + "description": "Required. The `name` of the parent product to list local inventories for. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -214,7 +214,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the `RegionalInventory` resource to delete. Format: `accounts/{account}/products/{product}/regionalInventories/{region}`", + "description": "Required. The name of the `RegionalInventory` resource to delete. Format: `accounts/{account}/products/{product}/regionalInventories/{region}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+$", "required": true, @@ -239,7 +239,7 @@ ], "parameters": { "parent": { - "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}`", + "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -278,7 +278,7 @@ "type": "string" }, "parent": { - "description": "Required. The `name` of the parent product to list `RegionalInventory` resources for. Format: `accounts/{account}/products/{product}`", + "description": "Required. The `name` of the parent product to list `RegionalInventory` resources for. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -300,7 +300,7 @@ } } }, - "revision": "20250804", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Empty": { @@ -377,7 +377,7 @@ "description": "Optional. A list of local inventory attributes." }, "name": { - "description": "Output only. The name of the `LocalInventory` resource. Format: `accounts/{account}/products/{product}/localInventories/{store_code}`", + "description": "Output only. The name of the `LocalInventory` resource. Format: `accounts/{account}/products/{product}/localInventories/{store_code}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "readOnly": true, "type": "string" }, @@ -657,7 +657,7 @@ "type": "string" }, "name": { - "description": "Output only. The name of the `RegionalInventory` resource. Format: `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}`", + "description": "Output only. The name of the `RegionalInventory` resource. Format: `accounts/{account}/products/{product}/regionalInventories/{region}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "readOnly": true, "type": "string" }, diff --git a/merchantapi/inventories/v1/merchantapi-gen.go b/merchantapi/inventories/v1/merchantapi-gen.go index 86ad9ab1d66..439fd960130 100644 --- a/merchantapi/inventories/v1/merchantapi-gen.go +++ b/merchantapi/inventories/v1/merchantapi-gen.go @@ -310,7 +310,32 @@ type LocalInventory struct { // LocalInventoryAttributes: Optional. A list of local inventory attributes. LocalInventoryAttributes *LocalInventoryAttributes `json:"localInventoryAttributes,omitempty"` // Name: Output only. The name of the `LocalInventory` resource. Format: - // `accounts/{account}/products/{product}/localInventories/{store_code}` + // `accounts/{account}/products/{product}/localInventories/{store_code}` The + // {product} segment is a unique identifier for the product. This identifier + // must be unique within a merchant account and generally follows the + // structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` + // For legacy local products, the structure is: + // `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + // The format of the {product} segment in the URL is automatically detected by + // the server, supporting two options: 1. **Encoded Format**: The `{product}` + // segment is an unpadded base64url encoded string (RFC 4648 Section 5). The + // decoded string must result in the `content_language~feed_label~offer_id` + // structure. This encoding MUST be used if any part of the product identifier + // (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: + // To represent the product ID `en~US~sku/123`, the `{product}` segment must be + // the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The + // full resource name for the product would be + // `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The + // `{product}` segment is the tilde-separated string + // `content_language~feed_label~offer_id`. This format is suitable only when + // `content_language`, `feed_label`, and `offer_id` do not contain + // URL-problematic characters like `/`, `%`, or `~`. We recommend using the + // **Encoded Format** for all product IDs to ensure correct parsing, especially + // those containing special characters. The presence of tilde (`~`) characters + // in the `{product}` segment is used to differentiate between the two formats. + // Note: For calls to the v1beta version, the plain format is + // `channel~content_language~feed_label~offer_id`, for example: + // `accounts/123/products/online~en~US~sku123`. Name string `json:"name,omitempty"` // StoreCode: Required. Immutable. Store code (the store ID from your Business // Profile) of the physical store the product is sold in. See the Local product @@ -582,8 +607,32 @@ type RegionalInventory struct { // ignored if set by the client. Account int64 `json:"account,omitempty,string"` // Name: Output only. The name of the `RegionalInventory` resource. Format: - // `{regional_inventory.name=accounts/{account}/products/{product}/regionalInven - // tories/{region}` + // `accounts/{account}/products/{product}/regionalInventories/{region}` The + // {product} segment is a unique identifier for the product. This identifier + // must be unique within a merchant account and generally follows the + // structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` + // For legacy local products, the structure is: + // `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + // The format of the {product} segment in the URL is automatically detected by + // the server, supporting two options: 1. **Encoded Format**: The `{product}` + // segment is an unpadded base64url encoded string (RFC 4648 Section 5). The + // decoded string must result in the `content_language~feed_label~offer_id` + // structure. This encoding MUST be used if any part of the product identifier + // (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: + // To represent the product ID `en~US~sku/123`, the `{product}` segment must be + // the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The + // full resource name for the product would be + // `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The + // `{product}` segment is the tilde-separated string + // `content_language~feed_label~offer_id`. This format is suitable only when + // `content_language`, `feed_label`, and `offer_id` do not contain + // URL-problematic characters like `/`, `%`, or `~`. We recommend using the + // **Encoded Format** for all product IDs to ensure correct parsing, especially + // those containing special characters. The presence of tilde (`~`) characters + // in the `{product}` segment is used to differentiate between the two formats. + // Note: For calls to the v1beta version, the plain format is + // `channel~content_language~feed_label~offer_id`, for example: + // `accounts/123/products/online~en~US~sku123`. Name string `json:"name,omitempty"` // Region: Required. Immutable. ID of the region for this `RegionalInventory` // resource. See the Regional availability and pricing @@ -653,7 +702,7 @@ func (s RegionalInventoryAttributes) MarshalJSON() ([]byte, error) { type AccountsProductsLocalInventoriesDeleteCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -667,10 +716,35 @@ type AccountsProductsLocalInventoriesDeleteCall struct { // // - name: The name of the local inventory for the given product to delete. // Format: -// `accounts/{account}/products/{product}/localInventories/{store_code}`. -func (r *AccountsProductsLocalInventoriesService) Delete(name string) *AccountsProductsLocalInventoriesDeleteCall { +// `accounts/{account}/products/{product}/localInventories/{store_code}` The +// {product} segment is a unique identifier for the product. This identifier +// must be unique within a merchant account and generally follows the +// structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` +// For legacy local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsLocalInventoriesService) Delete(nameid string) *AccountsProductsLocalInventoriesDeleteCall { c := &AccountsProductsLocalInventoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -709,7 +783,7 @@ func (c *AccountsProductsLocalInventoriesDeleteCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.localInventories.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -756,7 +830,7 @@ func (c *AccountsProductsLocalInventoriesDeleteCall) Do(opts ...googleapi.CallOp type AccountsProductsLocalInventoriesInsertCall struct { s *Service - parent string + parentid string localinventory *LocalInventory urlParams_ gensupport.URLParams ctx_ context.Context @@ -770,10 +844,35 @@ type AccountsProductsLocalInventoriesInsertCall struct { // products. // // - parent: The account and product where this inventory will be inserted. -// Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsLocalInventoriesService) Insert(parent string, localinventory *LocalInventory) *AccountsProductsLocalInventoriesInsertCall { +// Format: `accounts/{account}/products/{product}` The {product} segment is a +// unique identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsLocalInventoriesService) Insert(parentid string, localinventory *LocalInventory) *AccountsProductsLocalInventoriesInsertCall { c := &AccountsProductsLocalInventoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid c.localinventory = localinventory return c } @@ -817,7 +916,7 @@ func (c *AccountsProductsLocalInventoriesInsertCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.localInventories.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -864,7 +963,7 @@ func (c *AccountsProductsLocalInventoriesInsertCall) Do(opts ...googleapi.CallOp type AccountsProductsLocalInventoriesListCall struct { s *Service - parent string + parentid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -878,10 +977,35 @@ type AccountsProductsLocalInventoriesListCall struct { // product for a given account. // // - parent: The `name` of the parent product to list local inventories for. -// Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsLocalInventoriesService) List(parent string) *AccountsProductsLocalInventoriesListCall { +// Format: `accounts/{account}/products/{product}` The {product} segment is a +// unique identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsLocalInventoriesService) List(parentid string) *AccountsProductsLocalInventoriesListCall { c := &AccountsProductsLocalInventoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid return c } @@ -952,7 +1076,7 @@ func (c *AccountsProductsLocalInventoriesListCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.localInventories.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -1021,7 +1145,7 @@ func (c *AccountsProductsLocalInventoriesListCall) Pages(ctx context.Context, f type AccountsProductsRegionalInventoriesDeleteCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -1034,10 +1158,35 @@ type AccountsProductsRegionalInventoriesDeleteCall struct { // attempting a delete again. // // - name: The name of the `RegionalInventory` resource to delete. Format: -// `accounts/{account}/products/{product}/regionalInventories/{region}`. -func (r *AccountsProductsRegionalInventoriesService) Delete(name string) *AccountsProductsRegionalInventoriesDeleteCall { +// `accounts/{account}/products/{product}/regionalInventories/{region}` The +// {product} segment is a unique identifier for the product. This identifier +// must be unique within a merchant account and generally follows the +// structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` +// For legacy local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsRegionalInventoriesService) Delete(nameid string) *AccountsProductsRegionalInventoriesDeleteCall { c := &AccountsProductsRegionalInventoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -1076,7 +1225,7 @@ func (c *AccountsProductsRegionalInventoriesDeleteCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.regionalInventories.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -1123,7 +1272,7 @@ func (c *AccountsProductsRegionalInventoriesDeleteCall) Do(opts ...googleapi.Cal type AccountsProductsRegionalInventoriesInsertCall struct { s *Service - parent string + parentid string regionalinventory *RegionalInventory urlParams_ gensupport.URLParams ctx_ context.Context @@ -1136,10 +1285,35 @@ type AccountsProductsRegionalInventoriesInsertCall struct { // for the new or updated `RegionalInventory` resource to appear in products. // // - parent: The account and product where this inventory will be inserted. -// Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsRegionalInventoriesService) Insert(parent string, regionalinventory *RegionalInventory) *AccountsProductsRegionalInventoriesInsertCall { +// Format: `accounts/{account}/products/{product}` The {product} segment is a +// unique identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsRegionalInventoriesService) Insert(parentid string, regionalinventory *RegionalInventory) *AccountsProductsRegionalInventoriesInsertCall { c := &AccountsProductsRegionalInventoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid c.regionalinventory = regionalinventory return c } @@ -1183,7 +1357,7 @@ func (c *AccountsProductsRegionalInventoriesInsertCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.regionalInventories.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -1231,7 +1405,7 @@ func (c *AccountsProductsRegionalInventoriesInsertCall) Do(opts ...googleapi.Cal type AccountsProductsRegionalInventoriesListCall struct { s *Service - parent string + parentid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -1245,10 +1419,35 @@ type AccountsProductsRegionalInventoriesListCall struct { // product for a given account. // // - parent: The `name` of the parent product to list `RegionalInventory` -// resources for. Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsRegionalInventoriesService) List(parent string) *AccountsProductsRegionalInventoriesListCall { +// resources for. Format: `accounts/{account}/products/{product}` The +// {product} segment is a unique identifier for the product. This identifier +// must be unique within a merchant account and generally follows the +// structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` +// For legacy local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsRegionalInventoriesService) List(parentid string) *AccountsProductsRegionalInventoriesListCall { c := &AccountsProductsRegionalInventoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid return c } @@ -1320,7 +1519,7 @@ func (c *AccountsProductsRegionalInventoriesListCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.regionalInventories.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) diff --git a/merchantapi/inventories_v1beta/merchantapi-api.json b/merchantapi/inventories_v1beta/merchantapi-api.json index bc069fd4eaa..06c72fe8a23 100644 --- a/merchantapi/inventories_v1beta/merchantapi-api.json +++ b/merchantapi/inventories_v1beta/merchantapi-api.json @@ -121,7 +121,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the local inventory for the given product to delete. Format: `accounts/{account}/products/{product}/localInventories/{store_code}`", + "description": "Required. The name of the local inventory for the given product to delete. Format: `accounts/{account}/products/{product}/localInventories/{store_code}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+/localInventories/[^/]+$", "required": true, @@ -146,7 +146,7 @@ ], "parameters": { "parent": { - "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}`", + "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -185,7 +185,7 @@ "type": "string" }, "parent": { - "description": "Required. The `name` of the parent product to list local inventories for. Format: `accounts/{account}/products/{product}`", + "description": "Required. The `name` of the parent product to list local inventories for. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -214,7 +214,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the `RegionalInventory` resource to delete. Format: `accounts/{account}/products/{product}/regionalInventories/{region}`", + "description": "Required. The name of the `RegionalInventory` resource to delete. Format: `accounts/{account}/products/{product}/regionalInventories/{region}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+$", "required": true, @@ -239,7 +239,7 @@ ], "parameters": { "parent": { - "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}`", + "description": "Required. The account and product where this inventory will be inserted. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -278,7 +278,7 @@ "type": "string" }, "parent": { - "description": "Required. The `name` of the parent product to list `RegionalInventory` resources for. Format: `accounts/{account}/products/{product}`", + "description": "Required. The `name` of the parent product to list `RegionalInventory` resources for. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -300,7 +300,7 @@ } } }, - "revision": "20250727", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "CustomAttribute": { @@ -411,7 +411,7 @@ "type": "string" }, "name": { - "description": "Output only. The name of the `LocalInventory` resource. Format: `accounts/{account}/products/{product}/localInventories/{store_code}`", + "description": "Output only. The name of the `LocalInventory` resource. Format: `accounts/{account}/products/{product}/localInventories/{store_code}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "readOnly": true, "type": "string" }, @@ -636,7 +636,7 @@ "type": "array" }, "name": { - "description": "Output only. The name of the `RegionalInventory` resource. Format: `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}`", + "description": "Output only. The name of the `RegionalInventory` resource. Format: `accounts/{account}/products/{product}/regionalInventories/{region}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "readOnly": true, "type": "string" }, diff --git a/merchantapi/inventories_v1beta/merchantapi-gen.go b/merchantapi/inventories_v1beta/merchantapi-gen.go index db9dc7e00e3..9613b1b2f18 100644 --- a/merchantapi/inventories_v1beta/merchantapi-gen.go +++ b/merchantapi/inventories_v1beta/merchantapi-gen.go @@ -348,7 +348,32 @@ type LocalInventory struct { // length is 20 bytes. InstoreProductLocation string `json:"instoreProductLocation,omitempty"` // Name: Output only. The name of the `LocalInventory` resource. Format: - // `accounts/{account}/products/{product}/localInventories/{store_code}` + // `accounts/{account}/products/{product}/localInventories/{store_code}` The + // {product} segment is a unique identifier for the product. This identifier + // must be unique within a merchant account and generally follows the + // structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` + // For legacy local products, the structure is: + // `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + // The format of the {product} segment in the URL is automatically detected by + // the server, supporting two options: 1. **Encoded Format**: The `{product}` + // segment is an unpadded base64url encoded string (RFC 4648 Section 5). The + // decoded string must result in the `content_language~feed_label~offer_id` + // structure. This encoding MUST be used if any part of the product identifier + // (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: + // To represent the product ID `en~US~sku/123`, the `{product}` segment must be + // the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The + // full resource name for the product would be + // `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The + // `{product}` segment is the tilde-separated string + // `content_language~feed_label~offer_id`. This format is suitable only when + // `content_language`, `feed_label`, and `offer_id` do not contain + // URL-problematic characters like `/`, `%`, or `~`. We recommend using the + // **Encoded Format** for all product IDs to ensure correct parsing, especially + // those containing special characters. The presence of tilde (`~`) characters + // in the `{product}` segment is used to differentiate between the two formats. + // Note: For calls to the v1beta version, the plain format is + // `channel~content_language~feed_label~offer_id`, for example: + // `accounts/123/products/online~en~US~sku123`. Name string `json:"name,omitempty"` // PickupMethod: Supported pickup method for this product. Unless the value is // "not supported", this field must be submitted together with `pickupSla`. @@ -574,8 +599,32 @@ type RegionalInventory struct { // in its generic form. CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` // Name: Output only. The name of the `RegionalInventory` resource. Format: - // `{regional_inventory.name=accounts/{account}/products/{product}/regionalInven - // tories/{region}` + // `accounts/{account}/products/{product}/regionalInventories/{region}` The + // {product} segment is a unique identifier for the product. This identifier + // must be unique within a merchant account and generally follows the + // structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` + // For legacy local products, the structure is: + // `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + // The format of the {product} segment in the URL is automatically detected by + // the server, supporting two options: 1. **Encoded Format**: The `{product}` + // segment is an unpadded base64url encoded string (RFC 4648 Section 5). The + // decoded string must result in the `content_language~feed_label~offer_id` + // structure. This encoding MUST be used if any part of the product identifier + // (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: + // To represent the product ID `en~US~sku/123`, the `{product}` segment must be + // the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The + // full resource name for the product would be + // `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The + // `{product}` segment is the tilde-separated string + // `content_language~feed_label~offer_id`. This format is suitable only when + // `content_language`, `feed_label`, and `offer_id` do not contain + // URL-problematic characters like `/`, `%`, or `~`. We recommend using the + // **Encoded Format** for all product IDs to ensure correct parsing, especially + // those containing special characters. The presence of tilde (`~`) characters + // in the `{product}` segment is used to differentiate between the two formats. + // Note: For calls to the v1beta version, the plain format is + // `channel~content_language~feed_label~offer_id`, for example: + // `accounts/123/products/online~en~US~sku123`. Name string `json:"name,omitempty"` // Price: Optional. Price of the product in this region. Price *Price `json:"price,omitempty"` @@ -612,7 +661,7 @@ func (s RegionalInventory) MarshalJSON() ([]byte, error) { type AccountsProductsLocalInventoriesDeleteCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -626,10 +675,35 @@ type AccountsProductsLocalInventoriesDeleteCall struct { // // - name: The name of the local inventory for the given product to delete. // Format: -// `accounts/{account}/products/{product}/localInventories/{store_code}`. -func (r *AccountsProductsLocalInventoriesService) Delete(name string) *AccountsProductsLocalInventoriesDeleteCall { +// `accounts/{account}/products/{product}/localInventories/{store_code}` The +// {product} segment is a unique identifier for the product. This identifier +// must be unique within a merchant account and generally follows the +// structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` +// For legacy local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsLocalInventoriesService) Delete(nameid string) *AccountsProductsLocalInventoriesDeleteCall { c := &AccountsProductsLocalInventoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -668,7 +742,7 @@ func (c *AccountsProductsLocalInventoriesDeleteCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.localInventories.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -715,7 +789,7 @@ func (c *AccountsProductsLocalInventoriesDeleteCall) Do(opts ...googleapi.CallOp type AccountsProductsLocalInventoriesInsertCall struct { s *Service - parent string + parentid string localinventory *LocalInventory urlParams_ gensupport.URLParams ctx_ context.Context @@ -729,10 +803,35 @@ type AccountsProductsLocalInventoriesInsertCall struct { // products. // // - parent: The account and product where this inventory will be inserted. -// Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsLocalInventoriesService) Insert(parent string, localinventory *LocalInventory) *AccountsProductsLocalInventoriesInsertCall { +// Format: `accounts/{account}/products/{product}` The {product} segment is a +// unique identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsLocalInventoriesService) Insert(parentid string, localinventory *LocalInventory) *AccountsProductsLocalInventoriesInsertCall { c := &AccountsProductsLocalInventoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid c.localinventory = localinventory return c } @@ -776,7 +875,7 @@ func (c *AccountsProductsLocalInventoriesInsertCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.localInventories.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -823,7 +922,7 @@ func (c *AccountsProductsLocalInventoriesInsertCall) Do(opts ...googleapi.CallOp type AccountsProductsLocalInventoriesListCall struct { s *Service - parent string + parentid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -837,10 +936,35 @@ type AccountsProductsLocalInventoriesListCall struct { // product for a given account. // // - parent: The `name` of the parent product to list local inventories for. -// Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsLocalInventoriesService) List(parent string) *AccountsProductsLocalInventoriesListCall { +// Format: `accounts/{account}/products/{product}` The {product} segment is a +// unique identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsLocalInventoriesService) List(parentid string) *AccountsProductsLocalInventoriesListCall { c := &AccountsProductsLocalInventoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid return c } @@ -911,7 +1035,7 @@ func (c *AccountsProductsLocalInventoriesListCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.localInventories.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -980,7 +1104,7 @@ func (c *AccountsProductsLocalInventoriesListCall) Pages(ctx context.Context, f type AccountsProductsRegionalInventoriesDeleteCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -993,10 +1117,35 @@ type AccountsProductsRegionalInventoriesDeleteCall struct { // attempting a delete again. // // - name: The name of the `RegionalInventory` resource to delete. Format: -// `accounts/{account}/products/{product}/regionalInventories/{region}`. -func (r *AccountsProductsRegionalInventoriesService) Delete(name string) *AccountsProductsRegionalInventoriesDeleteCall { +// `accounts/{account}/products/{product}/regionalInventories/{region}` The +// {product} segment is a unique identifier for the product. This identifier +// must be unique within a merchant account and generally follows the +// structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` +// For legacy local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsRegionalInventoriesService) Delete(nameid string) *AccountsProductsRegionalInventoriesDeleteCall { c := &AccountsProductsRegionalInventoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -1035,7 +1184,7 @@ func (c *AccountsProductsRegionalInventoriesDeleteCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.regionalInventories.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -1082,7 +1231,7 @@ func (c *AccountsProductsRegionalInventoriesDeleteCall) Do(opts ...googleapi.Cal type AccountsProductsRegionalInventoriesInsertCall struct { s *Service - parent string + parentid string regionalinventory *RegionalInventory urlParams_ gensupport.URLParams ctx_ context.Context @@ -1095,10 +1244,35 @@ type AccountsProductsRegionalInventoriesInsertCall struct { // for the new or updated `RegionalInventory` resource to appear in products. // // - parent: The account and product where this inventory will be inserted. -// Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsRegionalInventoriesService) Insert(parent string, regionalinventory *RegionalInventory) *AccountsProductsRegionalInventoriesInsertCall { +// Format: `accounts/{account}/products/{product}` The {product} segment is a +// unique identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsRegionalInventoriesService) Insert(parentid string, regionalinventory *RegionalInventory) *AccountsProductsRegionalInventoriesInsertCall { c := &AccountsProductsRegionalInventoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid c.regionalinventory = regionalinventory return c } @@ -1142,7 +1316,7 @@ func (c *AccountsProductsRegionalInventoriesInsertCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.regionalInventories.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -1190,7 +1364,7 @@ func (c *AccountsProductsRegionalInventoriesInsertCall) Do(opts ...googleapi.Cal type AccountsProductsRegionalInventoriesListCall struct { s *Service - parent string + parentid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -1204,10 +1378,35 @@ type AccountsProductsRegionalInventoriesListCall struct { // product for a given account. // // - parent: The `name` of the parent product to list `RegionalInventory` -// resources for. Format: `accounts/{account}/products/{product}`. -func (r *AccountsProductsRegionalInventoriesService) List(parent string) *AccountsProductsRegionalInventoriesListCall { +// resources for. Format: `accounts/{account}/products/{product}` The +// {product} segment is a unique identifier for the product. This identifier +// must be unique within a merchant account and generally follows the +// structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` +// For legacy local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *AccountsProductsRegionalInventoriesService) List(parentid string) *AccountsProductsRegionalInventoriesListCall { c := &AccountsProductsRegionalInventoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent + c.parentid = parentid return c } @@ -1279,7 +1478,7 @@ func (c *AccountsProductsRegionalInventoriesListCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "parent": c.parentid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.regionalInventories.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) diff --git a/merchantapi/issueresolution/v1/merchantapi-api.json b/merchantapi/issueresolution/v1/merchantapi-api.json index 2f9b69e4661..5c6a68160f8 100644 --- a/merchantapi/issueresolution/v1/merchantapi-api.json +++ b/merchantapi/issueresolution/v1/merchantapi-api.json @@ -209,7 +209,7 @@ "type": "string" }, "name": { - "description": "Required. The name of the product to fetch issues for. Format: `accounts/{account}/products/{product}`", + "description": "Required. The name of the product. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -268,7 +268,7 @@ } } }, - "revision": "20250830", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Action": { diff --git a/merchantapi/issueresolution/v1/merchantapi-gen.go b/merchantapi/issueresolution/v1/merchantapi-gen.go index 099001d8cf3..97217723e75 100644 --- a/merchantapi/issueresolution/v1/merchantapi-gen.go +++ b/merchantapi/issueresolution/v1/merchantapi-gen.go @@ -1797,7 +1797,7 @@ func (c *IssueresolutionRenderaccountissuesCall) Do(opts ...googleapi.CallOption type IssueresolutionRenderproductissuesCall struct { s *Service - name string + nameid string renderissuesrequestpayload *RenderIssuesRequestPayload urlParams_ gensupport.URLParams ctx_ context.Context @@ -1808,11 +1808,36 @@ type IssueresolutionRenderproductissuesCall struct { // issue resolution content and available actions. This content and actions are // meant to be rendered and shown in third-party applications. // -// - name: The name of the product to fetch issues for. Format: -// `accounts/{account}/products/{product}`. -func (r *IssueresolutionService) Renderproductissues(name string, renderissuesrequestpayload *RenderIssuesRequestPayload) *IssueresolutionRenderproductissuesCall { +// - name: The name of the product. Format: +// `accounts/{account}/products/{product}` The {product} segment is a unique +// identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *IssueresolutionService) Renderproductissues(nameid string, renderissuesrequestpayload *RenderIssuesRequestPayload) *IssueresolutionRenderproductissuesCall { c := &IssueresolutionRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid c.renderissuesrequestpayload = renderissuesrequestpayload return c } @@ -1874,7 +1899,7 @@ func (c *IssueresolutionRenderproductissuesCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.issueresolution.renderproductissues", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) diff --git a/merchantapi/issueresolution_v1beta/merchantapi-api.json b/merchantapi/issueresolution_v1beta/merchantapi-api.json index 0ed2bafba84..b3ea8fea588 100644 --- a/merchantapi/issueresolution_v1beta/merchantapi-api.json +++ b/merchantapi/issueresolution_v1beta/merchantapi-api.json @@ -209,7 +209,7 @@ "type": "string" }, "name": { - "description": "Required. The name of the product to fetch issues for. Format: `accounts/{account}/products/{product}`", + "description": "Required. The name of the product. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -268,7 +268,7 @@ } } }, - "revision": "20250830", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Action": { diff --git a/merchantapi/issueresolution_v1beta/merchantapi-gen.go b/merchantapi/issueresolution_v1beta/merchantapi-gen.go index bd746654f32..fb38378add0 100644 --- a/merchantapi/issueresolution_v1beta/merchantapi-gen.go +++ b/merchantapi/issueresolution_v1beta/merchantapi-gen.go @@ -1797,7 +1797,7 @@ func (c *IssueresolutionRenderaccountissuesCall) Do(opts ...googleapi.CallOption type IssueresolutionRenderproductissuesCall struct { s *Service - name string + nameid string renderissuesrequestpayload *RenderIssuesRequestPayload urlParams_ gensupport.URLParams ctx_ context.Context @@ -1808,11 +1808,36 @@ type IssueresolutionRenderproductissuesCall struct { // issue resolution content and available actions. This content and actions are // meant to be rendered and shown in third-party applications. // -// - name: The name of the product to fetch issues for. Format: -// `accounts/{account}/products/{product}`. -func (r *IssueresolutionService) Renderproductissues(name string, renderissuesrequestpayload *RenderIssuesRequestPayload) *IssueresolutionRenderproductissuesCall { +// - name: The name of the product. Format: +// `accounts/{account}/products/{product}` The {product} segment is a unique +// identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/products/online~en~US~sku123`. +func (r *IssueresolutionService) Renderproductissues(nameid string, renderissuesrequestpayload *RenderIssuesRequestPayload) *IssueresolutionRenderproductissuesCall { c := &IssueresolutionRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid c.renderissuesrequestpayload = renderissuesrequestpayload return c } @@ -1874,7 +1899,7 @@ func (c *IssueresolutionRenderproductissuesCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.issueresolution.renderproductissues", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) diff --git a/merchantapi/products/v1/merchantapi-api.json b/merchantapi/products/v1/merchantapi-api.json index 9e9d85976b3..afccc21244e 100644 --- a/merchantapi/products/v1/merchantapi-api.json +++ b/merchantapi/products/v1/merchantapi-api.json @@ -124,7 +124,7 @@ "type": "string" }, "name": { - "description": "Required. The name of the product input resource to delete. Format: `accounts/{account}/productInputs/{product}` where the last section `product` consists of: `content_language~feed_label~offer_id` example for product name is `accounts/123/productInputs/en~US~sku123`.", + "description": "Required. The name of the product input to delete. Format: `accounts/{account}/productInputs/{productInput}` The {productInput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productInput} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{productInput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{productInput}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{productInput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productInput}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productinputs/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/productInputs/[^/]+$", "required": true, @@ -173,7 +173,7 @@ ] }, "patch": { - "description": "Updates the existing product input in your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.", + "description": "Updates the existing product input in your Merchant Center account. The name of the product input to update is taken from the `name` field within the `ProductInput` resource. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.", "flatPath": "products/v1/accounts/{accountsId}/productInputs/{productInputsId}", "httpMethod": "PATCH", "id": "merchantapi.accounts.productInputs.patch", @@ -187,7 +187,7 @@ "type": "string" }, "name": { - "description": "Identifier. The name of the product input. Format: `accounts/{account}/productInputs/{productinput}` where the last section `productinput` consists of: `content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/en~US~sku123`. A legacy local product input name would be `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the v1beta version, the `productInput` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productInputs/online~en~US~sku123`.", + "description": "Identifier. The name of the product. Format: `accounts/{account}/productInputs/{productinput}` The {productinput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productinput} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{productinput}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{productinput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productinput}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productinputs/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/productInputs/[^/]+$", "required": true, @@ -225,7 +225,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the product to retrieve. Format: `accounts/{account}/products/{product}` where the last section `product` consists of: `content_language~feed_label~offer_id` example for product name is `accounts/123/products/en~US~sku123`. A legacy local product name would be `accounts/123/products/local~en~US~sku123`. Note: For calls to the v1beta version, the `product` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", + "description": "Required. The name of the product. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -281,7 +281,7 @@ } } }, - "revision": "20251104", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AutomatedDiscounts": { @@ -970,7 +970,7 @@ "type": "object" }, "LoyaltyProgram": { - "description": "A message that represents loyalty program.", + "description": "LINT.IfChange(LoyaltyProgram) A message that represents loyalty program.", "id": "LoyaltyProgram", "properties": { "cashbackForFutureUse": { @@ -2040,7 +2040,7 @@ "type": "boolean" }, "name": { - "description": "Identifier. The name of the product input. Format: `accounts/{account}/productInputs/{productinput}` where the last section `productinput` consists of: `content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/en~US~sku123`. A legacy local product input name would be `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the v1beta version, the `productInput` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productInputs/online~en~US~sku123`.", + "description": "Identifier. The name of the product. Format: `accounts/{account}/productInputs/{productinput}` The {productinput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productinput} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{productinput}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{productinput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productinput}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productinputs/online~en~US~sku123`.", "type": "string" }, "offerId": { diff --git a/merchantapi/products/v1/merchantapi-gen.go b/merchantapi/products/v1/merchantapi-gen.go index 23cf27c5ca4..3dcf1170240 100644 --- a/merchantapi/products/v1/merchantapi-gen.go +++ b/merchantapi/products/v1/merchantapi-gen.go @@ -877,7 +877,8 @@ func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error { return nil } -// LoyaltyProgram: A message that represents loyalty program. +// LoyaltyProgram: LINT.IfChange(LoyaltyProgram) A message that represents +// loyalty program. type LoyaltyProgram struct { // CashbackForFutureUse: The cashback that can be used for future purchases. CashbackForFutureUse *Price `json:"cashbackForFutureUse,omitempty"` @@ -1799,15 +1800,33 @@ type ProductInput struct { // `legacy_local` is already targeting local destinations, creating a // `legacy_local` product with an otherwise matching name will fail. LegacyLocal bool `json:"legacyLocal,omitempty"` - // Name: Identifier. The name of the product input. Format: - // `accounts/{account}/productInputs/{productinput}` where the last section - // `productinput` consists of: `content_language~feed_label~offer_id` example - // for product input name is `accounts/123/productInputs/en~US~sku123`. A - // legacy local product input name would be - // `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the - // v1beta version, the `productInput` section consists of: + // Name: Identifier. The name of the product. Format: + // `accounts/{account}/productInputs/{productinput}` The {productinput} segment + // is a unique identifier for the product. This identifier must be unique + // within a merchant account and generally follows the structure: + // `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy + // local products, the structure is: + // `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + // The format of the {productinput} segment in the URL is automatically + // detected by the server, supporting two options: 1. **Encoded Format**: The + // `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 + // Section 5). The decoded string must result in the + // `content_language~feed_label~offer_id` structure. This encoding MUST be used + // if any part of the product identifier (like `offer_id`) contains characters + // such as `/`, `%`, or `~`. * Example: To represent the product ID + // `en~US~sku/123`, the `{productinput}` segment must be the base64url encoding + // of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for + // the product would be `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. + // **Plain Format**: The `{productinput}` segment is the tilde-separated string + // `content_language~feed_label~offer_id`. This format is suitable only when + // `content_language`, `feed_label`, and `offer_id` do not contain + // URL-problematic characters like `/`, `%`, or `~`. We recommend using the + // **Encoded Format** for all product IDs to ensure correct parsing, especially + // those containing special characters. The presence of tilde (`~`) characters + // in the `{productinput}` segment is used to differentiate between the two + // formats. Note: For calls to the v1beta version, the plain format is // `channel~content_language~feed_label~offer_id`, for example: - // `accounts/123/productInputs/online~en~US~sku123`. + // `accounts/123/productinputs/online~en~US~sku123`. Name string `json:"name,omitempty"` // OfferId: Required. Immutable. Your unique identifier for the product. This // is the same for the product input and processed product. Leading and @@ -2418,7 +2437,7 @@ func (s *UnitPricingMeasure) UnmarshalJSON(data []byte) error { type AccountsProductInputsDeleteCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -2428,13 +2447,37 @@ type AccountsProductInputsDeleteCall struct { // inserting, updating, or deleting a product input, it may take several // minutes before the processed product can be retrieved. // -// - name: The name of the product input resource to delete. Format: -// `accounts/{account}/productInputs/{product}` where the last section -// `product` consists of: `content_language~feed_label~offer_id` example for -// product name is `accounts/123/productInputs/en~US~sku123`. -func (r *AccountsProductInputsService) Delete(name string) *AccountsProductInputsDeleteCall { +// - name: The name of the product input to delete. Format: +// `accounts/{account}/productInputs/{productInput}` The {productInput} +// segment is a unique identifier for the product. This identifier must be +// unique within a merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {productInput} segment in the URL +// is automatically detected by the server, supporting two options: 1. +// **Encoded Format**: The `{productInput}` segment is an unpadded base64url +// encoded string (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{productInput}` segment must be the base64url +// encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource +// name for the product would be +// `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The +// `{productInput}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{productInput}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/productinputs/online~en~US~sku123`. +func (r *AccountsProductInputsService) Delete(nameid string) *AccountsProductInputsDeleteCall { c := &AccountsProductInputsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -2482,7 +2525,7 @@ func (c *AccountsProductInputsDeleteCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.productInputs.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -2655,7 +2698,7 @@ func (c *AccountsProductInputsInsertCall) Do(opts ...googleapi.CallOption) (*Pro type AccountsProductInputsPatchCall struct { s *Service - name string + nameid string productinput *ProductInput urlParams_ gensupport.URLParams ctx_ context.Context @@ -2663,21 +2706,42 @@ type AccountsProductInputsPatchCall struct { } // Patch: Updates the existing product input in your Merchant Center account. -// After inserting, updating, or deleting a product input, it may take several -// minutes before the processed product can be retrieved. +// The name of the product input to update is taken from the `name` field +// within the `ProductInput` resource. After inserting, updating, or deleting a +// product input, it may take several minutes before the processed product can +// be retrieved. // -// - name: Identifier. The name of the product input. Format: -// `accounts/{account}/productInputs/{productinput}` where the last section -// `productinput` consists of: `content_language~feed_label~offer_id` example -// for product input name is `accounts/123/productInputs/en~US~sku123`. A -// legacy local product input name would be -// `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the -// v1beta version, the `productInput` section consists of: -// `channel~content_language~feed_label~offer_id`, for example: -// `accounts/123/productInputs/online~en~US~sku123`. -func (r *AccountsProductInputsService) Patch(name string, productinput *ProductInput) *AccountsProductInputsPatchCall { +// - name: Identifier. The name of the product. Format: +// `accounts/{account}/productInputs/{productinput}` The {productinput} +// segment is a unique identifier for the product. This identifier must be +// unique within a merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {productinput} segment in the URL +// is automatically detected by the server, supporting two options: 1. +// **Encoded Format**: The `{productinput}` segment is an unpadded base64url +// encoded string (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{productinput}` segment must be the base64url +// encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource +// name for the product would be +// `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The +// `{productinput}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{productinput}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/productinputs/online~en~US~sku123`. +func (r *AccountsProductInputsService) Patch(nameid string, productinput *ProductInput) *AccountsProductInputsPatchCall { c := &AccountsProductInputsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid c.productinput = productinput return c } @@ -2745,7 +2809,7 @@ func (c *AccountsProductInputsPatchCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.productInputs.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -2792,7 +2856,7 @@ func (c *AccountsProductInputsPatchCall) Do(opts ...googleapi.CallOption) (*Prod type AccountsProductsGetCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -2803,17 +2867,36 @@ type AccountsProductsGetCall struct { // After inserting, updating, or deleting a product input, it may take several // minutes before the updated final product can be retrieved. // -// - name: The name of the product to retrieve. Format: -// `accounts/{account}/products/{product}` where the last section `product` -// consists of: `content_language~feed_label~offer_id` example for product -// name is `accounts/123/products/en~US~sku123`. A legacy local product name -// would be `accounts/123/products/local~en~US~sku123`. Note: For calls to -// the v1beta version, the `product` section consists of: -// `channel~content_language~feed_label~offer_id`, for example: +// - name: The name of the product. Format: +// `accounts/{account}/products/{product}` The {product} segment is a unique +// identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: // `accounts/123/products/online~en~US~sku123`. -func (r *AccountsProductsService) Get(name string) *AccountsProductsGetCall { +func (r *AccountsProductsService) Get(nameid string) *AccountsProductsGetCall { c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -2863,7 +2946,7 @@ func (c *AccountsProductsGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) diff --git a/merchantapi/products_v1beta/merchantapi-api.json b/merchantapi/products_v1beta/merchantapi-api.json index d562e2d91fb..739d9413fc2 100644 --- a/merchantapi/products_v1beta/merchantapi-api.json +++ b/merchantapi/products_v1beta/merchantapi-api.json @@ -124,7 +124,7 @@ "type": "string" }, "name": { - "description": "Required. The name of the product input resource to delete. Format: `accounts/{account}/productInputs/{product}` where the last section `product` consists of: `content_language~feed_label~offer_id` example for product name is `accounts/123/productInputs/en~US~sku123`.", + "description": "Required. The name of the product input to delete. Format: `accounts/{account}/productInputs/{productInput}` The {productInput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productInput} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{productInput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{productInput}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{productInput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productInput}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productinputs/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/productInputs/[^/]+$", "required": true, @@ -173,7 +173,7 @@ ] }, "patch": { - "description": "Updates the existing product input in your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.", + "description": "Updates the existing product input in your Merchant Center account. The name of the product input to update is taken from the `name` field within the `ProductInput` resource. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.", "flatPath": "products/v1beta/accounts/{accountsId}/productInputs/{productInputsId}", "httpMethod": "PATCH", "id": "merchantapi.accounts.productInputs.patch", @@ -187,7 +187,7 @@ "type": "string" }, "name": { - "description": "Identifier. The name of the product input. Format: `accounts/{account}/productInputs/{productinput}` where the last section `productinput` consists of: `content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/en~US~sku123`. A legacy local product input name would be `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the v1beta version, the `productInput` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productInputs/online~en~US~sku123`.", + "description": "Identifier. The name of the product. Format: `accounts/{account}/productInputs/{productinput}` The {productinput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productinput} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{productinput}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{productinput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productinput}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productinputs/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/productInputs/[^/]+$", "required": true, @@ -225,7 +225,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the product to retrieve. Format: `accounts/{account}/products/{product}` where the last section `product` consists of: `content_language~feed_label~offer_id` example for product name is `accounts/123/products/en~US~sku123`. A legacy local product name would be `accounts/123/products/local~en~US~sku123`. Note: For calls to the v1beta version, the `product` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", + "description": "Required. The name of the product. Format: `accounts/{account}/products/{product}` The {product} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {product} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{product}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{product}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{product}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`.", "location": "path", "pattern": "^accounts/[^/]+/products/[^/]+$", "required": true, @@ -281,7 +281,7 @@ } } }, - "revision": "20251007", + "revision": "20251115", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Attributes": { @@ -1179,7 +1179,7 @@ "type": "object" }, "LoyaltyProgram": { - "description": "A message that represents loyalty program.", + "description": "LINT.IfChange(LoyaltyProgram) A message that represents loyalty program.", "id": "LoyaltyProgram", "properties": { "cashbackForFutureUse": { @@ -1464,7 +1464,7 @@ "type": "string" }, "name": { - "description": "Identifier. The name of the product input. Format: `accounts/{account}/productInputs/{productinput}` where the last section `productinput` consists of: `content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/en~US~sku123`. A legacy local product input name would be `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the v1beta version, the `productInput` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productInputs/online~en~US~sku123`.", + "description": "Identifier. The name of the product. Format: `accounts/{account}/productInputs/{productinput}` The {productinput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productinput} segment in the URL is automatically detected by the server, supporting two options: 1. **Encoded Format**: The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. * Example: To represent the product ID `en~US~sku/123`, the `{productinput}` segment must be the base64url encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for the product would be `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The `{productinput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the **Encoded Format** for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productinput}` segment is used to differentiate between the two formats. Note: For calls to the v1beta version, the plain format is `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productinputs/online~en~US~sku123`.", "type": "string" }, "offerId": { diff --git a/merchantapi/products_v1beta/merchantapi-gen.go b/merchantapi/products_v1beta/merchantapi-gen.go index 54f0a2b620b..024fa3696c0 100644 --- a/merchantapi/products_v1beta/merchantapi-gen.go +++ b/merchantapi/products_v1beta/merchantapi-gen.go @@ -1021,7 +1021,8 @@ func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error { return nil } -// LoyaltyProgram: A message that represents loyalty program. +// LoyaltyProgram: LINT.IfChange(LoyaltyProgram) A message that represents +// loyalty program. type LoyaltyProgram struct { // CashbackForFutureUse: The cashback that can be used for future purchases. CashbackForFutureUse *Price `json:"cashbackForFutureUse,omitempty"` @@ -1371,15 +1372,33 @@ type ProductInput struct { // label must not include any spaces. For more information, see Using feed // labels (//support.google.com/merchants/answer/14994087). FeedLabel string `json:"feedLabel,omitempty"` - // Name: Identifier. The name of the product input. Format: - // `accounts/{account}/productInputs/{productinput}` where the last section - // `productinput` consists of: `content_language~feed_label~offer_id` example - // for product input name is `accounts/123/productInputs/en~US~sku123`. A - // legacy local product input name would be - // `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the - // v1beta version, the `productInput` section consists of: + // Name: Identifier. The name of the product. Format: + // `accounts/{account}/productInputs/{productinput}` The {productinput} segment + // is a unique identifier for the product. This identifier must be unique + // within a merchant account and generally follows the structure: + // `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy + // local products, the structure is: + // `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + // The format of the {productinput} segment in the URL is automatically + // detected by the server, supporting two options: 1. **Encoded Format**: The + // `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 + // Section 5). The decoded string must result in the + // `content_language~feed_label~offer_id` structure. This encoding MUST be used + // if any part of the product identifier (like `offer_id`) contains characters + // such as `/`, `%`, or `~`. * Example: To represent the product ID + // `en~US~sku/123`, the `{productinput}` segment must be the base64url encoding + // of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for + // the product would be `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. + // **Plain Format**: The `{productinput}` segment is the tilde-separated string + // `content_language~feed_label~offer_id`. This format is suitable only when + // `content_language`, `feed_label`, and `offer_id` do not contain + // URL-problematic characters like `/`, `%`, or `~`. We recommend using the + // **Encoded Format** for all product IDs to ensure correct parsing, especially + // those containing special characters. The presence of tilde (`~`) characters + // in the `{productinput}` segment is used to differentiate between the two + // formats. Note: For calls to the v1beta version, the plain format is // `channel~content_language~feed_label~offer_id`, for example: - // `accounts/123/productInputs/online~en~US~sku123`. + // `accounts/123/productinputs/online~en~US~sku123`. Name string `json:"name,omitempty"` // OfferId: Required. Immutable. Your unique identifier for the product. This // is the same for the product input and processed product. Leading and @@ -1965,7 +1984,7 @@ func (s *UnitPricingMeasure) UnmarshalJSON(data []byte) error { type AccountsProductInputsDeleteCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -1975,13 +1994,37 @@ type AccountsProductInputsDeleteCall struct { // inserting, updating, or deleting a product input, it may take several // minutes before the processed product can be retrieved. // -// - name: The name of the product input resource to delete. Format: -// `accounts/{account}/productInputs/{product}` where the last section -// `product` consists of: `content_language~feed_label~offer_id` example for -// product name is `accounts/123/productInputs/en~US~sku123`. -func (r *AccountsProductInputsService) Delete(name string) *AccountsProductInputsDeleteCall { +// - name: The name of the product input to delete. Format: +// `accounts/{account}/productInputs/{productInput}` The {productInput} +// segment is a unique identifier for the product. This identifier must be +// unique within a merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {productInput} segment in the URL +// is automatically detected by the server, supporting two options: 1. +// **Encoded Format**: The `{productInput}` segment is an unpadded base64url +// encoded string (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{productInput}` segment must be the base64url +// encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource +// name for the product would be +// `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The +// `{productInput}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{productInput}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/productinputs/online~en~US~sku123`. +func (r *AccountsProductInputsService) Delete(nameid string) *AccountsProductInputsDeleteCall { c := &AccountsProductInputsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -2029,7 +2072,7 @@ func (c *AccountsProductInputsDeleteCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.productInputs.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -2202,7 +2245,7 @@ func (c *AccountsProductInputsInsertCall) Do(opts ...googleapi.CallOption) (*Pro type AccountsProductInputsPatchCall struct { s *Service - name string + nameid string productinput *ProductInput urlParams_ gensupport.URLParams ctx_ context.Context @@ -2210,21 +2253,42 @@ type AccountsProductInputsPatchCall struct { } // Patch: Updates the existing product input in your Merchant Center account. -// After inserting, updating, or deleting a product input, it may take several -// minutes before the processed product can be retrieved. +// The name of the product input to update is taken from the `name` field +// within the `ProductInput` resource. After inserting, updating, or deleting a +// product input, it may take several minutes before the processed product can +// be retrieved. // -// - name: Identifier. The name of the product input. Format: -// `accounts/{account}/productInputs/{productinput}` where the last section -// `productinput` consists of: `content_language~feed_label~offer_id` example -// for product input name is `accounts/123/productInputs/en~US~sku123`. A -// legacy local product input name would be -// `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the -// v1beta version, the `productInput` section consists of: -// `channel~content_language~feed_label~offer_id`, for example: -// `accounts/123/productInputs/online~en~US~sku123`. -func (r *AccountsProductInputsService) Patch(name string, productinput *ProductInput) *AccountsProductInputsPatchCall { +// - name: Identifier. The name of the product. Format: +// `accounts/{account}/productInputs/{productinput}` The {productinput} +// segment is a unique identifier for the product. This identifier must be +// unique within a merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {productinput} segment in the URL +// is automatically detected by the server, supporting two options: 1. +// **Encoded Format**: The `{productinput}` segment is an unpadded base64url +// encoded string (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{productinput}` segment must be the base64url +// encoding of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource +// name for the product would be +// `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. 2. **Plain Format**: The +// `{productinput}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{productinput}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: +// `accounts/123/productinputs/online~en~US~sku123`. +func (r *AccountsProductInputsService) Patch(nameid string, productinput *ProductInput) *AccountsProductInputsPatchCall { c := &AccountsProductInputsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid c.productinput = productinput return c } @@ -2292,7 +2356,7 @@ func (c *AccountsProductInputsPatchCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.productInputs.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) @@ -2339,7 +2403,7 @@ func (c *AccountsProductInputsPatchCall) Do(opts ...googleapi.CallOption) (*Prod type AccountsProductsGetCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -2350,17 +2414,36 @@ type AccountsProductsGetCall struct { // After inserting, updating, or deleting a product input, it may take several // minutes before the updated final product can be retrieved. // -// - name: The name of the product to retrieve. Format: -// `accounts/{account}/products/{product}` where the last section `product` -// consists of: `content_language~feed_label~offer_id` example for product -// name is `accounts/123/products/en~US~sku123`. A legacy local product name -// would be `accounts/123/products/local~en~US~sku123`. Note: For calls to -// the v1beta version, the `product` section consists of: -// `channel~content_language~feed_label~offer_id`, for example: +// - name: The name of the product. Format: +// `accounts/{account}/products/{product}` The {product} segment is a unique +// identifier for the product. This identifier must be unique within a +// merchant account and generally follows the structure: +// `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy +// local products, the structure is: +// `local~content_language~feed_label~offer_id`. Example: +// `local~en~US~sku123` The format of the {product} segment in the URL is +// automatically detected by the server, supporting two options: 1. **Encoded +// Format**: The `{product}` segment is an unpadded base64url encoded string +// (RFC 4648 Section 5). The decoded string must result in the +// `content_language~feed_label~offer_id` structure. This encoding MUST be +// used if any part of the product identifier (like `offer_id`) contains +// characters such as `/`, `%`, or `~`. * Example: To represent the product +// ID `en~US~sku/123`, the `{product}` segment must be the base64url encoding +// of this string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name for +// the product would be `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. 2. +// **Plain Format**: The `{product}` segment is the tilde-separated string +// `content_language~feed_label~offer_id`. This format is suitable only when +// `content_language`, `feed_label`, and `offer_id` do not contain +// URL-problematic characters like `/`, `%`, or `~`. We recommend using the +// **Encoded Format** for all product IDs to ensure correct parsing, +// especially those containing special characters. The presence of tilde +// (`~`) characters in the `{product}` segment is used to differentiate +// between the two formats. Note: For calls to the v1beta version, the plain +// format is `channel~content_language~feed_label~offer_id`, for example: // `accounts/123/products/online~en~US~sku123`. -func (r *AccountsProductsService) Get(name string) *AccountsProductsGetCall { +func (r *AccountsProductsService) Get(nameid string) *AccountsProductsGetCall { c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -2410,7 +2493,7 @@ func (c *AccountsProductsGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "merchantapi.accounts.products.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) diff --git a/migrationcenter/v1/migrationcenter-api.json b/migrationcenter/v1/migrationcenter-api.json index 5fd89f47929..48d2c776061 100644 --- a/migrationcenter/v1/migrationcenter-api.json +++ b/migrationcenter/v1/migrationcenter-api.json @@ -1951,6 +1951,34 @@ "resources": { "reports": { "methods": { + "artifactLink": { + "description": "Gets the link to the generated artifact of a given type for a Report.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}:artifactLink", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.reportConfigs.reports.artifactLink", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:artifactLink", + "request": { + "$ref": "GenerateReportArtifactLinkRequest" + }, + "response": { + "$ref": "ReportArtifactLink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a report.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports", @@ -2412,7 +2440,7 @@ } } }, - "revision": "20251023", + "revision": "20251111", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -4003,6 +4031,29 @@ }, "type": "object" }, + "GenerateReportArtifactLinkRequest": { + "description": "A request to generate a link to an artifact for a Report.", + "id": "GenerateReportArtifactLinkRequest", + "properties": { + "artifactType": { + "description": "Required. Type of the artifact requested.", + "enum": [ + "ARTIFACT_TYPE_UNSPECIFIED", + "PRESENTATION", + "SPREADSHEET", + "CSV" + ], + "enumDescriptions": [ + "Unspecified (default value).", + "Google Slides presentation.", + "Google Sheets document.", + "Comma Separated Value Text File." + ], + "type": "string" + } + }, + "type": "object" + }, "GenericInsight": { "description": "A generic insight about an asset.", "id": "GenericInsight", @@ -5105,6 +5156,10 @@ "$ref": "NetworkAdapterList", "description": "List of network adapters." }, + "defaultGateway": { + "description": "Optional. Default gateway address.", + "type": "string" + }, "primaryIpAddress": { "description": "The primary IP address of the machine.", "type": "string" @@ -6037,6 +6092,24 @@ }, "type": "object" }, + "ReportArtifactLink": { + "description": "Describes a link to a generated artifact of the report.", + "id": "ReportArtifactLink", + "properties": { + "uri": { + "description": "Output only. URI of the artifact.", + "readOnly": true, + "type": "string" + }, + "uriExpirationTime": { + "description": "Output only. Expiration time of the URI.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ReportAssetFramesResponse": { "description": "A response to a call to `ReportAssetFrame`.", "id": "ReportAssetFramesResponse", diff --git a/migrationcenter/v1/migrationcenter-gen.go b/migrationcenter/v1/migrationcenter-gen.go index e71fd464afd..c366036551f 100644 --- a/migrationcenter/v1/migrationcenter-gen.go +++ b/migrationcenter/v1/migrationcenter-gen.go @@ -2214,6 +2214,35 @@ func (s FstabEntryList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GenerateReportArtifactLinkRequest: A request to generate a link to an +// artifact for a Report. +type GenerateReportArtifactLinkRequest struct { + // ArtifactType: Required. Type of the artifact requested. + // + // Possible values: + // "ARTIFACT_TYPE_UNSPECIFIED" - Unspecified (default value). + // "PRESENTATION" - Google Slides presentation. + // "SPREADSHEET" - Google Sheets document. + // "CSV" - Comma Separated Value Text File. + ArtifactType string `json:"artifactType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ArtifactType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ArtifactType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GenerateReportArtifactLinkRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateReportArtifactLinkRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GenericInsight: A generic insight about an asset. type GenericInsight struct { // AdditionalInformation: Output only. Additional information about the @@ -3392,6 +3421,8 @@ func (s MachineDiskDetails) MarshalJSON() ([]byte, error) { type MachineNetworkDetails struct { // Adapters: List of network adapters. Adapters *NetworkAdapterList `json:"adapters,omitempty"` + // DefaultGateway: Optional. Default gateway address. + DefaultGateway string `json:"defaultGateway,omitempty"` // PrimaryIpAddress: The primary IP address of the machine. PrimaryIpAddress string `json:"primaryIpAddress,omitempty"` // PrimaryMacAddress: MAC address of the machine. This property is used to @@ -4557,6 +4588,33 @@ func (s Report) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReportArtifactLink: Describes a link to a generated artifact of the report. +type ReportArtifactLink struct { + // Uri: Output only. URI of the artifact. + Uri string `json:"uri,omitempty"` + // UriExpirationTime: Output only. Expiration time of the URI. + UriExpirationTime string `json:"uriExpirationTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReportArtifactLink) MarshalJSON() ([]byte, error) { + type NoMethod ReportArtifactLink + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ReportAssetFramesResponse: A response to a call to `ReportAssetFrame`. type ReportAssetFramesResponse struct { // ServerResponse contains the HTTP response code and headers from the server. @@ -12438,6 +12496,111 @@ func (c *ProjectsLocationsReportConfigsListCall) Pages(ctx context.Context, f fu } } +type ProjectsLocationsReportConfigsReportsArtifactLinkCall struct { + s *Service + name string + generatereportartifactlinkrequest *GenerateReportArtifactLinkRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ArtifactLink: Gets the link to the generated artifact of a given type for a +// Report. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsService) ArtifactLink(name string, generatereportartifactlinkrequest *GenerateReportArtifactLinkRequest) *ProjectsLocationsReportConfigsReportsArtifactLinkCall { + c := &ProjectsLocationsReportConfigsReportsArtifactLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.generatereportartifactlinkrequest = generatereportartifactlinkrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsArtifactLinkCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsArtifactLinkCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.generatereportartifactlinkrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:artifactLink") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.artifactLink", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.artifactLink" call. +// Any non-2xx status code is an error. Response headers are in either +// *ReportArtifactLink.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 *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Do(opts ...googleapi.CallOption) (*ReportArtifactLink, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ReportArtifactLink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.artifactLink", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsReportConfigsReportsCreateCall struct { s *Service parent string diff --git a/migrationcenter/v1alpha1/migrationcenter-api.json b/migrationcenter/v1alpha1/migrationcenter-api.json index a6492984d34..642efcf7e8e 100644 --- a/migrationcenter/v1alpha1/migrationcenter-api.json +++ b/migrationcenter/v1alpha1/migrationcenter-api.json @@ -2098,6 +2098,34 @@ "resources": { "reports": { "methods": { + "artifactLink": { + "description": "Gets the link to the generated artifact of a given type for a Report.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}:artifactLink", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.reportConfigs.reports.artifactLink", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:artifactLink", + "request": { + "$ref": "GenerateReportArtifactLinkRequest" + }, + "response": { + "$ref": "ReportArtifactLink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a report.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports", @@ -2166,6 +2194,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "export": { + "description": "Export a Report into a supported format.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}:export", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.reportConfigs.reports.export", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:export", + "request": { + "$ref": "ExportReportRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets details of a single Report.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}", @@ -2271,6 +2327,169 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "reportExportJobs": { + "methods": { + "create": { + "description": "Export a Report into a supported destination.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}/reportExportJobs", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this export job will be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + }, + "reportExportJobId": { + "description": "Required. The ID to use for the report export job.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/reportExportJobs", + "request": { + "$ref": "ReportExportJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an report export job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}/reportExportJobs/{reportExportJobsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+/reportExportJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a report export job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}/reportExportJobs/{reportExportJobsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+/reportExportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "ReportExportJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the report export jobs for a given report.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}/reportExportJobs", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent report owning the export jobs.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/reportExportJobs", + "response": { + "$ref": "ListReportExportJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "run": { + "description": "Runs a report export job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}/reportExportJobs/{reportExportJobsId}:run", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+/reportExportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:run", + "request": { + "$ref": "RunReportExportJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -2559,7 +2778,7 @@ } } }, - "revision": "20251023", + "revision": "20251106", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -5144,6 +5363,26 @@ }, "type": "object" }, + "ExportReportRequest": { + "description": "Request to export a detailed pricing report.", + "id": "ExportReportRequest", + "properties": {}, + "type": "object" + }, + "ExportReportResponse": { + "description": "Response message for exporting report.", + "id": "ExportReportResponse", + "properties": { + "reportArtifactLinks": { + "description": "For large generated report, we may return multiple links", + "items": { + "$ref": "ReportArtifactLink" + }, + "type": "array" + } + }, + "type": "object" + }, "FileValidationReport": { "description": "A resource that aggregates the validation errors found in an import job file.", "id": "FileValidationReport", @@ -5318,6 +5557,29 @@ }, "type": "object" }, + "GenerateReportArtifactLinkRequest": { + "description": "A request to generate a link to an artifact for a Report.", + "id": "GenerateReportArtifactLinkRequest", + "properties": { + "artifactType": { + "description": "Required. Type of the artifact requested.", + "enum": [ + "ARTIFACT_TYPE_UNSPECIFIED", + "PRESENTATION", + "SPREADSHEET", + "CSV" + ], + "enumDescriptions": [ + "Unspecified (default value).", + "Google Slides presentation.", + "Google Sheets document.", + "Comma Separated Value Text File." + ], + "type": "string" + } + }, + "type": "object" + }, "GenericInsight": { "description": "A generic insight about an asset.", "id": "GenericInsight", @@ -6391,6 +6653,26 @@ }, "type": "object" }, + "ListReportExportJobsResponse": { + "description": "Response message for listing report export jobs.", + "id": "ListReportExportJobsResponse", + "properties": { + "nextPageToken": { + "description": "Output only. A token identifying a page of results the server should return.", + "readOnly": true, + "type": "string" + }, + "reportExportJobs": { + "description": "Output only. The list of report export jobs.", + "items": { + "$ref": "ReportExportJob" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "ListReportsResponse": { "description": "Response message for listing Reports.", "id": "ListReportsResponse", @@ -7706,6 +7988,11 @@ "description": "Output only. Summary view of the Report.", "readOnly": true }, + "tcoDetails": { + "$ref": "ReportTotalCostOfOwnershipDetails", + "description": "Output only. Detailed data related to TCO reports.", + "readOnly": true + }, "type": { "description": "Report type.", "enum": [ @@ -7727,6 +8014,30 @@ }, "type": "object" }, + "ReportArtifactLink": { + "description": "Describes a link to a generated artifact of the report.", + "id": "ReportArtifactLink", + "properties": { + "displayName": { + "description": "Output only. Human friendly display name of the artifact.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. URI of the artifact.", + "readOnly": true, + "type": "string" + }, + "uriExpirationTime": { + "deprecated": true, + "description": "Output only. Expiration time of the URI.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ReportAssetFramesResponse": { "description": "A response to a call to `ReportAssetFrame`.", "id": "ReportAssetFramesResponse", @@ -7787,6 +8098,93 @@ }, "type": "object" }, + "ReportExportExecution": { + "description": "Execution status of report export operation.", + "id": "ReportExportExecution", + "properties": { + "endTime": { + "description": "Output only. Completion time of the export.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "executionId": { + "description": "Output only. Globally unique identifier of the execution.", + "readOnly": true, + "type": "string" + }, + "expireTime": { + "description": "Output only. Expiration time for the export and artifacts.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "progressPercentage": { + "description": "Output only. Represents the progress of the execution. It reaches 100 when the execution is successfully completed. When the execution finishes with a failure, the progress is set to 0.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "result": { + "$ref": "ReportExportExecutionResult", + "description": "Output only. Result of the export execution.", + "readOnly": true + }, + "startTime": { + "description": "Output only. Execution start timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ReportExportExecutionResult": { + "description": "Contains the result of the report export.", + "id": "ReportExportExecutionResult", + "properties": { + "error": { + "$ref": "Status", + "description": "Output only. Error encountered during export.", + "readOnly": true + }, + "outputFiles": { + "$ref": "OutputFileList", + "description": "Output only. List of output files.", + "readOnly": true + }, + "signedUris": { + "$ref": "SignedUris", + "description": "Output only. Signed URLs for downloading export artifacts.", + "readOnly": true + } + }, + "type": "object" + }, + "ReportExportJob": { + "description": "Report export job message.", + "id": "ReportExportJob", + "properties": { + "name": { + "description": "Output only. Identifier. Resource name.", + "readOnly": true, + "type": "string" + }, + "recentExecutions": { + "description": "Output only. Recent not expired executions of the export report job.", + "items": { + "$ref": "ReportExportExecution" + }, + "readOnly": true, + "type": "array" + }, + "signedUriDestination": { + "$ref": "SignedUriDestination", + "description": "Export with a SignedUri." + } + }, + "type": "object" + }, "ReportSummary": { "description": "Describes the Summary view of a Report, which contains aggregated values for all the groups and preference sets included in this Report.", "id": "ReportSummary", @@ -8331,6 +8729,18 @@ }, "type": "object" }, + "ReportTotalCostOfOwnershipDetails": { + "description": "Detailed data related to Total Cost of Ownership (TCO) pricing.", + "id": "ReportTotalCostOfOwnershipDetails", + "properties": { + "hasPricingData": { + "description": "Output only. Whether the report has detailed pricing data.", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, "ResourceLocation": { "description": "Location of a resource.", "id": "ResourceLocation", @@ -8376,6 +8786,29 @@ }, "type": "object" }, + "RunReportExportJobRequest": { + "description": "A request to run a report export job.", + "id": "RunReportExportJobRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, + "RunReportExportJobResponse": { + "description": "Response message for running a report export job.", + "id": "RunReportExportJobResponse", + "properties": { + "reportExportExecution": { + "$ref": "ReportExportExecution", + "description": "Output only. Execution status of the export operation.", + "readOnly": true + } + }, + "type": "object" + }, "RunningProcess": { "description": "Guest OS running process details.", "id": "RunningProcess", diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index 86e03768974..5248871e805 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -303,11 +303,23 @@ type ProjectsLocationsReportConfigsService struct { func NewProjectsLocationsReportConfigsReportsService(s *Service) *ProjectsLocationsReportConfigsReportsService { rs := &ProjectsLocationsReportConfigsReportsService{s: s} + rs.ReportExportJobs = NewProjectsLocationsReportConfigsReportsReportExportJobsService(s) return rs } type ProjectsLocationsReportConfigsReportsService struct { s *Service + + ReportExportJobs *ProjectsLocationsReportConfigsReportsReportExportJobsService +} + +func NewProjectsLocationsReportConfigsReportsReportExportJobsService(s *Service) *ProjectsLocationsReportConfigsReportsReportExportJobsService { + rs := &ProjectsLocationsReportConfigsReportsReportExportJobsService{s: s} + return rs +} + +type ProjectsLocationsReportConfigsReportsReportExportJobsService struct { + s *Service } func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService { @@ -3144,6 +3156,33 @@ func (s ExecutionReport) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExportReportRequest: Request to export a detailed pricing report. +type ExportReportRequest struct { +} + +// ExportReportResponse: Response message for exporting report. +type ExportReportResponse struct { + // ReportArtifactLinks: For large generated report, we may return multiple + // links + ReportArtifactLinks []*ReportArtifactLink `json:"reportArtifactLinks,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReportArtifactLinks") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReportArtifactLinks") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportReportResponse) MarshalJSON() ([]byte, error) { + type NoMethod ExportReportResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // FileValidationReport: A resource that aggregates the validation errors found // in an import job file. type FileValidationReport struct { @@ -3347,6 +3386,35 @@ func (s GCSPayloadInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GenerateReportArtifactLinkRequest: A request to generate a link to an +// artifact for a Report. +type GenerateReportArtifactLinkRequest struct { + // ArtifactType: Required. Type of the artifact requested. + // + // Possible values: + // "ARTIFACT_TYPE_UNSPECIFIED" - Unspecified (default value). + // "PRESENTATION" - Google Slides presentation. + // "SPREADSHEET" - Google Sheets document. + // "CSV" - Comma Separated Value Text File. + ArtifactType string `json:"artifactType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ArtifactType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ArtifactType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GenerateReportArtifactLinkRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateReportArtifactLinkRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GenericInsight: A generic insight about an asset. type GenericInsight struct { // AdditionalInformation: Output only. Additional information about the @@ -4508,6 +4576,35 @@ func (s ListReportConfigsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListReportExportJobsResponse: Response message for listing report export +// jobs. +type ListReportExportJobsResponse struct { + // NextPageToken: Output only. A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + // ReportExportJobs: Output only. The list of report export jobs. + ReportExportJobs []*ReportExportJob `json:"reportExportJobs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListReportExportJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReportExportJobsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListReportsResponse: Response message for listing Reports. type ListReportsResponse struct { // NextPageToken: A token identifying a page of results the server should @@ -6039,6 +6136,8 @@ type Report struct { State string `json:"state,omitempty"` // Summary: Output only. Summary view of the Report. Summary *ReportSummary `json:"summary,omitempty"` + // TcoDetails: Output only. Detailed data related to TCO reports. + TcoDetails *ReportTotalCostOfOwnershipDetails `json:"tcoDetails,omitempty"` // Type: Report type. // // Possible values: @@ -6068,6 +6167,35 @@ func (s Report) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReportArtifactLink: Describes a link to a generated artifact of the report. +type ReportArtifactLink struct { + // DisplayName: Output only. Human friendly display name of the artifact. + DisplayName string `json:"displayName,omitempty"` + // Uri: Output only. URI of the artifact. + Uri string `json:"uri,omitempty"` + // UriExpirationTime: Output only. Expiration time of the URI. + UriExpirationTime string `json:"uriExpirationTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReportArtifactLink) MarshalJSON() ([]byte, error) { + type NoMethod ReportArtifactLink + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ReportAssetFramesResponse: A response to a call to `ReportAssetFrame`. type ReportAssetFramesResponse struct { // ServerResponse contains the HTTP response code and headers from the server. @@ -6136,6 +6264,96 @@ func (s ReportConfigGroupPreferenceSetAssignment) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReportExportExecution: Execution status of report export operation. +type ReportExportExecution struct { + // EndTime: Output only. Completion time of the export. + EndTime string `json:"endTime,omitempty"` + // ExecutionId: Output only. Globally unique identifier of the execution. + ExecutionId string `json:"executionId,omitempty"` + // ExpireTime: Output only. Expiration time for the export and artifacts. + ExpireTime string `json:"expireTime,omitempty"` + // ProgressPercentage: Output only. Represents the progress of the execution. + // It reaches 100 when the execution is successfully completed. When the + // execution finishes with a failure, the progress is set to 0. + ProgressPercentage int64 `json:"progressPercentage,omitempty"` + // Result: Output only. Result of the export execution. + Result *ReportExportExecutionResult `json:"result,omitempty"` + // StartTime: Output only. Execution start timestamp. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReportExportExecution) MarshalJSON() ([]byte, error) { + type NoMethod ReportExportExecution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ReportExportExecutionResult: Contains the result of the report export. +type ReportExportExecutionResult struct { + // Error: Output only. Error encountered during export. + Error *Status `json:"error,omitempty"` + // OutputFiles: Output only. List of output files. + OutputFiles *OutputFileList `json:"outputFiles,omitempty"` + // SignedUris: Output only. Signed URLs for downloading export artifacts. + SignedUris *SignedUris `json:"signedUris,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReportExportExecutionResult) MarshalJSON() ([]byte, error) { + type NoMethod ReportExportExecutionResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ReportExportJob: Report export job message. +type ReportExportJob struct { + // Name: Output only. Identifier. Resource name. + Name string `json:"name,omitempty"` + // RecentExecutions: Output only. Recent not expired executions of the export + // report job. + RecentExecutions []*ReportExportExecution `json:"recentExecutions,omitempty"` + // SignedUriDestination: Export with a SignedUri. + SignedUriDestination *SignedUriDestination `json:"signedUriDestination,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReportExportJob) MarshalJSON() ([]byte, error) { + type NoMethod ReportExportJob + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ReportSummary: Describes the Summary view of a Report, which contains // aggregated values for all the groups and preference sets included in this // Report. @@ -6720,6 +6938,29 @@ func (s ReportSummaryVMWareNodeAllocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReportTotalCostOfOwnershipDetails: Detailed data related to Total Cost of +// Ownership (TCO) pricing. +type ReportTotalCostOfOwnershipDetails struct { + // HasPricingData: Output only. Whether the report has detailed pricing data. + HasPricingData bool `json:"hasPricingData,omitempty"` + // ForceSendFields is a list of field names (e.g. "HasPricingData") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HasPricingData") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReportTotalCostOfOwnershipDetails) MarshalJSON() ([]byte, error) { + type NoMethod ReportTotalCostOfOwnershipDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ResourceLocation: Location of a resource. type ResourceLocation struct { // Region: Optional. The name of the region. @@ -6830,6 +7071,62 @@ func (s RunImportJobRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RunReportExportJobRequest: A request to run a report export job. +type RunReportExportJobRequest struct { + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. For example, + // consider a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the server can + // check if original operation with the same request ID was received, and if + // so, will ignore the second request. This prevents clients from accidentally + // creating duplicate commitments. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequestId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RunReportExportJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunReportExportJobRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RunReportExportJobResponse: Response message for running a report export +// job. +type RunReportExportJobResponse struct { + // ReportExportExecution: Output only. Execution status of the export + // operation. + ReportExportExecution *ReportExportExecution `json:"reportExportExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReportExportExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReportExportExecution") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RunReportExportJobResponse) MarshalJSON() ([]byte, error) { + type NoMethod RunReportExportJobResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RunningProcess: Guest OS running process details. type RunningProcess struct { // Attributes: Process extended attributes. @@ -15161,83 +15458,188 @@ func (c *ProjectsLocationsReportConfigsListCall) Pages(ctx context.Context, f fu } } -type ProjectsLocationsReportConfigsReportsCreateCall struct { - s *Service - parent string - report *Report - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReportConfigsReportsArtifactLinkCall struct { + s *Service + name string + generatereportartifactlinkrequest *GenerateReportArtifactLinkRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a report. +// ArtifactLink: Gets the link to the generated artifact of a given type for a +// Report. // -// - parent: Value for parent. -func (r *ProjectsLocationsReportConfigsReportsService) Create(parent string, report *Report) *ProjectsLocationsReportConfigsReportsCreateCall { - c := &ProjectsLocationsReportConfigsReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.report = report - return c -} - -// ReportId sets the optional parameter "reportId": Required. User specified id -// for the report. It will become the last component of the report name. The id -// must be unique within the project, must conform with RFC-1034, is restricted -// to lower-cased letters, and has a maximum length of 63 characters. The id -// must match the regular expression: a-z ([a-z0-9-]{0,61}[a-z0-9])?. -func (c *ProjectsLocationsReportConfigsReportsCreateCall) ReportId(reportId string) *ProjectsLocationsReportConfigsReportsCreateCall { - c.urlParams_.Set("reportId", reportId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. The server will guarantee that for at least 60 minutes since -// the first request. For example, consider a situation where you make an -// initial request and the request times out. If you make the request again -// with the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsReportConfigsReportsCreateCall) RequestId(requestId string) *ProjectsLocationsReportConfigsReportsCreateCall { - c.urlParams_.Set("requestId", requestId) +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsService) ArtifactLink(name string, generatereportartifactlinkrequest *GenerateReportArtifactLinkRequest) *ProjectsLocationsReportConfigsReportsArtifactLinkCall { + c := &ProjectsLocationsReportConfigsReportsArtifactLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.generatereportartifactlinkrequest = generatereportartifactlinkrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsReportConfigsReportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsCreateCall { +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsArtifactLinkCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReportConfigsReportsCreateCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsCreateCall { +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsArtifactLinkCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsReportConfigsReportsCreateCall) Header() http.Header { +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReportConfigsReportsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReportConfigsReportsArtifactLinkCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.report) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.generatereportartifactlinkrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/reports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:artifactLink") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.artifactLink", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.artifactLink" call. +// Any non-2xx status code is an error. Response headers are in either +// *ReportArtifactLink.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 *ProjectsLocationsReportConfigsReportsArtifactLinkCall) Do(opts ...googleapi.CallOption) (*ReportArtifactLink, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ReportArtifactLink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.artifactLink", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsReportConfigsReportsCreateCall struct { + s *Service + parent string + report *Report + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a report. +// +// - parent: Value for parent. +func (r *ProjectsLocationsReportConfigsReportsService) Create(parent string, report *Report) *ProjectsLocationsReportConfigsReportsCreateCall { + c := &ProjectsLocationsReportConfigsReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.report = report + return c +} + +// ReportId sets the optional parameter "reportId": Required. User specified id +// for the report. It will become the last component of the report name. The id +// must be unique within the project, must conform with RFC-1034, is restricted +// to lower-cased letters, and has a maximum length of 63 characters. The id +// must match the regular expression: a-z ([a-z0-9-]{0,61}[a-z0-9])?. +func (c *ProjectsLocationsReportConfigsReportsCreateCall) ReportId(reportId string) *ProjectsLocationsReportConfigsReportsCreateCall { + c.urlParams_.Set("reportId", reportId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsReportConfigsReportsCreateCall) RequestId(requestId string) *ProjectsLocationsReportConfigsReportsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReportConfigsReportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsCreateCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.report) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/reports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15403,6 +15805,109 @@ func (c *ProjectsLocationsReportConfigsReportsDeleteCall) Do(opts ...googleapi.C return ret, nil } +type ProjectsLocationsReportConfigsReportsExportCall struct { + s *Service + name string + exportreportrequest *ExportReportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Export a Report into a supported format. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsService) Export(name string, exportreportrequest *ExportReportRequest) *ProjectsLocationsReportConfigsReportsExportCall { + c := &ProjectsLocationsReportConfigsReportsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportreportrequest = exportreportrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReportConfigsReportsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsExportCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportreportrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:export") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.export", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.export" call. +// 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 *ProjectsLocationsReportConfigsReportsExportCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.export", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsReportConfigsReportsGetCall struct { s *Service name string @@ -15721,6 +16226,604 @@ func (c *ProjectsLocationsReportConfigsReportsListCall) Pages(ctx context.Contex } } +type ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall struct { + s *Service + parent string + reportexportjob *ReportExportJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Export a Report into a supported destination. +// +// - parent: The parent resource where this export job will be created. +func (r *ProjectsLocationsReportConfigsReportsReportExportJobsService) Create(parent string, reportexportjob *ReportExportJob) *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall { + c := &ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.reportexportjob = reportexportjob + return c +} + +// ReportExportJobId sets the optional parameter "reportExportJobId": Required. +// The ID to use for the report export job. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall) ReportExportJobId(reportExportJobId string) *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall { + c.urlParams_.Set("reportExportJobId", reportExportJobId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall) RequestId(requestId string) *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reportexportjob) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/reportExportJobs") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.create" call. +// 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 *ProjectsLocationsReportConfigsReportsReportExportJobsCreateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an report export job. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsReportExportJobsService) Delete(name string) *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall { + c := &ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall) RequestId(requestId string) *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.delete" call. +// 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 *ProjectsLocationsReportConfigsReportsReportExportJobsDeleteCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsReportConfigsReportsReportExportJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a report export job. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsReportExportJobsService) Get(name string) *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall { + c := &ProjectsLocationsReportConfigsReportsReportExportJobsGetCall{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 +// details. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ReportExportJob.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 *ProjectsLocationsReportConfigsReportsReportExportJobsGetCall) Do(opts ...googleapi.CallOption) (*ReportExportJob, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ReportExportJob{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsReportConfigsReportsReportExportJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the report export jobs for a given report. +// +// - parent: Parent report owning the export jobs. +func (r *ProjectsLocationsReportConfigsReportsReportExportJobsService) List(parent string) *ProjectsLocationsReportConfigsReportsReportExportJobsListCall { + c := &ProjectsLocationsReportConfigsReportsReportExportJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer items than requested. If unspecified, the server +// will pick an appropriate default value. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) PageSize(pageSize int64) *ProjectsLocationsReportConfigsReportsReportExportJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results that the server should return. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) PageToken(pageToken string) *ProjectsLocationsReportConfigsReportsReportExportJobsListCall { + 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 +// details. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsReportExportJobsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReportConfigsReportsReportExportJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsReportExportJobsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/reportExportJobs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListReportExportJobsResponse.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 *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) Do(opts ...googleapi.CallOption) (*ListReportExportJobsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListReportExportJobsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *ProjectsLocationsReportConfigsReportsReportExportJobsListCall) Pages(ctx context.Context, f func(*ListReportExportJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsReportConfigsReportsReportExportJobsRunCall struct { + s *Service + name string + runreportexportjobrequest *RunReportExportJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Runs a report export job. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsReportExportJobsService) Run(name string, runreportexportjobrequest *RunReportExportJobRequest) *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall { + c := &ProjectsLocationsReportConfigsReportsReportExportJobsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.runreportexportjobrequest = runreportexportjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.runreportexportjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:run") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.run", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.run" call. +// 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 *ProjectsLocationsReportConfigsReportsReportExportJobsRunCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "migrationcenter.projects.locations.reportConfigs.reports.reportExportJobs.run", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsSourcesCreateCall struct { s *Service parent string diff --git a/netapp/v1/netapp-api.json b/netapp/v1/netapp-api.json index 4123c6352e1..5f6bbab5f7f 100644 --- a/netapp/v1/netapp-api.json +++ b/netapp/v1/netapp-api.json @@ -2515,7 +2515,7 @@ } } }, - "revision": "20251029", + "revision": "20251109", "rootUrl": "https://netapp.googleapis.com/", "schemas": { "ActiveDirectory": { @@ -4606,8 +4606,7 @@ "UPDATING", "RESTORING", "DISABLED", - "ERROR", - "DEGRADED" + "ERROR" ], "enumDescriptions": [ "Unspecified Storage Pool State", @@ -4617,8 +4616,7 @@ "Storage Pool State is Updating", "Storage Pool State is Restoring", "Storage Pool State is Disabled", - "Storage Pool State is Error", - "Storage Pool State is Degraded The storage pool is operational, but with reduced performance." + "Storage Pool State is Error" ], "readOnly": true, "type": "string" diff --git a/netapp/v1/netapp-gen.go b/netapp/v1/netapp-gen.go index 64b9c1025eb..cb50a27f936 100644 --- a/netapp/v1/netapp-gen.go +++ b/netapp/v1/netapp-gen.go @@ -2368,8 +2368,6 @@ type StoragePool struct { // "RESTORING" - Storage Pool State is Restoring // "DISABLED" - Storage Pool State is Disabled // "ERROR" - Storage Pool State is Error - // "DEGRADED" - Storage Pool State is Degraded The storage pool is - // operational, but with reduced performance. State string `json:"state,omitempty"` // StateDetails: Output only. State details of the storage pool StateDetails string `json:"stateDetails,omitempty"` diff --git a/netapp/v1beta1/netapp-api.json b/netapp/v1beta1/netapp-api.json index 5c33ac031ff..4f2a39583c3 100644 --- a/netapp/v1beta1/netapp-api.json +++ b/netapp/v1beta1/netapp-api.json @@ -2543,7 +2543,7 @@ } } }, - "revision": "20251029", + "revision": "20251109", "rootUrl": "https://netapp.googleapis.com/", "schemas": { "ActiveDirectory": { @@ -4660,8 +4660,7 @@ "UPDATING", "RESTORING", "DISABLED", - "ERROR", - "DEGRADED" + "ERROR" ], "enumDescriptions": [ "Unspecified Storage Pool State", @@ -4671,8 +4670,7 @@ "Storage Pool State is Updating", "Storage Pool State is Restoring", "Storage Pool State is Disabled", - "Storage Pool State is Error", - "Storage Pool State is Degraded The storage pool is operational, but with reduced performance." + "Storage Pool State is Error" ], "readOnly": true, "type": "string" diff --git a/netapp/v1beta1/netapp-gen.go b/netapp/v1beta1/netapp-gen.go index f5b0c7cb20a..4432506cf9a 100644 --- a/netapp/v1beta1/netapp-gen.go +++ b/netapp/v1beta1/netapp-gen.go @@ -2400,8 +2400,6 @@ type StoragePool struct { // "RESTORING" - Storage Pool State is Restoring // "DISABLED" - Storage Pool State is Disabled // "ERROR" - Storage Pool State is Error - // "DEGRADED" - Storage Pool State is Degraded The storage pool is - // operational, but with reduced performance. State string `json:"state,omitempty"` // StateDetails: Output only. State details of the storage pool StateDetails string `json:"stateDetails,omitempty"` diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index de153507ffd..e55e00f4ae7 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -427,7 +427,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resourcs: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", + "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resources: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1090,7 +1090,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resourcs: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", + "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resources: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1233,7 +1233,7 @@ } } }, - "revision": "20251022", + "revision": "20251105", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1900,7 +1900,8 @@ "L2_INTERCONNECT_UNSUPPORTED_PORT", "L2_INTERCONNECT_DESTINATION_IP_MISMATCH", "NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED", - "HYBRID_SUBNET_REGION_MISMATCH" + "HYBRID_SUBNET_REGION_MISMATCH", + "HYBRID_SUBNET_NO_ROUTE" ], "enumDescriptions": [ "Cause is unspecified.", @@ -2001,7 +2002,8 @@ "Packet is dropped due to using an unsupported port (any other than 6081) for L2 Interconnect.", "Packet is dropped due to destination IP not matching the appliance mapping IPs configured on the L2 Interconnect attachment.", "Packet could be dropped because it matches a route associated with an NCC spoke in the hybrid subnet context, but such a configuration is not supported.", - "Packet is dropped because the region of the hybrid subnet is different from the region of the next hop of the route matched within this hybrid subnet." + "Packet is dropped because the region of the hybrid subnet is different from the region of the next hop of the route matched within this hybrid subnet.", + "Packet is dropped because no matching route was found in the hybrid subnet." ], "type": "string" }, @@ -2403,6 +2405,8 @@ "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE", "NETWORK_FIREWALL_POLICY_RULE", "NETWORK_REGIONAL_FIREWALL_POLICY_RULE", + "SYSTEM_NETWORK_FIREWALL_POLICY_RULE", + "SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE", "UNSUPPORTED_FIREWALL_POLICY_RULE", "TRACKING_STATE", "ANALYSIS_SKIPPED" @@ -2413,8 +2417,10 @@ "VPC firewall rule. For details, see [VPC firewall rules overview](https://cloud.google.com/vpc/docs/firewalls).", "Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).", "Implicit firewall rules that are managed by serverless VPC access to allow ingress access. They are not visible in the Google Cloud console. For details, see [VPC connector's implicit rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).", - "Global network firewall policy rule. For details, see [Network firewall policies](https://cloud.google.com/vpc/docs/network-firewall-policies).", - "Regional network firewall policy rule. For details, see [Regional network firewall policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).", + "User-defined global network firewall policy rule. For details, see [Network firewall policies](https://cloud.google.com/vpc/docs/network-firewall-policies).", + "User-defined regional network firewall policy rule. For details, see [Regional network firewall policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).", + "System-defined global network firewall policy rule.", + "System-defined regional network firewall policy rule.", "Firewall policy rule containing attributes not yet supported in Connectivity tests. Firewall analysis is skipped if such a rule can potentially be matched. Please see the [list of unsupported configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs).", "Tracking state for response traffic created when request traffic goes through allow firewall rule. For details, see [firewall rules specifications](https://cloud.google.com/firewall/docs/firewalls#specifications)", "Firewall analysis was skipped due to executing Connectivity Test in the BypassFirewallChecks mode" diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 7f54a6dc1b1..de471f1cf1e 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1217,6 +1217,8 @@ type DropInfo struct { // "HYBRID_SUBNET_REGION_MISMATCH" - Packet is dropped because the region of // the hybrid subnet is different from the region of the next hop of the route // matched within this hybrid subnet. + // "HYBRID_SUBNET_NO_ROUTE" - Packet is dropped because no matching route was + // found in the hybrid subnet. Cause string `json:"cause,omitempty"` // DestinationGeolocationCode: Geolocation (region code) of the destination IP // address (if relevant). @@ -1647,12 +1649,16 @@ type FirewallInfo struct { // implicit // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#rest // rict-access). - // "NETWORK_FIREWALL_POLICY_RULE" - Global network firewall policy rule. For - // details, see [Network firewall + // "NETWORK_FIREWALL_POLICY_RULE" - User-defined global network firewall + // policy rule. For details, see [Network firewall // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - // "NETWORK_REGIONAL_FIREWALL_POLICY_RULE" - Regional network firewall policy - // rule. For details, see [Regional network firewall + // "NETWORK_REGIONAL_FIREWALL_POLICY_RULE" - User-defined regional network + // firewall policy rule. For details, see [Regional network firewall // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + // "SYSTEM_NETWORK_FIREWALL_POLICY_RULE" - System-defined global network + // firewall policy rule. + // "SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE" - System-defined regional + // network firewall policy rule. // "UNSUPPORTED_FIREWALL_POLICY_RULE" - Firewall policy rule containing // attributes not yet supported in Connectivity tests. Firewall analysis is // skipped if such a rule can potentially be matched. Please see the [list of @@ -4908,7 +4914,7 @@ type OrganizationsLocationsVpcFlowLogsConfigsListCall struct { // List: Lists all `VpcFlowLogsConfigs` in a given organization. // // - parent: The parent resource of the VpcFlowLogsConfig, in one of the -// following formats: - For project-level resourcs: +// following formats: - For project-level resources: // `projects/{project_id}/locations/global` - For organization-level // resources: `organizations/{organization_id}/locations/global`. func (r *OrganizationsLocationsVpcFlowLogsConfigsService) List(parent string) *OrganizationsLocationsVpcFlowLogsConfigsListCall { @@ -7373,7 +7379,7 @@ type ProjectsLocationsVpcFlowLogsConfigsListCall struct { // List: Lists all `VpcFlowLogsConfigs` in a given project. // // - parent: The parent resource of the VpcFlowLogsConfig, in one of the -// following formats: - For project-level resourcs: +// following formats: - For project-level resources: // `projects/{project_id}/locations/global` - For organization-level // resources: `organizations/{organization_id}/locations/global`. func (r *ProjectsLocationsVpcFlowLogsConfigsService) List(parent string) *ProjectsLocationsVpcFlowLogsConfigsListCall { diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 539bb447d0f..13a97884887 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -431,7 +431,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resourcs: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", + "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resources: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1094,7 +1094,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resourcs: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", + "description": "Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resources: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1237,7 +1237,7 @@ } } }, - "revision": "20251022", + "revision": "20251105", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1904,7 +1904,8 @@ "L2_INTERCONNECT_UNSUPPORTED_PORT", "L2_INTERCONNECT_DESTINATION_IP_MISMATCH", "NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED", - "HYBRID_SUBNET_REGION_MISMATCH" + "HYBRID_SUBNET_REGION_MISMATCH", + "HYBRID_SUBNET_NO_ROUTE" ], "enumDescriptions": [ "Cause is unspecified.", @@ -2005,7 +2006,8 @@ "Packet is dropped due to using an unsupported port (any other than 6081) for L2 Interconnect.", "Packet is dropped due to destination IP not matching the appliance mapping IPs configured on the L2 Interconnect attachment.", "Packet could be dropped because it matches a route associated with an NCC spoke in the hybrid subnet context, but such a configuration is not supported.", - "Packet is dropped because the region of the hybrid subnet is different from the region of the next hop of the route matched within this hybrid subnet." + "Packet is dropped because the region of the hybrid subnet is different from the region of the next hop of the route matched within this hybrid subnet.", + "Packet is dropped because no matching route was found in the hybrid subnet." ], "type": "string" }, @@ -2415,6 +2417,8 @@ "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE", "NETWORK_FIREWALL_POLICY_RULE", "NETWORK_REGIONAL_FIREWALL_POLICY_RULE", + "SYSTEM_NETWORK_FIREWALL_POLICY_RULE", + "SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE", "UNSUPPORTED_FIREWALL_POLICY_RULE", "TRACKING_STATE", "ANALYSIS_SKIPPED" @@ -2425,8 +2429,10 @@ "VPC firewall rule. For details, see [VPC firewall rules overview](https://cloud.google.com/vpc/docs/firewalls).", "Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).", "Implicit firewall rules that are managed by serverless VPC access to allow ingress access. They are not visible in the Google Cloud console. For details, see [VPC connector's implicit rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).", - "Global network firewall policy rule. For details, see [Network firewall policies](https://cloud.google.com/vpc/docs/network-firewall-policies).", - "Regional network firewall policy rule. For details, see [Regional network firewall policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).", + "User-defined global network firewall policy rule. For details, see [Network firewall policies](https://cloud.google.com/vpc/docs/network-firewall-policies).", + "User-defined regional network firewall policy rule. For details, see [Regional network firewall policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).", + "System-defined global network firewall policy rule.", + "System-defined regional network firewall policy rule.", "Firewall policy rule containing attributes not yet supported in Connectivity tests. Firewall analysis is skipped if such a rule can potentially be matched. Please see the [list of unsupported configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs).", "Tracking state for response traffic created when request traffic goes through allow firewall rule. For details, see [firewall rules specifications](https://cloud.google.com/firewall/docs/firewalls#specifications)", "Firewall analysis was skipped due to executing Connectivity Test in the BypassFirewallChecks mode" diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 392d3a2e8ba..39453bea2f0 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -1227,6 +1227,8 @@ type DropInfo struct { // "HYBRID_SUBNET_REGION_MISMATCH" - Packet is dropped because the region of // the hybrid subnet is different from the region of the next hop of the route // matched within this hybrid subnet. + // "HYBRID_SUBNET_NO_ROUTE" - Packet is dropped because no matching route was + // found in the hybrid subnet. Cause string `json:"cause,omitempty"` // DestinationGeolocationCode: Geolocation (region code) of the destination IP // address (if relevant). @@ -1662,12 +1664,16 @@ type FirewallInfo struct { // implicit // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#rest // rict-access). - // "NETWORK_FIREWALL_POLICY_RULE" - Global network firewall policy rule. For - // details, see [Network firewall + // "NETWORK_FIREWALL_POLICY_RULE" - User-defined global network firewall + // policy rule. For details, see [Network firewall // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - // "NETWORK_REGIONAL_FIREWALL_POLICY_RULE" - Regional network firewall policy - // rule. For details, see [Regional network firewall + // "NETWORK_REGIONAL_FIREWALL_POLICY_RULE" - User-defined regional network + // firewall policy rule. For details, see [Regional network firewall // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + // "SYSTEM_NETWORK_FIREWALL_POLICY_RULE" - System-defined global network + // firewall policy rule. + // "SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE" - System-defined regional + // network firewall policy rule. // "UNSUPPORTED_FIREWALL_POLICY_RULE" - Firewall policy rule containing // attributes not yet supported in Connectivity tests. Firewall analysis is // skipped if such a rule can potentially be matched. Please see the [list of @@ -4925,7 +4931,7 @@ type OrganizationsLocationsVpcFlowLogsConfigsListCall struct { // List: Lists all `VpcFlowLogsConfigs` in a given organization. // // - parent: The parent resource of the VpcFlowLogsConfig, in one of the -// following formats: - For project-level resourcs: +// following formats: - For project-level resources: // `projects/{project_id}/locations/global` - For organization-level // resources: `organizations/{organization_id}/locations/global`. func (r *OrganizationsLocationsVpcFlowLogsConfigsService) List(parent string) *OrganizationsLocationsVpcFlowLogsConfigsListCall { @@ -7390,7 +7396,7 @@ type ProjectsLocationsVpcFlowLogsConfigsListCall struct { // List: Lists all `VpcFlowLogsConfigs` in a given project. // // - parent: The parent resource of the VpcFlowLogsConfig, in one of the -// following formats: - For project-level resourcs: +// following formats: - For project-level resources: // `projects/{project_id}/locations/global` - For organization-level // resources: `organizations/{organization_id}/locations/global`. func (r *ProjectsLocationsVpcFlowLogsConfigsService) List(parent string) *ProjectsLocationsVpcFlowLogsConfigsListCall { diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 8218c68b205..af316d1662a 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -3191,7 +3191,7 @@ } } }, - "revision": "20251029", + "revision": "20251105", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -3323,11 +3323,13 @@ "description": "Optional. The format of communication supported by the callout extension. If not specified, the default value `EXT_PROC_GRPC` is used.", "enum": [ "WIRE_FORMAT_UNSPECIFIED", - "EXT_PROC_GRPC" + "EXT_PROC_GRPC", + "EXT_AUTHZ_GRPC" ], "enumDescriptions": [ "Not specified.", - "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream." + "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream.", + "The extension service uses Envoy's `ext_authz` gRPC API. The backend service for the extension must use HTTP2, or H2C as the protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources." ], "type": "string" } diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index 151c0142a9e..b0047b15494 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -581,6 +581,10 @@ type AuthzExtension struct { // backend service for the extension must use HTTP2 or H2C as the protocol. All // `supported_events` for a client request are sent as part of the same gRPC // stream. + // "EXT_AUTHZ_GRPC" - The extension service uses Envoy's `ext_authz` gRPC + // API. The backend service for the extension must use HTTP2, or H2C as the + // protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` + // resources. WireFormat string `json:"wireFormat,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 76984f0a1f4..91da95bd15b 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -3100,7 +3100,7 @@ } } }, - "revision": "20251029", + "revision": "20251105", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuthzExtension": { @@ -3184,11 +3184,13 @@ "description": "Optional. The format of communication supported by the callout extension. If not specified, the default value `EXT_PROC_GRPC` is used.", "enum": [ "WIRE_FORMAT_UNSPECIFIED", - "EXT_PROC_GRPC" + "EXT_PROC_GRPC", + "EXT_AUTHZ_GRPC" ], "enumDescriptions": [ "Not specified.", - "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream." + "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream.", + "The extension service uses Envoy's `ext_authz` gRPC API. The backend service for the extension must use HTTP2, or H2C as the protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources." ], "type": "string" } diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index ff8929198ec..9bb4bdd584d 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -481,6 +481,10 @@ type AuthzExtension struct { // backend service for the extension must use HTTP2 or H2C as the protocol. All // `supported_events` for a client request are sent as part of the same gRPC // stream. + // "EXT_AUTHZ_GRPC" - The extension service uses Envoy's `ext_authz` gRPC + // API. The backend service for the extension must use HTTP2, or H2C as the + // protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` + // resources. WireFormat string `json:"wireFormat,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/parametermanager/v1/parametermanager-api.json b/parametermanager/v1/parametermanager-api.json index 0abe5e9e6dd..3e748ebacea 100644 --- a/parametermanager/v1/parametermanager-api.json +++ b/parametermanager/v1/parametermanager-api.json @@ -240,6 +240,16 @@ "description": "Regional Endpoint", "endpointUrl": "https://parametermanager.europe-west15.rep.googleapis.com/", "location": "europe-west15" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://parametermanager.us.rep.googleapis.com/", + "location": "us" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://parametermanager.eu.rep.googleapis.com/", + "location": "eu" } ], "fullyEncodeReservedExpansion": true, @@ -821,7 +831,7 @@ } } }, - "revision": "20251025", + "revision": "20251110", "rootUrl": "https://parametermanager.googleapis.com/", "schemas": { "Empty": { diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json index 6ee93e03a77..2f443d607e7 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json @@ -586,7 +586,7 @@ } } }, - "revision": "20251026", + "revision": "20251113", "rootUrl": "https://paymentsresellersubscription.googleapis.com/", "schemas": { "Amount": { @@ -1330,6 +1330,20 @@ "cycleOptions": { "$ref": "CycleOptions", "description": "Optional. The cycle options for the subscription." + }, + "resumeMode": { + "description": "Required. The mode to resume the subscription.", + "enum": [ + "RESUME_MODE_UNSPECIFIED", + "RESUME_MODE_CYCLE_OPTIONS", + "RESUME_MODE_RESTORE_EXISTING_BILLING_SCHEDULE" + ], + "enumDescriptions": [ + "Reserved for invalid or unexpected value. Do not use.", + "Resume the subscription using the input from `cycle_options`.", + "Resume the subscription with the existing billing schedule. The subscription's next renewal time must still be in the future for this mode to be applicable." + ], + "type": "string" } }, "type": "object" diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go index 21f6b627c01..c990ff999ff 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go @@ -1276,6 +1276,17 @@ func (s PromotionIntroductoryPricingDetailsIntroductoryPricingSpec) MarshalJSON( type ResumeSubscriptionRequest struct { // CycleOptions: Optional. The cycle options for the subscription. CycleOptions *CycleOptions `json:"cycleOptions,omitempty"` + // ResumeMode: Required. The mode to resume the subscription. + // + // Possible values: + // "RESUME_MODE_UNSPECIFIED" - Reserved for invalid or unexpected value. Do + // not use. + // "RESUME_MODE_CYCLE_OPTIONS" - Resume the subscription using the input from + // `cycle_options`. + // "RESUME_MODE_RESTORE_EXISTING_BILLING_SCHEDULE" - Resume the subscription + // with the existing billing schedule. The subscription's next renewal time + // must still be in the future for this mode to be applicable. + ResumeMode string `json:"resumeMode,omitempty"` // ForceSendFields is a list of field names (e.g. "CycleOptions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index 29bd48efd58..c2f27e8d5e4 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -19,6 +19,36 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/pubsub/docs", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.asia-south1.rep.googleapis.com/", @@ -31,14 +61,44 @@ }, { "description": "Regional Endpoint", - "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", - "location": "me-central2" + "endpointUrl": "https://pubsub.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-southeast3.rep.googleapis.com/", + "location": "asia-southeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west2.rep.googleapis.com/", + "location": "europe-west2" }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", "location": "europe-west3" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.europe-west8.rep.googleapis.com/", @@ -49,6 +109,46 @@ "endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", "location": "europe-west9" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.us-central1.rep.googleapis.com/", @@ -1648,7 +1748,7 @@ } } }, - "revision": "20251025", + "revision": "20251104", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/pubsub/v1beta1a/pubsub-api.json b/pubsub/v1beta1a/pubsub-api.json index d533e082aa2..163300b4c18 100644 --- a/pubsub/v1beta1a/pubsub-api.json +++ b/pubsub/v1beta1a/pubsub-api.json @@ -19,6 +19,36 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/pubsub/docs", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.asia-south1.rep.googleapis.com/", @@ -31,14 +61,44 @@ }, { "description": "Regional Endpoint", - "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", - "location": "me-central2" + "endpointUrl": "https://pubsub.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-southeast3.rep.googleapis.com/", + "location": "asia-southeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west2.rep.googleapis.com/", + "location": "europe-west2" }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", "location": "europe-west3" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.europe-west8.rep.googleapis.com/", @@ -49,6 +109,46 @@ "endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", "location": "europe-west9" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.us-central1.rep.googleapis.com/", @@ -539,7 +639,7 @@ } } }, - "revision": "20250807", + "revision": "20251104", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/pubsub/v1beta2/pubsub-api.json b/pubsub/v1beta2/pubsub-api.json index 8878cdc9055..c33c3e18524 100644 --- a/pubsub/v1beta2/pubsub-api.json +++ b/pubsub/v1beta2/pubsub-api.json @@ -19,6 +19,36 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/pubsub/docs", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.asia-south1.rep.googleapis.com/", @@ -31,14 +61,44 @@ }, { "description": "Regional Endpoint", - "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", - "location": "me-central2" + "endpointUrl": "https://pubsub.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.asia-southeast3.rep.googleapis.com/", + "location": "asia-southeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west2.rep.googleapis.com/", + "location": "europe-west2" }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", "location": "europe-west3" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.europe-west8.rep.googleapis.com/", @@ -49,6 +109,46 @@ "endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", "location": "europe-west9" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://pubsub.us-central1.rep.googleapis.com/", @@ -806,7 +906,7 @@ } } }, - "revision": "20250807", + "revision": "20251104", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/pubsublite/v1/pubsublite-api.json b/pubsublite/v1/pubsublite-api.json index 0682693a2cc..86082c9029a 100644 --- a/pubsublite/v1/pubsublite-api.json +++ b/pubsublite/v1/pubsublite-api.json @@ -224,7 +224,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -1045,7 +1045,7 @@ } } }, - "revision": "20251003", + "revision": "20251107", "rootUrl": "https://pubsublite.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -1297,7 +1297,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/pubsublite/v1/pubsublite-gen.go b/pubsublite/v1/pubsublite-gen.go index 06bc05d2744..8a59f6bea79 100644 --- a/pubsublite/v1/pubsublite-gen.go +++ b/pubsublite/v1/pubsublite-gen.go @@ -727,8 +727,8 @@ type ListOperationsResponse struct { Operations []*Operation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1729,8 +1729,8 @@ func (c *AdminProjectsLocationsOperationsListCall) PageToken(pageToken string) * // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the // [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *AdminProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AdminProjectsLocationsOperationsListCall { diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index ed4b3fa307b..f5e8f165601 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -1647,7 +1647,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2258,7 +2258,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2335,7 +2335,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2353,7 +2353,7 @@ } } }, - "revision": "20251002", + "revision": "20251113", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -8333,7 +8333,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 54caa965309..2414560b017 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -9435,8 +9435,8 @@ type GoogleLongrunningListOperationsResponse struct { Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -15334,9 +15334,9 @@ func (c *ProjectsLocationsCatalogsOperationsListCall) PageToken(pageToken string // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsCatalogsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsCatalogsOperationsListCall { @@ -17688,9 +17688,9 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { @@ -17965,9 +17965,9 @@ func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperat // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsOperationsListCall { diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 4d21c44a45e..1898a20cf90 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2108,7 +2108,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2747,7 +2747,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2824,7 +2824,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2874,7 +2874,7 @@ } } }, - "revision": "20251030", + "revision": "20251113", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -9416,7 +9416,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 5880758055a..3726b098894 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -10305,8 +10305,8 @@ type GoogleLongrunningListOperationsResponse struct { Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -17919,9 +17919,9 @@ func (c *ProjectsLocationsCatalogsOperationsListCall) PageToken(pageToken string // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsCatalogsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsCatalogsOperationsListCall { @@ -20379,9 +20379,9 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { @@ -20656,9 +20656,9 @@ func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperat // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsOperationsListCall { diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 3011a3bec7f..faf24afeb90 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -1764,7 +1764,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2403,7 +2403,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2480,7 +2480,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -2498,7 +2498,7 @@ } } }, - "revision": "20251030", + "revision": "20251113", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -8698,7 +8698,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index abd587d4dc2..0dcb6dd2ca4 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -9759,8 +9759,8 @@ type GoogleLongrunningListOperationsResponse struct { Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -16097,9 +16097,9 @@ func (c *ProjectsLocationsCatalogsOperationsListCall) PageToken(pageToken string // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsCatalogsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsCatalogsOperationsListCall { @@ -18557,9 +18557,9 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { @@ -18834,9 +18834,9 @@ func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperat // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *ProjectsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsOperationsListCall { diff --git a/run/v1/run-api.json b/run/v1/run-api.json index 7e66c43bab8..80df1a0d3f6 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -111,6 +111,11 @@ "endpointUrl": "https://europe-west12-run.googleapis.com/", "location": "europe-west12" }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west15-run.googleapis.com/", + "location": "europe-west15" + }, { "description": "Locational Endpoint", "endpointUrl": "https://europe-west2-run.googleapis.com/", @@ -336,6 +341,11 @@ "endpointUrl": "https://run.europe-west12.rep.googleapis.com/", "location": "europe-west12" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://run.europe-west15.rep.googleapis.com/", + "location": "europe-west15" + }, { "description": "Regional Endpoint", "endpointUrl": "https://run.europe-west2.rep.googleapis.com/", @@ -3132,7 +3142,7 @@ } } }, - "revision": "20251031", + "revision": "20251107", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 417806bb697..6f41b78ade6 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -111,6 +111,11 @@ "endpointUrl": "https://europe-west12-run.googleapis.com/", "location": "europe-west12" }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west15-run.googleapis.com/", + "location": "europe-west15" + }, { "description": "Locational Endpoint", "endpointUrl": "https://europe-west2-run.googleapis.com/", @@ -336,6 +341,11 @@ "endpointUrl": "https://run.europe-west12.rep.googleapis.com/", "location": "europe-west12" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://run.europe-west15.rep.googleapis.com/", + "location": "europe-west15" + }, { "description": "Regional Endpoint", "endpointUrl": "https://run.europe-west2.rep.googleapis.com/", @@ -2167,7 +2177,7 @@ } } }, - "revision": "20251031", + "revision": "20251107", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { diff --git a/saasservicemgmt/v1beta1/saasservicemgmt-api.json b/saasservicemgmt/v1beta1/saasservicemgmt-api.json index 49591e566a3..f229a5accbc 100644 --- a/saasservicemgmt/v1beta1/saasservicemgmt-api.json +++ b/saasservicemgmt/v1beta1/saasservicemgmt-api.json @@ -144,7 +144,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -2011,7 +2011,7 @@ } } }, - "revision": "20250917", + "revision": "20251103", "rootUrl": "https://saasservicemgmt.googleapis.com/", "schemas": { "Aggregate": { @@ -2682,6 +2682,11 @@ "readOnly": true, "type": "string" }, + "effectiveUnitFilter": { + "description": "Optional. Output only. Output only snapshot of the effective unit filter at Rollout start time. Contains a CEL(https://github.com/google/cel-spec) expression consisting of a conjunction of Rollout.unit_filter and RolloutKind.unit_filter. This field captures the filter applied by the Rollout to determine the Unit population. If the associated RolloutKind's unit_filter is modified after the rollout is started, it will not be updated here.", + "readOnly": true, + "type": "string" + }, "endTime": { "description": "Optional. Output only. The time when the rollout finished execution (regardless of success, failure, or cancellation). Will be empty if the rollout hasn't finished yet. Once set, the rollout is in terminal state and all the results are final.", "format": "google-datetime", diff --git a/saasservicemgmt/v1beta1/saasservicemgmt-gen.go b/saasservicemgmt/v1beta1/saasservicemgmt-gen.go index 49306870725..fd00259af28 100644 --- a/saasservicemgmt/v1beta1/saasservicemgmt-gen.go +++ b/saasservicemgmt/v1beta1/saasservicemgmt-gen.go @@ -1087,6 +1087,14 @@ type Rollout struct { Control *RolloutControl `json:"control,omitempty"` // CreateTime: Output only. The timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` + // EffectiveUnitFilter: Optional. Output only. Output only snapshot of the + // effective unit filter at Rollout start time. Contains a + // CEL(https://github.com/google/cel-spec) expression consisting of a + // conjunction of Rollout.unit_filter and RolloutKind.unit_filter. This field + // captures the filter applied by the Rollout to determine the Unit population. + // If the associated RolloutKind's unit_filter is modified after the rollout is + // started, it will not be updated here. + EffectiveUnitFilter string `json:"effectiveUnitFilter,omitempty"` // EndTime: Optional. Output only. The time when the rollout finished execution // (regardless of success, failure, or cancellation). Will be empty if the // rollout hasn't finished yet. Once set, the rollout is in terminal state and @@ -2233,9 +2241,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/secretmanager/v1/secretmanager-api.json b/secretmanager/v1/secretmanager-api.json index d2771f2a299..d197346b726 100644 --- a/secretmanager/v1/secretmanager-api.json +++ b/secretmanager/v1/secretmanager-api.json @@ -26,11 +26,31 @@ "endpointUrl": "https://secretmanager.africa-south1.rep.googleapis.com/", "location": "africa-south1" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.asia-northeast1.rep.googleapis.com/", "location": "asia-northeast1" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.asia-south1.rep.googleapis.com/", @@ -51,6 +71,11 @@ "endpointUrl": "https://secretmanager.asia-southeast2.rep.googleapis.com/", "location": "asia-southeast2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-southeast3.rep.googleapis.com/", + "location": "asia-southeast3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.australia-southeast1.rep.googleapis.com/", @@ -66,16 +91,31 @@ "endpointUrl": "https://secretmanager.europe-central2.rep.googleapis.com/", "location": "europe-central2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.europe-north2.rep.googleapis.com/", "location": "europe-north2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.europe-west1.rep.googleapis.com/", "location": "europe-west1" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.europe-west10.rep.googleapis.com/", + "location": "europe-west10" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.europe-west12.rep.googleapis.com/", @@ -136,6 +176,11 @@ "endpointUrl": "https://secretmanager.northamerica-northeast2.rep.googleapis.com/", "location": "northamerica-northeast2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.southamerica-east1.rep.googleapis.com/", @@ -341,7 +386,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -1311,7 +1356,7 @@ } } }, - "revision": "20251004", + "revision": "20251105", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { diff --git a/secretmanager/v1/secretmanager-gen.go b/secretmanager/v1/secretmanager-gen.go index 4b3a59a4a70..673bd1e01fc 100644 --- a/secretmanager/v1/secretmanager-gen.go +++ b/secretmanager/v1/secretmanager-gen.go @@ -1526,9 +1526,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/secretmanager/v1beta2/secretmanager-api.json b/secretmanager/v1beta2/secretmanager-api.json index 9f6ada95bef..c7525e2a818 100644 --- a/secretmanager/v1beta2/secretmanager-api.json +++ b/secretmanager/v1beta2/secretmanager-api.json @@ -26,11 +26,31 @@ "endpointUrl": "https://secretmanager.africa-south1.rep.googleapis.com/", "location": "africa-south1" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.asia-northeast1.rep.googleapis.com/", "location": "asia-northeast1" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.asia-south1.rep.googleapis.com/", @@ -51,6 +71,11 @@ "endpointUrl": "https://secretmanager.asia-southeast2.rep.googleapis.com/", "location": "asia-southeast2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.asia-southeast3.rep.googleapis.com/", + "location": "asia-southeast3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.australia-southeast1.rep.googleapis.com/", @@ -66,16 +91,31 @@ "endpointUrl": "https://secretmanager.europe-central2.rep.googleapis.com/", "location": "europe-central2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.europe-north2.rep.googleapis.com/", "location": "europe-north2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.europe-west1.rep.googleapis.com/", "location": "europe-west1" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.europe-west10.rep.googleapis.com/", + "location": "europe-west10" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.europe-west12.rep.googleapis.com/", @@ -136,6 +176,11 @@ "endpointUrl": "https://secretmanager.northamerica-northeast2.rep.googleapis.com/", "location": "northamerica-northeast2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://secretmanager.northamerica-south1.rep.googleapis.com/", + "location": "northamerica-south1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://secretmanager.southamerica-east1.rep.googleapis.com/", @@ -341,7 +386,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -1311,7 +1356,7 @@ } } }, - "revision": "20251004", + "revision": "20251105", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { diff --git a/secretmanager/v1beta2/secretmanager-gen.go b/secretmanager/v1beta2/secretmanager-gen.go index 9b0aac850b4..f4bd879a9a3 100644 --- a/secretmanager/v1beta2/secretmanager-gen.go +++ b/secretmanager/v1beta2/secretmanager-gen.go @@ -1526,9 +1526,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index d6f0283f402..ac54b496eed 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -224,7 +224,7 @@ "type": "string" }, "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", "location": "query", "type": "boolean" } @@ -1034,7 +1034,7 @@ } } }, - "revision": "20251027", + "revision": "20251113", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -2774,7 +2774,7 @@ "type": "array" }, "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", "items": { "type": "string" }, diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index a437312cd4e..62b6ea39e48 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -2843,8 +2843,8 @@ type ListOperationsResponse struct { Operations []*Operation `json:"operations,omitempty"` // Unreachable: Unordered list. Unreachable resources. Populated when the // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. + // collections. For example, when attempting to list all resources across all + // supported locations. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -5512,9 +5512,9 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // When set to `true`, operations that are reachable are returned as normal, // and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and +// ListOperationsResponse.unreachable field. This can only be `true` when +// reading across collections. For example, when `parent` is set to +// "projects/example/locations/-". This field is not supported by default and // will result in an `UNIMPLEMENTED` error if set unless explicitly documented // otherwise in service or product specific documentation. func (c *OperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OperationsListCall { diff --git a/sheets/v4/sheets-api.json b/sheets/v4/sheets-api.json index eaa557ab3df..795b2ceb7ec 100644 --- a/sheets/v4/sheets-api.json +++ b/sheets/v4/sheets-api.json @@ -875,7 +875,7 @@ } } }, - "revision": "20250616", + "revision": "20251110", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -5377,7 +5377,7 @@ "id": "NumberFormat", "properties": { "pattern": { - "description": "Pattern string used for formatting. If not set, a default pattern based on the user's locale will be used if necessary for the given type. See the [Date and Number Formats guide](https://developers.google.com/workspace/sheets/api/guides/formats) for more information about the supported patterns.", + "description": "Pattern string used for formatting. If not set, a default pattern based on the spreadsheet's locale will be used if necessary for the given type. See the [Date and Number Formats guide](https://developers.google.com/workspace/sheets/api/guides/formats) for more information about the supported patterns.", "type": "string" }, "type": { diff --git a/sheets/v4/sheets-gen.go b/sheets/v4/sheets-gen.go index 7688830fb28..79a60cd8fbb 100644 --- a/sheets/v4/sheets-gen.go +++ b/sheets/v4/sheets-gen.go @@ -6357,8 +6357,8 @@ func (s NamedRange) MarshalJSON() ([]byte, error) { // NumberFormat: The number format of a cell. type NumberFormat struct { // Pattern: Pattern string used for formatting. If not set, a default pattern - // based on the user's locale will be used if necessary for the given type. See - // the Date and Number Formats guide + // based on the spreadsheet's locale will be used if necessary for the given + // type. See the Date and Number Formats guide // (https://developers.google.com/workspace/sheets/api/guides/formats) for more // information about the supported patterns. Pattern string `json:"pattern,omitempty"` diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 663feba5406..1960d9fbef9 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -503,6 +503,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -629,6 +634,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -1398,6 +1408,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -2328,6 +2343,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -3201,6 +3221,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -3327,6 +3352,11 @@ "description": "The standard list page token.", "location": "query", "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -3406,7 +3436,7 @@ } } }, - "revision": "20251014", + "revision": "20251031", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "AdaptMessageRequest": { @@ -3818,7 +3848,7 @@ "id": "BatchCreateSessionsRequest", "properties": { "sessionCount": { - "description": "Required. The number of sessions to be created in this batch call. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting session_count as necessary).", + "description": "Required. The number of sessions to be created in this batch call. At least one session is created. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting session_count as necessary).", "format": "int32", "type": "integer" }, @@ -5559,6 +5589,10 @@ "description": "An isolated set of Cloud Spanner resources that databases can define placements on.", "id": "InstancePartition", "properties": { + "autoscalingConfig": { + "$ref": "AutoscalingConfig", + "description": "Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, fields in compute_capacity are treated as OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance partition." + }, "config": { "description": "Required. The name of the instance partition's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.", "type": "string" @@ -6023,6 +6057,13 @@ "$ref": "Operation" }, "type": "array" + }, + "unreachable": { + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 6f3519fc95b..f81fee6b108 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -966,9 +966,10 @@ func (s BackupScheduleSpec) MarshalJSON() ([]byte, error) { // BatchCreateSessionsRequest: The request for BatchCreateSessions. type BatchCreateSessionsRequest struct { // SessionCount: Required. The number of sessions to be created in this batch - // call. The API can return fewer than the requested number of sessions. If a - // specific number of sessions are desired, the client can make additional - // calls to `BatchCreateSessions` (adjusting session_count as necessary). + // call. At least one session is created. The API can return fewer than the + // requested number of sessions. If a specific number of sessions are desired, + // the client can make additional calls to `BatchCreateSessions` (adjusting + // session_count as necessary). SessionCount int64 `json:"sessionCount,omitempty"` // SessionTemplate: Parameters to apply to each created session. SessionTemplate *Session `json:"sessionTemplate,omitempty"` @@ -3563,6 +3564,11 @@ func (s InstanceOperationProgress) MarshalJSON() ([]byte, error) { // InstancePartition: An isolated set of Cloud Spanner resources that databases // can define placements on. type InstancePartition struct { + // AutoscalingConfig: Optional. The autoscaling configuration. Autoscaling is + // enabled if this field is set. When autoscaling is enabled, fields in + // compute_capacity are treated as OUTPUT_ONLY fields and reflect the current + // compute capacity allocated to the instance partition. + AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"` // Config: Required. The name of the instance partition's configuration. Values // are of the form `projects//instanceConfigs/`. See also InstanceConfig and // ListInstanceConfigs. @@ -3629,15 +3635,15 @@ type InstancePartition struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Config") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AutoscalingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4222,6 +4228,11 @@ type ListOperationsResponse struct { // Operations: A list of operations that matches the specified filter in the // request. Operations []*Operation `json:"operations,omitempty"` + // Unreachable: Unordered list. Unreachable resources. Populated when the + // request sets `ListOperationsRequest.return_partial_success` and reads across + // collections e.g. when attempting to list all resources across all supported + // locations. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -8483,6 +8494,19 @@ func (c *ProjectsInstanceConfigsOperationsListCall) PageToken(pageToken string) return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsInstanceConfigsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsInstanceConfigsOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -8951,6 +8975,19 @@ func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) PageToken(pageToken return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsInstanceConfigsSsdCachesOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -11853,6 +11890,19 @@ func (c *ProjectsInstancesBackupsOperationsListCall) PageToken(pageToken string) return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsInstancesBackupsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsInstancesBackupsOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -15326,6 +15376,19 @@ func (c *ProjectsInstancesDatabasesOperationsListCall) PageToken(pageToken strin return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsInstancesDatabasesOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsInstancesDatabasesOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -18643,6 +18706,19 @@ func (c *ProjectsInstancesInstancePartitionsOperationsListCall) PageToken(pageTo return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsInstancesInstancePartitionsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsInstancesInstancePartitionsOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -19111,6 +19187,19 @@ func (c *ProjectsInstancesOperationsListCall) PageToken(pageToken string) *Proje return c } +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// When set to `true`, operations that are reachable are returned as normal, +// and those that are unreachable are returned in the +// [ListOperationsResponse.unreachable] field. This can only be `true` when +// reading across collections e.g. when `parent` is set to +// "projects/example/locations/-". This field is not by default supported and +// will result in an `UNIMPLEMENTED` error if set unless explicitly documented +// otherwise in service or product specific documentation. +func (c *ProjectsInstancesOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsInstancesOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 1f5d01937df..924f14fd6f3 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -785,6 +785,38 @@ }, "instances": { "methods": { + "ListEntraIdCertificates": { + "description": "Lists all versions of EntraID certificates for the specified instance. There can be up to three sets of certificates listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out.", + "flatPath": "v1/projects/{project}/instances/{instance}/listEntraIdCertificates", + "httpMethod": "GET", + "id": "sql.instances.ListEntraIdCertificates", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Required. Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Required. Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/listEntraIdCertificates", + "response": { + "$ref": "InstancesListEntraIdCertificatesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, "ListServerCertificates": { "description": "Lists all versions of server certificates and certificate authorities (CAs) for the specified instance. There can be up to three sets of certs listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out. For instances not using Certificate Authority Service (CAS) server CA, use ListServerCas instead.", "flatPath": "v1/projects/{project}/instances/{instance}/listServerCertificates", @@ -817,6 +849,41 @@ "https://www.googleapis.com/auth/sqlservice.admin" ] }, + "RotateEntraIdCertificate": { + "description": "Rotates the server certificate version to one previously added with the addEntraIdCertificate method.", + "flatPath": "v1/projects/{project}/instances/{instance}/rotateEntraIdCertificate", + "httpMethod": "POST", + "id": "sql.instances.RotateEntraIdCertificate", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Required. Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Required. Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/rotateEntraIdCertificate", + "request": { + "$ref": "InstancesRotateEntraIdCertificateRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, "RotateServerCertificate": { "description": "Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, use RotateServerCa instead.", "flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCertificate", @@ -2647,6 +2714,12 @@ "instance" ], "parameters": { + "databaseRoles": { + "description": "Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.", + "location": "query", + "repeated": true, + "type": "string" + }, "host": { "description": "Optional. Host of the user in the instance.", "location": "query", @@ -2685,7 +2758,7 @@ } } }, - "revision": "20251019", + "revision": "20251107", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -4562,7 +4635,7 @@ ], "enumDescriptions": [ "This is an unknown suspension reason.", - "The instance is suspended due to billing issues (for example:, GCP account issue)", + "The instance is suspended due to billing issues (for example:, account issue)", "The instance is suspended due to illegal content (for example:, child pornography, copyrighted material, etc.).", "The instance is causing operational issues (for example:, causing the database to crash).", "The KMS key used by the instance is either revoked or denied access to" @@ -5472,7 +5545,7 @@ "type": "object" }, "noRecovery": { - "description": "Whether or not the backup importing will restore database with NORECOVERY option Applies only to Cloud SQL for SQL Server.", + "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { @@ -5741,6 +5814,28 @@ }, "type": "object" }, + "InstancesListEntraIdCertificatesResponse": { + "description": "Instances ListEntraIdCertificates response.", + "id": "InstancesListEntraIdCertificatesResponse", + "properties": { + "activeVersion": { + "description": "The `sha1_fingerprint` of the active certificate from `certs`.", + "type": "string" + }, + "certs": { + "description": "List of Entra ID certificates for the instance.", + "items": { + "$ref": "SslCert" + }, + "type": "array" + }, + "kind": { + "description": "This is always `sql#instancesListEntraIdCertificates`.", + "type": "string" + } + }, + "type": "object" + }, "InstancesListResponse": { "description": "Database instances list response.", "id": "InstancesListResponse", @@ -5872,6 +5967,17 @@ }, "type": "object" }, + "InstancesRotateEntraIdCertificateRequest": { + "description": "Rotate Entra ID certificate request.", + "id": "InstancesRotateEntraIdCertificateRequest", + "properties": { + "rotateEntraIdCertificateContext": { + "$ref": "RotateEntraIdCertificateContext", + "description": "Optional. Contains details about the rotate server certificate operation." + } + }, + "type": "object" + }, "InstancesRotateServerCaRequest": { "description": "Rotate server CA request.", "id": "InstancesRotateServerCaRequest", @@ -5984,6 +6090,20 @@ "description": "Optional. The resource name of the server CA pool for an instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}", "type": "string" }, + "serverCertificateRotationMode": { + "description": "Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.", + "enum": [ + "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED", + "NO_AUTOMATIC_ROTATION", + "AUTOMATIC_ROTATION_DURING_MAINTENANCE" + ], + "enumDescriptions": [ + "Unspecified: no automatic server certificate rotation.", + "No automatic server certificate rotation. The user must [manage server certificate rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas) on their side.", + "Automatic server certificate rotation during Cloud SQL scheduled maintenance or self-service maintenance updates. Requires `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or `CUSTOMER_MANAGED_CAS_CA`." + ], + "type": "string" + }, "sslMode": { "description": "Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` has priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while `require_ssl=false` means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL connections.", "enum": [ @@ -6725,7 +6845,7 @@ "type": "object" }, "PointInTimeRestoreContext": { - "description": "The context to perform a point-in-time recovery of an instance managed by Google Cloud Backup and Disaster Recovery.", + "description": "The context to perform a point-in-time recovery of an instance managed by Backup and Disaster Recovery (DR) Service.", "id": "PointInTimeRestoreContext", "properties": { "allocatedIpRange": { @@ -6733,7 +6853,7 @@ "type": "string" }, "datasource": { - "description": "The Google Cloud Backup and Disaster Recovery Datasource URI. Format: projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.", + "description": "The Backup and Disaster Recovery (DR) Service Datasource URI. Format: projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.", "type": "string" }, "pointInTime": { @@ -7275,6 +7395,21 @@ }, "type": "object" }, + "RotateEntraIdCertificateContext": { + "description": "Instance rotate Entra ID certificate context.", + "id": "RotateEntraIdCertificateContext", + "properties": { + "kind": { + "description": "Optional. This is always `sql#rotateEntraIdCertificateContext`.", + "type": "string" + }, + "nextVersion": { + "description": "Optional. The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server certificate version.", + "type": "string" + } + }, + "type": "object" + }, "RotateServerCaContext": { "description": "Instance rotate server CA context.", "id": "RotateServerCaContext", @@ -7422,7 +7557,7 @@ "type": "boolean" }, "dataApiAccess": { - "description": "This parameter controls whether to allow using Data API to connect to the instance. Not allowed by default.", + "description": "This parameter controls whether to allow using ExecuteSql API to connect to the instance. Not allowed by default.", "enum": [ "DATA_API_ACCESS_UNSPECIFIED", "DISALLOW_DATA_API", @@ -7430,8 +7565,8 @@ ], "enumDescriptions": [ "Unspecified, effectively the same as `DISALLOW_DATA_API`.", - "Disallow using Data API to connect to the instance.", - "Allow using Data API to connect to the instance. For private IP instances, this will allow authorized users to access the instance from the public internet." + "Disallow using ExecuteSql API to connect to the instance.", + "Allow using ExecuteSql API to connect to the instance. For private IP instances, this allows authorized users to access the instance from the public internet using ExecuteSql API." ], "type": "string" }, @@ -7523,6 +7658,10 @@ "description": "Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances.", "type": "boolean" }, + "entraidConfig": { + "$ref": "SqlServerEntraIdConfig", + "description": "Optional. The Microsoft Entra ID configuration for the SQL Server instance." + }, "finalBackupConfig": { "$ref": "FinalBackupConfig", "description": "Optional. The final backup configuration for the instance." @@ -8181,6 +8320,26 @@ }, "type": "object" }, + "SqlServerEntraIdConfig": { + "description": "SQL Server Entra ID configuration.", + "id": "SqlServerEntraIdConfig", + "properties": { + "applicationId": { + "description": "Optional. The application ID for the Entra ID configuration.", + "type": "string" + }, + "kind": { + "description": "Output only. This is always sql#sqlServerEntraIdConfig", + "readOnly": true, + "type": "string" + }, + "tenantId": { + "description": "Optional. The tenant ID for the Entra ID configuration.", + "type": "string" + } + }, + "type": "object" + }, "SqlServerUserDetails": { "description": "Represents a Sql Server user on the Cloud SQL instance.", "id": "SqlServerUserDetails", @@ -8478,6 +8637,13 @@ "description": "A Cloud SQL user resource.", "id": "User", "properties": { + "databaseRoles": { + "description": "Optional. Role memberships of the user", + "items": { + "type": "string" + }, + "type": "array" + }, "dualPasswordType": { "description": "Dual password status for the user.", "enum": [ @@ -8555,7 +8721,8 @@ "CLOUD_IAM_SERVICE_ACCOUNT", "CLOUD_IAM_GROUP", "CLOUD_IAM_GROUP_USER", - "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" + "CLOUD_IAM_GROUP_SERVICE_ACCOUNT", + "ENTRAID_USER" ], "enumDescriptions": [ "The database's built-in user type.", @@ -8563,7 +8730,8 @@ "Cloud IAM service account.", "Cloud IAM group. Not used for login.", "Read-only. Login for a user that belongs to the Cloud IAM group.", - "Read-only. Login for a service account that belongs to the Cloud IAM group." + "Read-only. Login for a service account that belongs to the Cloud IAM group.", + "Microsoft Entra ID user." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 9428ac48df5..9f55c529979 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -1741,7 +1741,7 @@ type DatabaseInstance struct { // "SQL_SUSPENSION_REASON_UNSPECIFIED" - This is an unknown suspension // reason. // "BILLING_ISSUE" - The instance is suspended due to billing issues (for - // example:, GCP account issue) + // example:, account issue) // "LEGAL_ISSUE" - The instance is suspended due to illegal content (for // example:, child pornography, copyrighted material, etc.). // "OPERATIONAL_ISSUE" - The instance is causing operational issues (for @@ -2841,7 +2841,7 @@ type ImportContextBakImportOptions struct { BakType string `json:"bakType,omitempty"` EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"` // NoRecovery: Whether or not the backup importing will restore database with - // NORECOVERY option Applies only to Cloud SQL for SQL Server. + // NORECOVERY option. Applies only to Cloud SQL for SQL Server. NoRecovery bool `json:"noRecovery,omitempty"` // RecoveryOnly: Whether or not the backup importing request will just bring // database online without downloading Bak content only one of "no_recovery" @@ -3256,6 +3256,37 @@ func (s InstancesImportRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstancesListEntraIdCertificatesResponse: Instances ListEntraIdCertificates +// response. +type InstancesListEntraIdCertificatesResponse struct { + // ActiveVersion: The `sha1_fingerprint` of the active certificate from + // `certs`. + ActiveVersion string `json:"activeVersion,omitempty"` + // Certs: List of Entra ID certificates for the instance. + Certs []*SslCert `json:"certs,omitempty"` + // Kind: This is always `sql#instancesListEntraIdCertificates`. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ActiveVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstancesListEntraIdCertificatesResponse) MarshalJSON() ([]byte, error) { + type NoMethod InstancesListEntraIdCertificatesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InstancesListResponse: Database instances list response. type InstancesListResponse struct { // Items: List of database instance resources. @@ -3442,6 +3473,31 @@ func (s InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstancesRotateEntraIdCertificateRequest: Rotate Entra ID certificate +// request. +type InstancesRotateEntraIdCertificateRequest struct { + // RotateEntraIdCertificateContext: Optional. Contains details about the rotate + // server certificate operation. + RotateEntraIdCertificateContext *RotateEntraIdCertificateContext `json:"rotateEntraIdCertificateContext,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RotateEntraIdCertificateContext") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RotateEntraIdCertificateContext") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstancesRotateEntraIdCertificateRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstancesRotateEntraIdCertificateRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InstancesRotateServerCaRequest: Rotate server CA request. type InstancesRotateServerCaRequest struct { // RotateServerCaContext: Contains details about the rotate server CA @@ -3593,6 +3649,25 @@ type IpConfiguration struct { // instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: // projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID} ServerCaPool string `json:"serverCaPool,omitempty"` + // ServerCertificateRotationMode: Optional. Controls the automatic server + // certificate rotation feature. This feature is disabled by default. When + // enabled, the server certificate will be automatically rotated during Cloud + // SQL scheduled maintenance or self-service maintenance updates up to six + // months before it expires. This setting can only be set if server_ca_mode is + // either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA. + // + // Possible values: + // "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED" - Unspecified: no automatic + // server certificate rotation. + // "NO_AUTOMATIC_ROTATION" - No automatic server certificate rotation. The + // user must [manage server certificate + // rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas) + // on their side. + // "AUTOMATIC_ROTATION_DURING_MAINTENANCE" - Automatic server certificate + // rotation during Cloud SQL scheduled maintenance or self-service maintenance + // updates. Requires `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or + // `CUSTOMER_MANAGED_CAS_CA`. + ServerCertificateRotationMode string `json:"serverCertificateRotationMode,omitempty"` // SslMode: Specify how SSL/TLS is enforced in database connections. If you // must use the `require_ssl` flag for backward compatibility, then only the // following value pairs are valid: For PostgreSQL and MySQL: * @@ -4364,7 +4439,7 @@ func (s PerformDiskShrinkContext) MarshalJSON() ([]byte, error) { } // PointInTimeRestoreContext: The context to perform a point-in-time recovery -// of an instance managed by Google Cloud Backup and Disaster Recovery. +// of an instance managed by Backup and Disaster Recovery (DR) Service. type PointInTimeRestoreContext struct { // AllocatedIpRange: Optional. The name of the allocated IP range for the // internal IP Cloud SQL instance. For example: @@ -4374,7 +4449,7 @@ type PointInTimeRestoreContext struct { // Specifically, the name must be 1-63 characters long and match the regular // expression a-z ([-a-z0-9]*[a-z0-9])?. Reserved for future use. AllocatedIpRange string `json:"allocatedIpRange,omitempty"` - // Datasource: The Google Cloud Backup and Disaster Recovery Datasource URI. + // Datasource: The Backup and Disaster Recovery (DR) Service Datasource URI. // Format: // projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/ // {datasource}. @@ -4895,6 +4970,33 @@ func (s RestoreBackupContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RotateEntraIdCertificateContext: Instance rotate Entra ID certificate +// context. +type RotateEntraIdCertificateContext struct { + // Kind: Optional. This is always `sql#rotateEntraIdCertificateContext`. + Kind string `json:"kind,omitempty"` + // NextVersion: Optional. The fingerprint of the next version to be rotated to. + // If left unspecified, will be rotated to the most recently added server + // certificate version. + NextVersion string `json:"nextVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RotateEntraIdCertificateContext) MarshalJSON() ([]byte, error) { + type NoMethod RotateEntraIdCertificateContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RotateServerCaContext: Instance rotate server CA context. type RotateServerCaContext struct { // Kind: This is always `sql#rotateServerCaContext`. @@ -5059,16 +5161,17 @@ type Settings struct { // instances. Indicates whether database flags for crash-safe replication are // enabled. This property was only applicable to First Generation instances. CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"` - // DataApiAccess: This parameter controls whether to allow using Data API to - // connect to the instance. Not allowed by default. + // DataApiAccess: This parameter controls whether to allow using ExecuteSql API + // to connect to the instance. Not allowed by default. // // Possible values: // "DATA_API_ACCESS_UNSPECIFIED" - Unspecified, effectively the same as // `DISALLOW_DATA_API`. - // "DISALLOW_DATA_API" - Disallow using Data API to connect to the instance. - // "ALLOW_DATA_API" - Allow using Data API to connect to the instance. For - // private IP instances, this will allow authorized users to access the - // instance from the public internet. + // "DISALLOW_DATA_API" - Disallow using ExecuteSql API to connect to the + // instance. + // "ALLOW_DATA_API" - Allow using ExecuteSql API to connect to the instance. + // For private IP instances, this allows authorized users to access the + // instance from the public internet using ExecuteSql API. DataApiAccess string `json:"dataApiAccess,omitempty"` // DataCacheConfig: Configuration for data cache. DataCacheConfig *DataCacheConfig `json:"dataCacheConfig,omitempty"` @@ -5121,6 +5224,9 @@ type Settings struct { // predictions and insights to the AI. The default value is false. This applies // only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances. EnableGoogleMlIntegration bool `json:"enableGoogleMlIntegration,omitempty"` + // EntraidConfig: Optional. The Microsoft Entra ID configuration for the SQL + // Server instance. + EntraidConfig *SqlServerEntraIdConfig `json:"entraidConfig,omitempty"` // FinalBackupConfig: Optional. The final backup configuration for the // instance. FinalBackupConfig *FinalBackupConfig `json:"finalBackupConfig,omitempty"` @@ -5873,6 +5979,32 @@ func (s SqlServerDatabaseDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SqlServerEntraIdConfig: SQL Server Entra ID configuration. +type SqlServerEntraIdConfig struct { + // ApplicationId: Optional. The application ID for the Entra ID configuration. + ApplicationId string `json:"applicationId,omitempty"` + // Kind: Output only. This is always sql#sqlServerEntraIdConfig + Kind string `json:"kind,omitempty"` + // TenantId: Optional. The tenant ID for the Entra ID configuration. + TenantId string `json:"tenantId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicationId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApplicationId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SqlServerEntraIdConfig) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerEntraIdConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SqlServerUserDetails: Represents a Sql Server user on the Cloud SQL // instance. type SqlServerUserDetails struct { @@ -6298,6 +6430,8 @@ func (s TruncateLogContext) MarshalJSON() ([]byte, error) { // User: A Cloud SQL user resource. type User struct { + // DatabaseRoles: Optional. Role memberships of the user + DatabaseRoles []string `json:"databaseRoles,omitempty"` // DualPasswordType: Dual password status for the user. // // Possible values: @@ -6362,19 +6496,20 @@ type User struct { // Cloud IAM group. // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Read-only. Login for a service account // that belongs to the Cloud IAM group. + // "ENTRAID_USER" - Microsoft Entra ID user. Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DualPasswordType") to + // ForceSendFields is a list of field names (e.g. "DatabaseRoles") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DualPasswordType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "DatabaseRoles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -8569,6 +8704,124 @@ func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, er return ret, nil } +type InstancesListEntraIdCertificatesCall struct { + s *Service + project string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListEntraIdCertificates: Lists all versions of EntraID certificates for the +// specified instance. There can be up to three sets of certificates listed: +// the certificate that is currently in use, a future that has been added but +// not yet used to sign a certificate, and a certificate that has been rotated +// out. +// +// - instance: Cloud SQL instance ID. This does not include the project ID. +// - project: Project ID of the project that contains the instance. +func (r *InstancesService) ListEntraIdCertificates(project string, instance string) *InstancesListEntraIdCertificatesCall { + c := &InstancesListEntraIdCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstancesListEntraIdCertificatesCall) Fields(s ...googleapi.Field) *InstancesListEntraIdCertificatesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *InstancesListEntraIdCertificatesCall) IfNoneMatch(entityTag string) *InstancesListEntraIdCertificatesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstancesListEntraIdCertificatesCall) Context(ctx context.Context) *InstancesListEntraIdCertificatesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstancesListEntraIdCertificatesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesListEntraIdCertificatesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/listEntraIdCertificates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "instance": c.instance, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.ListEntraIdCertificates", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "sql.instances.ListEntraIdCertificates" call. +// Any non-2xx status code is an error. Response headers are in either +// *InstancesListEntraIdCertificatesResponse.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 *InstancesListEntraIdCertificatesCall) Do(opts ...googleapi.CallOption) (*InstancesListEntraIdCertificatesResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &InstancesListEntraIdCertificatesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.ListEntraIdCertificates", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type InstancesListServerCertificatesCall struct { s *Service project string @@ -8688,6 +8941,114 @@ func (c *InstancesListServerCertificatesCall) Do(opts ...googleapi.CallOption) ( return ret, nil } +type InstancesRotateEntraIdCertificateCall struct { + s *Service + project string + instance string + instancesrotateentraidcertificaterequest *InstancesRotateEntraIdCertificateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RotateEntraIdCertificate: Rotates the server certificate version to one +// previously added with the addEntraIdCertificate method. +// +// - instance: Cloud SQL instance ID. This does not include the project ID. +// - project: Project ID of the project that contains the instance. +func (r *InstancesService) RotateEntraIdCertificate(project string, instance string, instancesrotateentraidcertificaterequest *InstancesRotateEntraIdCertificateRequest) *InstancesRotateEntraIdCertificateCall { + c := &InstancesRotateEntraIdCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.instance = instance + c.instancesrotateentraidcertificaterequest = instancesrotateentraidcertificaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstancesRotateEntraIdCertificateCall) Fields(s ...googleapi.Field) *InstancesRotateEntraIdCertificateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstancesRotateEntraIdCertificateCall) Context(ctx context.Context) *InstancesRotateEntraIdCertificateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstancesRotateEntraIdCertificateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesRotateEntraIdCertificateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesrotateentraidcertificaterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rotateEntraIdCertificate") + 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{ + "project": c.project, + "instance": c.instance, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.RotateEntraIdCertificate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "sql.instances.RotateEntraIdCertificate" call. +// 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 *InstancesRotateEntraIdCertificateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.RotateEntraIdCertificate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type InstancesRotateServerCertificateCall struct { s *Service project string @@ -14421,6 +14782,14 @@ func (r *UsersService) Update(project string, instance string, user *User) *User return c } +// DatabaseRoles sets the optional parameter "databaseRoles": List of database +// roles to grant to the user. body.database_roles will be ignored for update +// request. +func (c *UsersUpdateCall) DatabaseRoles(databaseRoles ...string) *UsersUpdateCall { + c.urlParams_.SetMulti("databaseRoles", append([]string{}, databaseRoles...)) + return c +} + // Host sets the optional parameter "host": Host of the user in the instance. func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall { c.urlParams_.Set("host", host) diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 77001608133..4681efea60e 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -785,6 +785,38 @@ }, "instances": { "methods": { + "ListEntraIdCertificates": { + "description": "Lists all versions of EntraID certificates for the specified instance. There can be up to three sets of certificates listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out.", + "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/listEntraIdCertificates", + "httpMethod": "GET", + "id": "sql.instances.ListEntraIdCertificates", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Required. Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Required. Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sql/v1beta4/projects/{project}/instances/{instance}/listEntraIdCertificates", + "response": { + "$ref": "InstancesListEntraIdCertificatesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, "ListServerCertificates": { "description": "Lists all versions of server certificates and certificate authorities (CAs) for the specified instance. There can be up to three sets of certs listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out. For instances not using Certificate Authority Service (CAS) server CA, use ListServerCas instead.", "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/listServerCertificates", @@ -817,6 +849,41 @@ "https://www.googleapis.com/auth/sqlservice.admin" ] }, + "RotateEntraIdCertificate": { + "description": "Rotates the Entra Id certificate version to one previously added with the addEntraIdCertificate method.", + "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/rotateEntraIdCertificate", + "httpMethod": "POST", + "id": "sql.instances.RotateEntraIdCertificate", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Required. Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Required. Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sql/v1beta4/projects/{project}/instances/{instance}/rotateEntraIdCertificate", + "request": { + "$ref": "InstancesRotateEntraIdCertificateRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, "RotateServerCertificate": { "description": "Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, use RotateServerCa instead.", "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCertificate", @@ -887,6 +954,41 @@ "https://www.googleapis.com/auth/sqlservice.admin" ] }, + "addEntraIdCertificate": { + "description": "Adds a new Entra ID certificate for the specified instance. If an Entra ID certificate was previously added but never used in a certificate rotation, this operation replaces that version.", + "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/addEntraIdCertificate", + "httpMethod": "POST", + "id": "sql.instances.addEntraIdCertificate", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Required. Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Required. Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sql/v1beta4/projects/{project}/instances/{instance}/addEntraIdCertificate", + "request": { + "$ref": "SqlInstancesAddEntraIdCertificateRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, "addServerCa": { "description": "Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. For instances that have enabled Certificate Authority Service (CAS) based server CA, use AddServerCertificate to add a new server certificate.", "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/addServerCa", @@ -2647,6 +2749,12 @@ "instance" ], "parameters": { + "databaseRoles": { + "description": "Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.", + "location": "query", + "repeated": true, + "type": "string" + }, "host": { "description": "Optional. Host of the user in the instance.", "location": "query", @@ -2668,6 +2776,11 @@ "location": "path", "required": true, "type": "string" + }, + "revokeExistingRoles": { + "description": "Optional. revoke the existing roles granted to the user.", + "location": "query", + "type": "boolean" } }, "path": "sql/v1beta4/projects/{project}/instances/{instance}/users", @@ -2685,7 +2798,7 @@ } } }, - "revision": "20251023", + "revision": "20251107", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -4563,7 +4676,7 @@ ], "enumDescriptions": [ "This is an unknown suspension reason.", - "The instance is suspended due to billing issues (for example:, GCP account issue)", + "The instance is suspended due to billing issues (for example:, account issue)", "The instance is suspended due to illegal content (for example:, child pornography, copyrighted material, etc.).", "The instance is causing operational issues (for example:, causing the database to crash).", "The KMS key used by the instance is either revoked or denied access to" @@ -5473,7 +5586,7 @@ "type": "object" }, "noRecovery": { - "description": "Whether or not the backup importing will restore database with NORECOVERY option Applies only to Cloud SQL for SQL Server.", + "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { @@ -5742,6 +5855,28 @@ }, "type": "object" }, + "InstancesListEntraIdCertificatesResponse": { + "description": "Instances ListEntraIdCertificates response.", + "id": "InstancesListEntraIdCertificatesResponse", + "properties": { + "activeVersion": { + "description": "The `sha1_fingerprint` of the active certificate from `certs`.", + "type": "string" + }, + "certs": { + "description": "List of Entra ID certificates for the instance.", + "items": { + "$ref": "SslCert" + }, + "type": "array" + }, + "kind": { + "description": "This is always `sql#instancesListEntraIdCertificates`.", + "type": "string" + } + }, + "type": "object" + }, "InstancesListResponse": { "description": "Database instances list response.", "id": "InstancesListResponse", @@ -5873,6 +6008,17 @@ }, "type": "object" }, + "InstancesRotateEntraIdCertificateRequest": { + "description": "Rotate Entra ID Certificate request.", + "id": "InstancesRotateEntraIdCertificateRequest", + "properties": { + "rotateEntraIdCertificateContext": { + "$ref": "RotateEntraIdCertificateContext", + "description": "Optional. Contains details about the rotate Entra ID certificate operation." + } + }, + "type": "object" + }, "InstancesRotateServerCaRequest": { "description": "Rotate Server CA request.", "id": "InstancesRotateServerCaRequest", @@ -5985,6 +6131,20 @@ "description": "Optional. The resource name of the server CA pool for an instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}", "type": "string" }, + "serverCertificateRotationMode": { + "description": "Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.", + "enum": [ + "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED", + "NO_AUTOMATIC_ROTATION", + "AUTOMATIC_ROTATION_DURING_MAINTENANCE" + ], + "enumDescriptions": [ + "Unspecified: no automatic server certificate rotation.", + "No automatic server certificate rotation. The user must [manage server certificate rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas) on their side.", + "Automatic server certificate rotation during Cloud SQL scheduled maintenance or self-service maintenance updates. Requires `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or `CUSTOMER_MANAGED_CAS_CA`." + ], + "type": "string" + }, "sslMode": { "description": "Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` has priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while `require_ssl=false` means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL connections.", "enum": [ @@ -6726,7 +6886,7 @@ "type": "object" }, "PointInTimeRestoreContext": { - "description": "Context to perform a point-in-time restore of an instance managed by Google Cloud Backup and Disaster Recovery.", + "description": "Context to perform a point-in-time restore of an instance managed by Backup and Disaster Recovery (DR) Service.", "id": "PointInTimeRestoreContext", "properties": { "allocatedIpRange": { @@ -6734,7 +6894,7 @@ "type": "string" }, "datasource": { - "description": "The Google Cloud Backup and Disaster Recovery Datasource URI. Format: projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.", + "description": "The Backup and Disaster Recovery (DR) Service Datasource URI. Format: projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.", "type": "string" }, "pointInTime": { @@ -7276,6 +7436,21 @@ }, "type": "object" }, + "RotateEntraIdCertificateContext": { + "description": "Instance rotate Entra ID certificate context.", + "id": "RotateEntraIdCertificateContext", + "properties": { + "kind": { + "description": "Optional. This is always `sql#rotateEntraIdCertificateContext`.", + "type": "string" + }, + "nextVersion": { + "description": "Optional. The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added Entra ID certificate version.", + "type": "string" + } + }, + "type": "object" + }, "RotateServerCaContext": { "description": "Instance rotate server CA context.", "id": "RotateServerCaContext", @@ -7423,7 +7598,7 @@ "type": "boolean" }, "dataApiAccess": { - "description": "This parameter controls whether to allow using Data API to connect to the instance. Not allowed by default.", + "description": "This parameter controls whether to allow using ExecuteSql API to connect to the instance. Not allowed by default.", "enum": [ "DATA_API_ACCESS_UNSPECIFIED", "DISALLOW_DATA_API", @@ -7431,8 +7606,8 @@ ], "enumDescriptions": [ "Unspecified, effectively the same as `DISALLOW_DATA_API`.", - "Disallow using Data API to connect to the instance.", - "Allow using Data API to connect to the instance. For private IP instances, this will allow authorized users to access the instance from the public internet." + "Disallow using ExecuteSql API to connect to the instance.", + "Allow using ExecuteSql API to connect to the instance. For private IP instances, this allows authorized users to access the instance from the public internet using ExecuteSql API." ], "type": "string" }, @@ -7524,6 +7699,10 @@ "description": "Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances.", "type": "boolean" }, + "entraidConfig": { + "$ref": "SqlServerEntraIdConfig", + "description": "Optional. The Microsoft Entra ID configuration for the SQL Server instance." + }, "finalBackupConfig": { "$ref": "FinalBackupConfig", "description": "Optional. The final backup configuration for the instance." @@ -7834,6 +8013,12 @@ }, "type": "object" }, + "SqlInstancesAddEntraIdCertificateRequest": { + "description": "Request for AddEntraIdCertificate RPC.", + "id": "SqlInstancesAddEntraIdCertificateRequest", + "properties": {}, + "type": "object" + }, "SqlInstancesExecuteSqlResponse": { "description": "Execute SQL statements response.", "id": "SqlInstancesExecuteSqlResponse", @@ -8180,6 +8365,26 @@ }, "type": "object" }, + "SqlServerEntraIdConfig": { + "description": "SQL Server Entra ID configuration.", + "id": "SqlServerEntraIdConfig", + "properties": { + "applicationId": { + "description": "Optional. The application ID for the Entra ID configuration.", + "type": "string" + }, + "kind": { + "description": "Output only. This is always sql#sqlServerEntraIdConfig", + "readOnly": true, + "type": "string" + }, + "tenantId": { + "description": "Optional. The tenant ID for the Entra ID configuration.", + "type": "string" + } + }, + "type": "object" + }, "SqlServerUserDetails": { "description": "Represents a Sql Server user on the Cloud SQL instance.", "id": "SqlServerUserDetails", @@ -8477,6 +8682,13 @@ "description": "A Cloud SQL user resource.", "id": "User", "properties": { + "databaseRoles": { + "description": "Optional. Role memberships of the user", + "items": { + "type": "string" + }, + "type": "array" + }, "dualPasswordType": { "description": "Dual password status for the user.", "enum": [ @@ -8554,7 +8766,8 @@ "CLOUD_IAM_SERVICE_ACCOUNT", "CLOUD_IAM_GROUP", "CLOUD_IAM_GROUP_USER", - "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" + "CLOUD_IAM_GROUP_SERVICE_ACCOUNT", + "ENTRAID_USER" ], "enumDescriptions": [ "The database's built-in user type.", @@ -8562,7 +8775,8 @@ "Cloud IAM service account.", "Cloud IAM group. Not used for login.", "Read-only. Login for a user that belongs to the Cloud IAM group.", - "Read-only. Login for a service account that belongs to the Cloud IAM group." + "Read-only. Login for a service account that belongs to the Cloud IAM group.", + "Microsoft Entra ID user." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 9cd5ea80eb6..61f677c2d56 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -1743,7 +1743,7 @@ type DatabaseInstance struct { // "SQL_SUSPENSION_REASON_UNSPECIFIED" - This is an unknown suspension // reason. // "BILLING_ISSUE" - The instance is suspended due to billing issues (for - // example:, GCP account issue) + // example:, account issue) // "LEGAL_ISSUE" - The instance is suspended due to illegal content (for // example:, child pornography, copyrighted material, etc.). // "OPERATIONAL_ISSUE" - The instance is causing operational issues (for @@ -2845,7 +2845,7 @@ type ImportContextBakImportOptions struct { BakType string `json:"bakType,omitempty"` EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"` // NoRecovery: Whether or not the backup importing will restore database with - // NORECOVERY option Applies only to Cloud SQL for SQL Server. + // NORECOVERY option. Applies only to Cloud SQL for SQL Server. NoRecovery bool `json:"noRecovery,omitempty"` // RecoveryOnly: Whether or not the backup importing request will just bring // database online without downloading Bak content only one of "no_recovery" @@ -3263,6 +3263,37 @@ func (s InstancesImportRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstancesListEntraIdCertificatesResponse: Instances ListEntraIdCertificates +// response. +type InstancesListEntraIdCertificatesResponse struct { + // ActiveVersion: The `sha1_fingerprint` of the active certificate from + // `certs`. + ActiveVersion string `json:"activeVersion,omitempty"` + // Certs: List of Entra ID certificates for the instance. + Certs []*SslCert `json:"certs,omitempty"` + // Kind: This is always `sql#instancesListEntraIdCertificates`. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ActiveVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstancesListEntraIdCertificatesResponse) MarshalJSON() ([]byte, error) { + type NoMethod InstancesListEntraIdCertificatesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InstancesListResponse: Database instances list response. type InstancesListResponse struct { // Items: List of database instance resources. @@ -3449,6 +3480,31 @@ func (s InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstancesRotateEntraIdCertificateRequest: Rotate Entra ID Certificate +// request. +type InstancesRotateEntraIdCertificateRequest struct { + // RotateEntraIdCertificateContext: Optional. Contains details about the rotate + // Entra ID certificate operation. + RotateEntraIdCertificateContext *RotateEntraIdCertificateContext `json:"rotateEntraIdCertificateContext,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RotateEntraIdCertificateContext") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RotateEntraIdCertificateContext") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstancesRotateEntraIdCertificateRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstancesRotateEntraIdCertificateRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InstancesRotateServerCaRequest: Rotate Server CA request. type InstancesRotateServerCaRequest struct { // RotateServerCaContext: Contains details about the rotate server CA @@ -3600,6 +3656,25 @@ type IpConfiguration struct { // instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: // projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID} ServerCaPool string `json:"serverCaPool,omitempty"` + // ServerCertificateRotationMode: Optional. Controls the automatic server + // certificate rotation feature. This feature is disabled by default. When + // enabled, the server certificate will be automatically rotated during Cloud + // SQL scheduled maintenance or self-service maintenance updates up to six + // months before it expires. This setting can only be set if server_ca_mode is + // either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA. + // + // Possible values: + // "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED" - Unspecified: no automatic + // server certificate rotation. + // "NO_AUTOMATIC_ROTATION" - No automatic server certificate rotation. The + // user must [manage server certificate + // rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas) + // on their side. + // "AUTOMATIC_ROTATION_DURING_MAINTENANCE" - Automatic server certificate + // rotation during Cloud SQL scheduled maintenance or self-service maintenance + // updates. Requires `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or + // `CUSTOMER_MANAGED_CAS_CA`. + ServerCertificateRotationMode string `json:"serverCertificateRotationMode,omitempty"` // SslMode: Specify how SSL/TLS is enforced in database connections. If you // must use the `require_ssl` flag for backward compatibility, then only the // following value pairs are valid: For PostgreSQL and MySQL: * @@ -4372,7 +4447,7 @@ func (s PerformDiskShrinkContext) MarshalJSON() ([]byte, error) { } // PointInTimeRestoreContext: Context to perform a point-in-time restore of an -// instance managed by Google Cloud Backup and Disaster Recovery. +// instance managed by Backup and Disaster Recovery (DR) Service. type PointInTimeRestoreContext struct { // AllocatedIpRange: Optional. The name of the allocated IP range for the // internal IP Cloud SQL instance. For example: @@ -4382,7 +4457,7 @@ type PointInTimeRestoreContext struct { // Specifically, the name must be 1-63 characters long and match the regular // expression a-z ([-a-z0-9]*[a-z0-9])?. Reserved for future use. AllocatedIpRange string `json:"allocatedIpRange,omitempty"` - // Datasource: The Google Cloud Backup and Disaster Recovery Datasource URI. + // Datasource: The Backup and Disaster Recovery (DR) Service Datasource URI. // Format: // projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/ // {datasource}. @@ -4903,6 +4978,33 @@ func (s RestoreBackupContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RotateEntraIdCertificateContext: Instance rotate Entra ID certificate +// context. +type RotateEntraIdCertificateContext struct { + // Kind: Optional. This is always `sql#rotateEntraIdCertificateContext`. + Kind string `json:"kind,omitempty"` + // NextVersion: Optional. The fingerprint of the next version to be rotated to. + // If left unspecified, will be rotated to the most recently added Entra ID + // certificate version. + NextVersion string `json:"nextVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RotateEntraIdCertificateContext) MarshalJSON() ([]byte, error) { + type NoMethod RotateEntraIdCertificateContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RotateServerCaContext: Instance rotate server CA context. type RotateServerCaContext struct { // Kind: This is always `sql#rotateServerCaContext`. @@ -5067,16 +5169,17 @@ type Settings struct { // instances. Indicates whether database flags for crash-safe replication are // enabled. This property was only applicable to First Generation instances. CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"` - // DataApiAccess: This parameter controls whether to allow using Data API to - // connect to the instance. Not allowed by default. + // DataApiAccess: This parameter controls whether to allow using ExecuteSql API + // to connect to the instance. Not allowed by default. // // Possible values: // "DATA_API_ACCESS_UNSPECIFIED" - Unspecified, effectively the same as // `DISALLOW_DATA_API`. - // "DISALLOW_DATA_API" - Disallow using Data API to connect to the instance. - // "ALLOW_DATA_API" - Allow using Data API to connect to the instance. For - // private IP instances, this will allow authorized users to access the - // instance from the public internet. + // "DISALLOW_DATA_API" - Disallow using ExecuteSql API to connect to the + // instance. + // "ALLOW_DATA_API" - Allow using ExecuteSql API to connect to the instance. + // For private IP instances, this allows authorized users to access the + // instance from the public internet using ExecuteSql API. DataApiAccess string `json:"dataApiAccess,omitempty"` // DataCacheConfig: Configuration for data cache. DataCacheConfig *DataCacheConfig `json:"dataCacheConfig,omitempty"` @@ -5129,6 +5232,9 @@ type Settings struct { // predictions and insights to the AI. The default value is false. This applies // only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances. EnableGoogleMlIntegration bool `json:"enableGoogleMlIntegration,omitempty"` + // EntraidConfig: Optional. The Microsoft Entra ID configuration for the SQL + // Server instance. + EntraidConfig *SqlServerEntraIdConfig `json:"entraidConfig,omitempty"` // FinalBackupConfig: Optional. The final backup configuration for the // instance. FinalBackupConfig *FinalBackupConfig `json:"finalBackupConfig,omitempty"` @@ -5455,6 +5561,11 @@ func (s SqlInstancesAcquireSsrsLeaseResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SqlInstancesAddEntraIdCertificateRequest: Request for AddEntraIdCertificate +// RPC. +type SqlInstancesAddEntraIdCertificateRequest struct { +} + // SqlInstancesExecuteSqlResponse: Execute SQL statements response. type SqlInstancesExecuteSqlResponse struct { // Messages: A list of notices and warnings generated during query execution. @@ -5876,6 +5987,32 @@ func (s SqlServerDatabaseDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SqlServerEntraIdConfig: SQL Server Entra ID configuration. +type SqlServerEntraIdConfig struct { + // ApplicationId: Optional. The application ID for the Entra ID configuration. + ApplicationId string `json:"applicationId,omitempty"` + // Kind: Output only. This is always sql#sqlServerEntraIdConfig + Kind string `json:"kind,omitempty"` + // TenantId: Optional. The tenant ID for the Entra ID configuration. + TenantId string `json:"tenantId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicationId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApplicationId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SqlServerEntraIdConfig) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerEntraIdConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SqlServerUserDetails: Represents a Sql Server user on the Cloud SQL // instance. type SqlServerUserDetails struct { @@ -6301,6 +6438,8 @@ func (s TruncateLogContext) MarshalJSON() ([]byte, error) { // User: A Cloud SQL user resource. type User struct { + // DatabaseRoles: Optional. Role memberships of the user + DatabaseRoles []string `json:"databaseRoles,omitempty"` // DualPasswordType: Dual password status for the user. // // Possible values: @@ -6365,19 +6504,20 @@ type User struct { // Cloud IAM group. // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Read-only. Login for a service account // that belongs to the Cloud IAM group. + // "ENTRAID_USER" - Microsoft Entra ID user. Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DualPasswordType") to + // ForceSendFields is a list of field names (e.g. "DatabaseRoles") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DualPasswordType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "DatabaseRoles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -8572,6 +8712,124 @@ func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, er return ret, nil } +type InstancesListEntraIdCertificatesCall struct { + s *Service + project string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListEntraIdCertificates: Lists all versions of EntraID certificates for the +// specified instance. There can be up to three sets of certificates listed: +// the certificate that is currently in use, a future that has been added but +// not yet used to sign a certificate, and a certificate that has been rotated +// out. +// +// - instance: Cloud SQL instance ID. This does not include the project ID. +// - project: Project ID of the project that contains the instance. +func (r *InstancesService) ListEntraIdCertificates(project string, instance string) *InstancesListEntraIdCertificatesCall { + c := &InstancesListEntraIdCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstancesListEntraIdCertificatesCall) Fields(s ...googleapi.Field) *InstancesListEntraIdCertificatesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *InstancesListEntraIdCertificatesCall) IfNoneMatch(entityTag string) *InstancesListEntraIdCertificatesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstancesListEntraIdCertificatesCall) Context(ctx context.Context) *InstancesListEntraIdCertificatesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstancesListEntraIdCertificatesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesListEntraIdCertificatesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/listEntraIdCertificates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "instance": c.instance, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.ListEntraIdCertificates", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "sql.instances.ListEntraIdCertificates" call. +// Any non-2xx status code is an error. Response headers are in either +// *InstancesListEntraIdCertificatesResponse.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 *InstancesListEntraIdCertificatesCall) Do(opts ...googleapi.CallOption) (*InstancesListEntraIdCertificatesResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &InstancesListEntraIdCertificatesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.ListEntraIdCertificates", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type InstancesListServerCertificatesCall struct { s *Service project string @@ -8691,6 +8949,114 @@ func (c *InstancesListServerCertificatesCall) Do(opts ...googleapi.CallOption) ( return ret, nil } +type InstancesRotateEntraIdCertificateCall struct { + s *Service + project string + instance string + instancesrotateentraidcertificaterequest *InstancesRotateEntraIdCertificateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RotateEntraIdCertificate: Rotates the Entra Id certificate version to one +// previously added with the addEntraIdCertificate method. +// +// - instance: Cloud SQL instance ID. This does not include the project ID. +// - project: Project ID of the project that contains the instance. +func (r *InstancesService) RotateEntraIdCertificate(project string, instance string, instancesrotateentraidcertificaterequest *InstancesRotateEntraIdCertificateRequest) *InstancesRotateEntraIdCertificateCall { + c := &InstancesRotateEntraIdCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.instance = instance + c.instancesrotateentraidcertificaterequest = instancesrotateentraidcertificaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstancesRotateEntraIdCertificateCall) Fields(s ...googleapi.Field) *InstancesRotateEntraIdCertificateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstancesRotateEntraIdCertificateCall) Context(ctx context.Context) *InstancesRotateEntraIdCertificateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstancesRotateEntraIdCertificateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesRotateEntraIdCertificateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesrotateentraidcertificaterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/rotateEntraIdCertificate") + 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{ + "project": c.project, + "instance": c.instance, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.RotateEntraIdCertificate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "sql.instances.RotateEntraIdCertificate" call. +// 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 *InstancesRotateEntraIdCertificateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.RotateEntraIdCertificate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type InstancesRotateServerCertificateCall struct { s *Service project string @@ -8914,6 +9280,115 @@ func (c *InstancesAcquireSsrsLeaseCall) Do(opts ...googleapi.CallOption) (*SqlIn return ret, nil } +type InstancesAddEntraIdCertificateCall struct { + s *Service + project string + instance string + sqlinstancesaddentraidcertificaterequest *SqlInstancesAddEntraIdCertificateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddEntraIdCertificate: Adds a new Entra ID certificate for the specified +// instance. If an Entra ID certificate was previously added but never used in +// a certificate rotation, this operation replaces that version. +// +// - instance: Cloud SQL instance ID. This does not include the project ID. +// - project: Project ID of the project that contains the instance. +func (r *InstancesService) AddEntraIdCertificate(project string, instance string, sqlinstancesaddentraidcertificaterequest *SqlInstancesAddEntraIdCertificateRequest) *InstancesAddEntraIdCertificateCall { + c := &InstancesAddEntraIdCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.instance = instance + c.sqlinstancesaddentraidcertificaterequest = sqlinstancesaddentraidcertificaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstancesAddEntraIdCertificateCall) Fields(s ...googleapi.Field) *InstancesAddEntraIdCertificateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstancesAddEntraIdCertificateCall) Context(ctx context.Context) *InstancesAddEntraIdCertificateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstancesAddEntraIdCertificateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesAddEntraIdCertificateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sqlinstancesaddentraidcertificaterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/addEntraIdCertificate") + 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{ + "project": c.project, + "instance": c.instance, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.addEntraIdCertificate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "sql.instances.addEntraIdCertificate" call. +// 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 *InstancesAddEntraIdCertificateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.addEntraIdCertificate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type InstancesAddServerCaCall struct { s *Service project string @@ -14424,6 +14899,14 @@ func (r *UsersService) Update(project string, instance string, user *User) *User return c } +// DatabaseRoles sets the optional parameter "databaseRoles": List of database +// roles to grant to the user. body.database_roles will be ignored for update +// request. +func (c *UsersUpdateCall) DatabaseRoles(databaseRoles ...string) *UsersUpdateCall { + c.urlParams_.SetMulti("databaseRoles", append([]string{}, databaseRoles...)) + return c +} + // Host sets the optional parameter "host": Host of the user in the instance. func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall { c.urlParams_.Set("host", host) @@ -14436,6 +14919,13 @@ func (c *UsersUpdateCall) Name(name string) *UsersUpdateCall { return c } +// RevokeExistingRoles sets the optional parameter "revokeExistingRoles": +// revoke the existing roles granted to the user. +func (c *UsersUpdateCall) RevokeExistingRoles(revokeExistingRoles bool) *UsersUpdateCall { + c.urlParams_.Set("revokeExistingRoles", fmt.Sprint(revokeExistingRoles)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index 559c2d1183c..bbc2d6e3961 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -637,7 +637,7 @@ } } }, - "revision": "20251010", + "revision": "20251106", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -746,6 +746,10 @@ "description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.", "type": "string" }, + "privateNetworkService": { + "description": "Service Directory Service to be used as the endpoint for transfers from a custom VPC. Format: `projects/{project_id}/locations/{location}/namespaces/{namespace}/services/{service}`", + "type": "string" + }, "roleArn": { "description": "The Amazon Resource Name (ARN) of the role to support temporary credentials via `AssumeRoleWithWebIdentity`. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a `AssumeRoleWithWebIdentity` call for the provided role using the GoogleServiceAccount for this project.", "type": "string" @@ -777,6 +781,10 @@ "description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.", "type": "string" }, + "privateNetworkService": { + "description": "Service Directory Service to be used as the endpoint for transfers from a custom VPC. Format: `projects/{project_id}/locations/{location}/namespaces/{namespace}/services/{service}`", + "type": "string" + }, "storageAccount": { "description": "Required. The name of the Azure Storage account.", "type": "string" @@ -1336,6 +1344,10 @@ "format": "google-datetime", "type": "string" }, + "matchGlob": { + "description": "Optional. If specified, only objects matching this glob are transferred.", + "type": "string" + }, "maxTimeElapsedSinceLastModification": { "description": "Ensures that objects are not transferred if a specific maximum time has elapsed since the \"last modification time\". When a TransferOperation begins, objects with a \"last modification time\" are transferred only if the elapsed time between the start_time of the `TransferOperation`and the \"last modification time\" of the object is less than the value of max_time_elapsed_since_last_modification`. Objects that do not have a \"last modification time\" are also transferred.", "format": "google-duration", diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index 3c34a009a41..19c2e1a9a54 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -350,6 +350,11 @@ type AwsS3Data struct { // name that ends with a '/'. This field is treated as an object prefix. As // such, it should generally not begin with a '/'. Path string `json:"path,omitempty"` + // PrivateNetworkService: Service Directory Service to be used as the endpoint + // for transfers from a custom VPC. Format: + // `projects/{project_id}/locations/{location}/namespaces/{namespace}/services/{ + // service}` + PrivateNetworkService string `json:"privateNetworkService,omitempty"` // RoleArn: The Amazon Resource Name (ARN) of the role to support temporary // credentials via `AssumeRoleWithWebIdentity`. For more information about // ARNs, see IAM ARNs @@ -409,6 +414,11 @@ type AzureBlobStorageData struct { // name that ends with a '/'. This field is treated as an object prefix. As // such, it should generally not begin with a '/'. Path string `json:"path,omitempty"` + // PrivateNetworkService: Service Directory Service to be used as the endpoint + // for transfers from a custom VPC. Format: + // `projects/{project_id}/locations/{location}/namespaces/{namespace}/services/{ + // service}` + PrivateNetworkService string `json:"privateNetworkService,omitempty"` // StorageAccount: Required. The name of the Azure Storage account. StorageAccount string `json:"storageAccount,omitempty"` // ForceSendFields is a list of field names (e.g. "AzureCredentials") to @@ -1253,6 +1263,9 @@ type ObjectConditions struct { // `last_modified_since` to the start of the day * `last_modified_before` to // the end of the day LastModifiedSince string `json:"lastModifiedSince,omitempty"` + // MatchGlob: Optional. If specified, only objects matching this glob are + // transferred. + MatchGlob string `json:"matchGlob,omitempty"` // MaxTimeElapsedSinceLastModification: Ensures that objects are not // transferred if a specific maximum time has elapsed since the "last // modification time". When a TransferOperation begins, objects with a "last diff --git a/sts/v1/sts-api.json b/sts/v1/sts-api.json index a7d42b9ea61..8a6768b2197 100644 --- a/sts/v1/sts-api.json +++ b/sts/v1/sts-api.json @@ -338,7 +338,7 @@ } } }, - "revision": "20250827", + "revision": "20251107", "rootUrl": "https://sts.googleapis.com/", "schemas": { "GoogleIamV1Binding": { @@ -471,6 +471,10 @@ "$ref": "GoogleIdentityStsV1AccessBoundary", "description": "An access boundary that defines the upper bound of permissions the credential may have. The value should be a JSON object of AccessBoundary. The access boundary can include up to 10 rules. The size of the parameter value should not exceed 2048 characters." }, + "bindCertFingerprint": { + "description": "The unpadded, base64url-encoded SHA-256 hash of the certificate's DER encoding and it must be 43 characters long. The resulting token will be bound to this value.", + "type": "string" + }, "userProject": { "description": "A Google project used for quota and billing purposes when the credential is used to access Google APIs. The provided project overrides the project bound to the credential. The value must be a project number or a project ID. Example: `my-sample-project-191923`. The maximum length is 32 characters.", "type": "string" diff --git a/sts/v1/sts-gen.go b/sts/v1/sts-gen.go index 8489e92646f..8dfbc95ccae 100644 --- a/sts/v1/sts-gen.go +++ b/sts/v1/sts-gen.go @@ -530,6 +530,10 @@ type GoogleIdentityStsV1Options struct { // AccessBoundary. The access boundary can include up to 10 rules. The size of // the parameter value should not exceed 2048 characters. AccessBoundary *GoogleIdentityStsV1AccessBoundary `json:"accessBoundary,omitempty"` + // BindCertFingerprint: The unpadded, base64url-encoded SHA-256 hash of the + // certificate's DER encoding and it must be 43 characters long. The resulting + // token will be bound to this value. + BindCertFingerprint string `json:"bindCertFingerprint,omitempty"` // UserProject: A Google project used for quota and billing purposes when the // credential is used to access Google APIs. The provided project overrides the // project bound to the credential. The value must be a project number or a diff --git a/sts/v1beta/sts-api.json b/sts/v1beta/sts-api.json index 5258a3b8dbb..1a9d54ee6ac 100644 --- a/sts/v1beta/sts-api.json +++ b/sts/v1beta/sts-api.json @@ -338,7 +338,7 @@ } } }, - "revision": "20250521", + "revision": "20251107", "rootUrl": "https://sts.googleapis.com/", "schemas": { "GoogleIamV1Binding": { @@ -407,6 +407,10 @@ "$ref": "GoogleIdentityStsV1AccessBoundary", "description": "An access boundary that defines the upper bound of permissions the credential may have. The value should be a JSON object of AccessBoundary. The access boundary can include up to 10 rules. The size of the parameter value should not exceed 2048 characters." }, + "bindCertFingerprint": { + "description": "The unpadded, base64url-encoded SHA-256 hash of the certificate's DER encoding and it must be 43 characters long. The resulting token will be bound to this value.", + "type": "string" + }, "userProject": { "description": "A Google project used for quota and billing purposes when the credential is used to access Google APIs. The provided project overrides the project bound to the credential. The value must be a project number or a project ID. Example: `my-sample-project-191923`. The maximum length is 32 characters.", "type": "string" diff --git a/sts/v1beta/sts-gen.go b/sts/v1beta/sts-gen.go index e6c434242ed..b070a2a8008 100644 --- a/sts/v1beta/sts-gen.go +++ b/sts/v1beta/sts-gen.go @@ -334,6 +334,10 @@ type GoogleIdentityStsV1Options struct { // AccessBoundary. The access boundary can include up to 10 rules. The size of // the parameter value should not exceed 2048 characters. AccessBoundary *GoogleIdentityStsV1AccessBoundary `json:"accessBoundary,omitempty"` + // BindCertFingerprint: The unpadded, base64url-encoded SHA-256 hash of the + // certificate's DER encoding and it must be 43 characters long. The resulting + // token will be bound to this value. + BindCertFingerprint string `json:"bindCertFingerprint,omitempty"` // UserProject: A Google project used for quota and billing purposes when the // credential is used to access Google APIs. The provided project overrides the // project bound to the credential. The value must be a project number or a diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index 7e868959987..b3befe21c77 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -454,7 +454,7 @@ } } }, - "revision": "20251003", + "revision": "20251111", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -805,10 +805,15 @@ "ROBO_VERSION_1", "ROBO_VERSION_2" ], + "enumDeprecated": [ + false, + false, + true + ], "enumDescriptions": [ "This means that the server should choose the mode. Recommended.", "Runs Robo in UIAutomator-only mode without app resigning", - "Runs Robo in standard Espresso with UIAutomator fallback" + "Deprecated: Use ROBO_VERSION_1 instead for all use cases. Runs Robo in standard Espresso with UIAutomator fallback" ], "type": "string" }, diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index c920fb0a236..6fba14c6d62 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -550,8 +550,8 @@ type AndroidRoboTest struct { // mode. Recommended. // "ROBO_VERSION_1" - Runs Robo in UIAutomator-only mode without app // resigning - // "ROBO_VERSION_2" - Runs Robo in standard Espresso with UIAutomator - // fallback + // "ROBO_VERSION_2" - Deprecated: Use ROBO_VERSION_1 instead for all use + // cases. Runs Robo in standard Espresso with UIAutomator fallback RoboMode string `json:"roboMode,omitempty"` // RoboScript: A JSON file with a sequence of actions Robo should perform as a // prologue for the crawl. diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 24d6149ccb9..707841d109c 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -2548,7 +2548,7 @@ } } }, - "revision": "20251030", + "revision": "20251106", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -4163,7 +4163,15 @@ "DataDiskImageImport": { "description": "Used when the image import is not using OS adaptation process.", "id": "DataDiskImageImport", - "properties": {}, + "properties": { + "guestOsFeatures": { + "description": "Optional. A list of guest OS features to apply to the imported image. These features are flags that are used by Compute Engine to enable certain capabilities for virtual machine instances that are created from the image. This field does not change the OS of the image; it only marks the image with the specified features. The user must ensure that the OS is compatible with the features. For a list of available features, see https://cloud.google.com/compute/docs/images/create-custom#guest-os-features.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "DatacenterConnector": { diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 2e056cead40..45b87001ab8 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -1763,6 +1763,30 @@ func (s CycleStep) MarshalJSON() ([]byte, error) { // DataDiskImageImport: Used when the image import is not using OS adaptation // process. type DataDiskImageImport struct { + // GuestOsFeatures: Optional. A list of guest OS features to apply to the + // imported image. These features are flags that are used by Compute Engine to + // enable certain capabilities for virtual machine instances that are created + // from the image. This field does not change the OS of the image; it only + // marks the image with the specified features. The user must ensure that the + // OS is compatible with the features. For a list of available features, see + // https://cloud.google.com/compute/docs/images/create-custom#guest-os-features. + GuestOsFeatures []string `json:"guestOsFeatures,omitempty"` + // ForceSendFields is a list of field names (e.g. "GuestOsFeatures") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GuestOsFeatures") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DataDiskImageImport) MarshalJSON() ([]byte, error) { + type NoMethod DataDiskImageImport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // DatacenterConnector: DatacenterConnector message describes a connector diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index beb38cec314..27acdf578f4 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -2548,7 +2548,7 @@ } } }, - "revision": "20251030", + "revision": "20251106", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -4198,7 +4198,15 @@ "DataDiskImageImport": { "description": "Used when the image import is not using OS adaptation process.", "id": "DataDiskImageImport", - "properties": {}, + "properties": { + "guestOsFeatures": { + "description": "Optional. A list of guest OS features to apply to the imported image. These features are flags that are used by Compute Engine to enable certain capabilities for virtual machine instances that are created from the image. This field does not change the OS of the image; it only marks the image with the specified features. The user must ensure that the OS is compatible with the features. For a list of available features, see https://cloud.google.com/compute/docs/images/create-custom#guest-os-features.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "DatacenterConnector": { diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 06e9a37300f..d6130ea8196 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -1779,6 +1779,30 @@ func (s CycleStep) MarshalJSON() ([]byte, error) { // DataDiskImageImport: Used when the image import is not using OS adaptation // process. type DataDiskImageImport struct { + // GuestOsFeatures: Optional. A list of guest OS features to apply to the + // imported image. These features are flags that are used by Compute Engine to + // enable certain capabilities for virtual machine instances that are created + // from the image. This field does not change the OS of the image; it only + // marks the image with the specified features. The user must ensure that the + // OS is compatible with the features. For a list of available features, see + // https://cloud.google.com/compute/docs/images/create-custom#guest-os-features. + GuestOsFeatures []string `json:"guestOsFeatures,omitempty"` + // ForceSendFields is a list of field names (e.g. "GuestOsFeatures") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GuestOsFeatures") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DataDiskImageImport) MarshalJSON() ([]byte, error) { + type NoMethod DataDiskImageImport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // DatacenterConnector: DatacenterConnector message describes a connector