From 51ff8a4794fbc56944a6db1edd0f06e30990392f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 Jun 2024 00:22:19 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2636) --- accessapproval/v1/accessapproval-api.json | 18 +- accessapproval/v1/accessapproval-gen.go | 13 + admin/directory/v1/admin-api.json | 8 +- admin/directory/v1/admin-gen.go | 6 +- aiplatform/v1/aiplatform-api.json | 8 +- aiplatform/v1/aiplatform-gen.go | 5 +- aiplatform/v1beta1/aiplatform-api.json | 177 +- aiplatform/v1beta1/aiplatform-gen.go | 394 +- airquality/v1/airquality-api.json | 875 +++ airquality/v1/airquality-gen.go | 1602 +++++ alloydb/v1/alloydb-api.json | 120 +- alloydb/v1/alloydb-gen.go | 123 +- alloydb/v1alpha/alloydb-api.json | 120 +- alloydb/v1alpha/alloydb-gen.go | 123 +- alloydb/v1beta/alloydb-api.json | 120 +- alloydb/v1beta/alloydb-gen.go | 123 +- .../v1/androidmanagement-api.json | 12 +- androidmanagement/v1/androidmanagement-gen.go | 29 +- androidpublisher/v3/androidpublisher-api.json | 4 +- androidpublisher/v3/androidpublisher-gen.go | 2 +- api-list.json | 60 + apigee/v1/apigee-api.json | 4 +- apigee/v1/apigee-gen.go | 3 +- apim/v1alpha/apim-api.json | 1481 +++++ apim/v1alpha/apim-gen.go | 3419 +++++++++++ artifactregistry/v1/artifactregistry-api.json | 9 +- artifactregistry/v1/artifactregistry-gen.go | 2 + .../v1beta2/artifactregistry-api.json | 9 +- .../v1beta2/artifactregistry-gen.go | 2 + .../v1/authorizedbuyersmarketplace-api.json | 6 +- .../v1/authorizedbuyersmarketplace-gen.go | 4 +- bigquery/v2/bigquery-api.json | 65 +- bigquery/v2/bigquery-gen.go | 88 +- .../v1/bigqueryconnection-api.json | 11 +- .../v1/bigqueryconnection-gen.go | 14 +- chat/v1/chat-api.json | 38 +- chat/v1/chat-gen.go | 32 +- civicinfo/v2/civicinfo-api.json | 7 +- civicinfo/v2/civicinfo-gen.go | 10 +- cloudasset/v1/cloudasset-api.json | 14 +- cloudasset/v1/cloudasset-gen.go | 14 +- cloudasset/v1beta1/cloudasset-api.json | 10 +- cloudasset/v1beta1/cloudasset-gen.go | 8 +- cloudasset/v1p1beta1/cloudasset-api.json | 10 +- cloudasset/v1p1beta1/cloudasset-gen.go | 8 +- cloudasset/v1p5beta1/cloudasset-api.json | 10 +- cloudasset/v1p5beta1/cloudasset-gen.go | 8 +- cloudasset/v1p7beta1/cloudasset-api.json | 10 +- cloudasset/v1p7beta1/cloudasset-gen.go | 8 +- cloudbuild/v1/cloudbuild-api.json | 24 +- cloudbuild/v1/cloudbuild-gen.go | 25 +- cloudbuild/v2/cloudbuild-api.json | 16 +- cloudbuild/v2/cloudbuild-gen.go | 10 + .../v1/cloudcommerceprocurement-api.json | 86 +- .../v1/cloudcommerceprocurement-gen.go | 1822 ++---- clouddeploy/v1/clouddeploy-api.json | 133 +- clouddeploy/v1/clouddeploy-gen.go | 131 +- cloudidentity/v1/cloudidentity-api.json | 29 +- cloudidentity/v1/cloudidentity-gen.go | 81 +- cloudidentity/v1beta1/cloudidentity-api.json | 29 +- cloudidentity/v1beta1/cloudidentity-gen.go | 81 +- compute/v0.alpha/compute-api.json | 641 +- compute/v0.alpha/compute-gen.go | 440 +- compute/v0.alpha/compute2-gen.go | 2072 +++---- compute/v0.alpha/compute3-gen.go | 933 +++ compute/v1/compute-api.json | 56 +- compute/v1/compute-gen.go | 64 +- connectors/v1/connectors-api.json | 57 +- connectors/v1/connectors-gen.go | 60 + connectors/v2/connectors-api.json | 163 +- connectors/v2/connectors-gen.go | 259 +- .../v1alpha1/contactcenteraiplatform-api.json | 44 +- .../v1alpha1/contactcenteraiplatform-gen.go | 63 +- .../v1/contactcenterinsights-api.json | 810 +-- .../v1/contactcenterinsights-gen.go | 1250 +--- content/v2.1/content-api.json | 4 +- content/v2.1/content-gen.go | 8 +- dataflow/v1b3/dataflow-api.json | 53 +- dataflow/v1b3/dataflow-gen.go | 9 +- dataplex/v1/dataplex-api.json | 21 +- dataplex/v1/dataplex-gen.go | 40 +- dataproc/v1/dataproc-api.json | 44 +- dataproc/v1/dataproc-gen.go | 39 +- datastream/v1/datastream-api.json | 10 +- datastream/v1/datastream-gen.go | 5 + dialogflow/v2beta1/dialogflow-api.json | 468 +- dialogflow/v2beta1/dialogflow-gen.go | 792 ++- dialogflow/v3beta1/dialogflow-api.json | 2015 ++++++- dialogflow/v3beta1/dialogflow-gen.go | 5194 ++++++++++++++--- discoveryengine/v1/discoveryengine-api.json | 204 +- discoveryengine/v1/discoveryengine-gen.go | 357 +- .../v1alpha/discoveryengine-api.json | 517 +- .../v1alpha/discoveryengine-gen.go | 998 ++++ .../v1beta/discoveryengine-api.json | 204 +- discoveryengine/v1beta/discoveryengine-gen.go | 357 +- dns/v1/dns-api.json | 129 +- dns/v1/dns-gen.go | 395 +- dns/v1beta2/dns-api.json | 129 +- dns/v1beta2/dns-gen.go | 395 +- domains/v1/domains-api.json | 231 +- domains/v1/domains-gen.go | 545 +- domains/v1alpha2/domains-api.json | 231 +- domains/v1alpha2/domains-gen.go | 545 +- domains/v1beta1/domains-api.json | 231 +- domains/v1beta1/domains-gen.go | 545 +- fcmdata/v1beta1/fcmdata-api.json | 4 +- fcmdata/v1beta1/fcmdata-gen.go | 6 +- .../v1/firebaseappdistribution-api.json | 4 +- .../v1/firebaseappdistribution-gen.go | 2 +- firebaseml/v2beta/firebaseml-api.json | 442 +- firebaseml/v2beta/firebaseml-gen.go | 760 +-- looker/v1/looker-api.json | 4 +- looker/v1/looker-gen.go | 2 +- .../v1/managedidentities-api.json | 8 +- managedidentities/v1/managedidentities-gen.go | 17 +- .../v1alpha1/managedidentities-api.json | 6 +- .../v1alpha1/managedidentities-gen.go | 9 +- .../v1beta1/managedidentities-api.json | 6 +- .../v1beta1/managedidentities-gen.go | 9 +- memcache/v1/memcache-api.json | 12 +- memcache/v1/memcache-gen.go | 4 + memcache/v1beta2/memcache-api.json | 12 +- memcache/v1beta2/memcache-gen.go | 4 + monitoring/v3/monitoring-api.json | 6 +- monitoring/v3/monitoring-gen.go | 4 +- .../v1/networkconnectivity-api.json | 9 +- .../v1/networkconnectivity-gen.go | 3 + notebooks/v2/notebooks-api.json | 30 +- notebooks/v2/notebooks-gen.go | 44 +- osconfig/v1/osconfig-api.json | 6 +- osconfig/v1/osconfig-gen.go | 7 +- osconfig/v1alpha/osconfig-api.json | 6 +- osconfig/v1alpha/osconfig-gen.go | 7 +- pollen/v1/pollen-api.json | 562 ++ pollen/v1/pollen-gen.go | 925 +++ privateca/v1/privateca-api.json | 10 +- privateca/v1/privateca-gen.go | 18 +- retail/v2/retail-api.json | 104 +- retail/v2/retail-gen.go | 129 +- retail/v2alpha/retail-api.json | 110 +- retail/v2alpha/retail-gen.go | 138 +- retail/v2beta/retail-api.json | 104 +- retail/v2beta/retail-gen.go | 129 +- run/v2/run-api.json | 4 +- run/v2/run-gen.go | 3 +- servicecontrol/v1/servicecontrol-api.json | 6 +- servicecontrol/v1/servicecontrol-gen.go | 15 +- servicecontrol/v2/servicecontrol-api.json | 6 +- servicecontrol/v2/servicecontrol-gen.go | 15 +- .../v1/servicemanagement-api.json | 4 +- servicemanagement/v1/servicemanagement-gen.go | 124 +- tagmanager/v2/tagmanager-api.json | 4 +- tagmanager/v2/tagmanager-gen.go | 3 +- tpu/v2/tpu-api.json | 4 +- tpu/v2/tpu-gen.go | 1 + tpu/v2alpha1/tpu-api.json | 4 +- tpu/v2alpha1/tpu-gen.go | 1 + vmmigration/v1/vmmigration-api.json | 79 +- vmmigration/v1/vmmigration-gen.go | 65 +- vmmigration/v1alpha1/vmmigration-api.json | 79 +- vmmigration/v1alpha1/vmmigration-gen.go | 65 +- vmwareengine/v1/vmwareengine-api.json | 14 +- vmwareengine/v1/vmwareengine-gen.go | 3 + walletobjects/v1/walletobjects-api.json | 4 +- walletobjects/v1/walletobjects-gen.go | 2 +- .../v1/workflowexecutions-api.json | 2 +- .../v1/workflowexecutions-gen.go | 5 +- 167 files changed, 28763 insertions(+), 8751 deletions(-) create mode 100644 airquality/v1/airquality-api.json create mode 100644 airquality/v1/airquality-gen.go create mode 100644 apim/v1alpha/apim-api.json create mode 100644 apim/v1alpha/apim-gen.go create mode 100644 pollen/v1/pollen-api.json create mode 100644 pollen/v1/pollen-gen.go diff --git a/accessapproval/v1/accessapproval-api.json b/accessapproval/v1/accessapproval-api.json index e225a79f1d6..5736aa95ff0 100644 --- a/accessapproval/v1/accessapproval-api.json +++ b/accessapproval/v1/accessapproval-api.json @@ -913,7 +913,7 @@ } } }, - "revision": "20240503", + "revision": "20240607", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalServiceAccount": { @@ -985,6 +985,22 @@ "format": "int32", "type": "integer" }, + "requestScopeMaxWidthPreference": { + "description": "Optional. A setting to indicate the maximum width of an Access Approval request.", + "enum": [ + "REQUEST_SCOPE_MAX_WIDTH_PREFERENCE_UNSPECIFIED", + "ORGANIZATION", + "FOLDER", + "PROJECT" + ], + "enumDescriptions": [ + "Default value for proto, shouldn't be used.", + "This is the widest scope possible. It means the customer has no scope restriction when it comes to Access Approval requests.", + "Customer allows the scope of Access Approval requests as broad as the Folder level.", + "Customer allows the scope of Access Approval requests as broad as the Project level." + ], + "type": "string" + }, "requireCustomerVisibleJustification": { "description": "Optional. A setting to require approval request justifications to be customer visible.", "type": "boolean" diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index fabf3198508..de340dc5138 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -313,6 +313,19 @@ type AccessApprovalSettings struct { // personnel, but can be overridden if said personnel deems necessary. The // approver ultimately can set the expiration at approval time. PreferredRequestExpirationDays int64 `json:"preferredRequestExpirationDays,omitempty"` + // RequestScopeMaxWidthPreference: Optional. A setting to indicate the maximum + // width of an Access Approval request. + // + // Possible values: + // "REQUEST_SCOPE_MAX_WIDTH_PREFERENCE_UNSPECIFIED" - Default value for + // proto, shouldn't be used. + // "ORGANIZATION" - This is the widest scope possible. It means the customer + // has no scope restriction when it comes to Access Approval requests. + // "FOLDER" - Customer allows the scope of Access Approval requests as broad + // as the Folder level. + // "PROJECT" - Customer allows the scope of Access Approval requests as broad + // as the Project level. + RequestScopeMaxWidthPreference string `json:"requestScopeMaxWidthPreference,omitempty"` // RequireCustomerVisibleJustification: Optional. A setting to require approval // request justifications to be customer visible. RequireCustomerVisibleJustification bool `json:"requireCustomerVisibleJustification,omitempty"` diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index d9f70e99465..a5237922f5a 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -403,7 +403,7 @@ }, "maxResults": { "default": "100", - "description": "Maximum number of results to return, value should not exceed 300.", + "description": "Maximum number of results to return. Value should not exceed 300.", "format": "int32", "location": "query", "minimum": "1", @@ -3967,12 +3967,12 @@ "type": "string" }, "customer": { - "description": "The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.", + "description": "The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all users for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.", "location": "query", "type": "string" }, "domain": { - "description": "The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the `customer` query parameter instead. Either the `customer` or the `domain` parameter must be provided.", + "description": "The domain name. Use this field to get users from only one domain. To return all domains for a customer account, use the `customer` query parameter instead. Either the `customer` or the `domain` parameter must be provided.", "location": "query", "type": "string" }, @@ -4671,7 +4671,7 @@ } } }, - "revision": "20240509", + "revision": "20240611", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 38b77ab0f90..554644e3e82 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -5960,7 +5960,7 @@ func (c *ChromeosdevicesListCall) IncludeChildOrgunits(includeChildOrgunits bool } // MaxResults sets the optional parameter "maxResults": Maximum number of -// results to return, value should not exceed 300. +// results to return. Value should not exceed 300. func (c *ChromeosdevicesListCall) MaxResults(maxResults int64) *ChromeosdevicesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -17330,7 +17330,7 @@ func (c *UsersListCall) CustomFieldMask(customFieldMask string) *UsersListCall { // Customer sets the optional parameter "customer": The unique ID for the // customer's Google Workspace account. In case of a multi-domain account, to -// fetch all groups for a customer, use this field instead of `domain`. You can +// fetch all users for a customer, use this field instead of `domain`. You can // also use the `my_customer` alias to represent your account's `customerId`. // The `customerId` is also returned as part of the Users // (/admin-sdk/directory/v1/reference/users) resource. You must provide either @@ -17341,7 +17341,7 @@ func (c *UsersListCall) Customer(customer string) *UsersListCall { } // Domain sets the optional parameter "domain": The domain name. Use this field -// to get groups from only one domain. To return all domains for a customer +// to get users from only one domain. To return all domains for a customer // account, use the `customer` query parameter instead. Either the `customer` // or the `domain` parameter must be provided. func (c *UsersListCall) Domain(domain string) *UsersListCall { diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 87605d3d5a3..a4811e9c70b 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -16287,7 +16287,7 @@ } } }, - "revision": "20240529", + "revision": "20240609", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -26463,7 +26463,7 @@ "Error parsing sparse dimensions field.", "Token restrict value is invalid.", "Invalid sparse embedding.", - "Invalid embedding." + "Invalid dense embedding." ], "type": "string" }, @@ -27847,10 +27847,6 @@ "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, - "fineTune": { - "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences", - "description": "Optional. Fine tune the PublisherModel with the third-party model tuning UI." - }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index d993a28d0cd..6f11f3efd54 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -16014,7 +16014,7 @@ type GoogleCloudAiplatformV1NearestNeighborSearchOperationMetadataRecordError st // "INVALID_SPARSE_DIMENSIONS" - Error parsing sparse dimensions field. // "INVALID_TOKEN_VALUE" - Token restrict value is invalid. // "INVALID_SPARSE_EMBEDDING" - Invalid sparse embedding. - // "INVALID_EMBEDDING" - Invalid embedding. + // "INVALID_EMBEDDING" - Invalid dense embedding. ErrorType string `json:"errorType,omitempty"` // RawRecord: The original content of this record. RawRecord string `json:"rawRecord,omitempty"` @@ -17658,9 +17658,6 @@ type GoogleCloudAiplatformV1PublisherModelCallToAction struct { Deploy *GoogleCloudAiplatformV1PublisherModelCallToActionDeploy `json:"deploy,omitempty"` // DeployGke: Optional. Deploy PublisherModel to Google Kubernetes Engine. DeployGke *GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` - // FineTune: Optional. Fine tune the PublisherModel with the third-party model - // tuning UI. - FineTune *GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences `json:"fineTune,omitempty"` // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 067713c02ac..c674703e5ae 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -1048,7 +1048,7 @@ }, "path": "v1beta1/{+name}", "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleProtobufEmpty" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -4327,6 +4327,35 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ] }, + "streamRawPredict": { + "description": "Perform a streaming online prediction with an arbitrary HTTP payload.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:streamRawPredict", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.streamRawPredict", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "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/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:streamRawPredict", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1StreamRawPredictRequest" + }, + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:testIamPermissions", @@ -15331,6 +15360,35 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ] + }, + "streamRawPredict": { + "description": "Perform a streaming online prediction with an arbitrary HTTP payload.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:streamRawPredict", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.publishers.models.streamRawPredict", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "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/[^/]+/publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:streamRawPredict", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1StreamRawPredictRequest" + }, + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] } } } @@ -19896,7 +19954,7 @@ } } }, - "revision": "20240529", + "revision": "20240609", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -27958,6 +28016,11 @@ "$ref": "GoogleCloudAiplatformV1beta1GoogleDriveSource", "description": "Google Drive location. Supports importing individual files as well as Google Drive folders." }, + "maxEmbeddingRequestsPerMin": { + "description": "Optional. The max number of queries per minute that this job is allowed to make to the embedding model specified on the corpus. This value is specific to this job and not shared across other import jobs. Consult the Quotas page on the project to set an appropriate value here. If unspecified, a default value of 1,000 QPM would be used.", + "format": "int32", + "type": "integer" + }, "ragFileChunkingConfig": { "$ref": "GoogleCloudAiplatformV1beta1RagFileChunkingConfig", "description": "Specifies the size and overlap of chunks after importing RagFiles." @@ -31025,28 +31088,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats": { - "description": "A collection of data points that describes the time-varying values of a gen ai metric.", - "id": "GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats", - "properties": { - "dataPoints": { - "description": "The data points of this time series. When listing time series, points are returned in reverse time order.", - "items": { - "$ref": "GoogleCloudAiplatformV1beta1ModelMonitoringStatsDataPoint" - }, - "type": "array" - }, - "objectiveType": { - "description": "One of the supported monitoring objectives: `gen-ai-general` `gen-ai-evaluation` `gen-ai-safety`", - "type": "string" - }, - "statsName": { - "description": "The stats name.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1ModelMonitoringInput": { "description": "Model monitoring data input spec.", "id": "GoogleCloudAiplatformV1beta1ModelMonitoringInput", @@ -31691,10 +31732,6 @@ "description": "Represents the collection of statistics for a metric.", "id": "GoogleCloudAiplatformV1beta1ModelMonitoringStats", "properties": { - "genAiStats": { - "$ref": "GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats", - "description": "Generated gen ai statistics." - }, "tabularStats": { "$ref": "GoogleCloudAiplatformV1beta1ModelMonitoringTabularStats", "description": "Generated tabular statistics." @@ -32511,7 +32548,7 @@ "Error parsing sparse dimensions field.", "Token restrict value is invalid.", "Invalid sparse embedding.", - "Invalid embedding." + "Invalid dense embedding." ], "type": "string" }, @@ -34242,10 +34279,6 @@ "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, - "fineTune": { - "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences", - "description": "Optional. Fine tune the PublisherModel with the third-party model tuning UI." - }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." @@ -35115,6 +35148,10 @@ "readOnly": true, "type": "string" }, + "ragEmbeddingModelConfig": { + "$ref": "GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig", + "description": "Optional. Immutable. The embedding model config of the RagCorpus." + }, "updateTime": { "description": "Output only. Timestamp when this RagCorpus was last updated.", "format": "google-datetime", @@ -35124,6 +35161,38 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig": { + "description": "Config for the embedding model to use for RAG.", + "id": "GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig", + "properties": { + "vertexPredictionEndpoint": { + "$ref": "GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint", + "description": "The Vertex AI Prediction Endpoint that either refers to a publisher model or an endpoint that is hosting a 1P fine-tuned text embedding model. Endpoints hosting non-1P fine-tuned text embedding models are currently not supported." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint": { + "description": "Config representing a model hosted on Vertex Prediction Endpoint.", + "id": "GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint", + "properties": { + "endpoint": { + "description": "Required. The endpoint resource name. Format: `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` or `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "type": "string" + }, + "model": { + "description": "Output only. The resource name of the model that is deployed on the endpoint. Present only when the endpoint is not a publisher model. Pattern: `projects/{project}/locations/{location}/models/{model}`", + "readOnly": true, + "type": "string" + }, + "modelVersionId": { + "description": "Output only. Version ID of the model that is deployed on the endpoint. Present only when the endpoint is not a publisher model.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RagFile": { "description": "A RagFile contains user data for chunking, embedding and indexing.", "id": "GoogleCloudAiplatformV1beta1RagFile", @@ -40636,10 +40705,6 @@ "description": "Filter for searching ModelMonitoringStats.", "id": "GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilter", "properties": { - "genAiStatsFilter": { - "$ref": "GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter", - "description": "GenAi statistics filter." - }, "tabularStatsFilter": { "$ref": "GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterTabularStatsFilter", "description": "Tabular statistics filter." @@ -40647,33 +40712,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter": { - "description": "GenAi statistics filter.", - "id": "GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter", - "properties": { - "clusterId": { - "description": "From a particular cluster of monitoring results.", - "type": "string" - }, - "modelMonitoringJob": { - "description": "From a particular monitoring job.", - "type": "string" - }, - "modelMonitoringSchedule": { - "description": "From a particular monitoring schedule.", - "type": "string" - }, - "objectiveType": { - "description": "One of the supported monitoring objectives: `gen-ai-general` `gen-ai-evaluation` `gen-ai-safety`", - "type": "string" - }, - "statsName": { - "description": "If not specified, will return all the stats_names.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterTabularStatsFilter": { "description": "Tabular statistics filter.", "id": "GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterTabularStatsFilter", @@ -40912,6 +40950,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1StreamRawPredictRequest": { + "description": "Request message for PredictionService.StreamRawPredict.", + "id": "GoogleCloudAiplatformV1beta1StreamRawPredictRequest", + "properties": { + "httpBody": { + "$ref": "GoogleApiHttpBody", + "description": "The prediction input. Supports HTTP headers and arbitrary data payload." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1StreamingFetchFeatureValuesRequest": { "description": "Request message for FeatureOnlineStoreService.StreamingFetchFeatureValues. For the entities requested, all features under the requested feature view will be returned.", "id": "GoogleCloudAiplatformV1beta1StreamingFetchFeatureValuesRequest", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index a9cd9545762..4f5024498b4 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -13303,6 +13303,12 @@ type GoogleCloudAiplatformV1beta1ImportRagFilesConfig struct { // GoogleDriveSource: Google Drive location. Supports importing individual // files as well as Google Drive folders. GoogleDriveSource *GoogleCloudAiplatformV1beta1GoogleDriveSource `json:"googleDriveSource,omitempty"` + // MaxEmbeddingRequestsPerMin: Optional. The max number of queries per minute + // that this job is allowed to make to the embedding model specified on the + // corpus. This value is specific to this job and not shared across other + // import jobs. Consult the Quotas page on the project to set an appropriate + // value here. If unspecified, a default value of 1,000 QPM would be used. + MaxEmbeddingRequestsPerMin int64 `json:"maxEmbeddingRequestsPerMin,omitempty"` // RagFileChunkingConfig: Specifies the size and overlap of chunks after // importing RagFiles. RagFileChunkingConfig *GoogleCloudAiplatformV1beta1RagFileChunkingConfig `json:"ragFileChunkingConfig,omitempty"` @@ -17885,35 +17891,6 @@ func (s *GoogleCloudAiplatformV1beta1ModelMonitoringConfig) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats: A collection of data -// points that describes the time-varying values of a gen ai metric. -type GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats struct { - // DataPoints: The data points of this time series. When listing time series, - // points are returned in reverse time order. - DataPoints []*GoogleCloudAiplatformV1beta1ModelMonitoringStatsDataPoint `json:"dataPoints,omitempty"` - // ObjectiveType: One of the supported monitoring objectives: `gen-ai-general` - // `gen-ai-evaluation` `gen-ai-safety` - ObjectiveType string `json:"objectiveType,omitempty"` - // StatsName: The stats name. - StatsName string `json:"statsName,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataPoints") 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. "DataPoints") 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 *GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1ModelMonitoringInput: Model monitoring data // input spec. type GoogleCloudAiplatformV1beta1ModelMonitoringInput struct { @@ -18808,17 +18785,15 @@ func (s *GoogleCloudAiplatformV1beta1ModelMonitoringSpec) MarshalJSON() ([]byte, // GoogleCloudAiplatformV1beta1ModelMonitoringStats: Represents the collection // of statistics for a metric. type GoogleCloudAiplatformV1beta1ModelMonitoringStats struct { - // GenAiStats: Generated gen ai statistics. - GenAiStats *GoogleCloudAiplatformV1beta1ModelMonitoringGenAiStats `json:"genAiStats,omitempty"` // TabularStats: Generated tabular statistics. TabularStats *GoogleCloudAiplatformV1beta1ModelMonitoringTabularStats `json:"tabularStats,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenAiStats") to + // ForceSendFields is a list of field names (e.g. "TabularStats") 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. "GenAiStats") to include in API + // NullFields is a list of field names (e.g. "TabularStats") 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. @@ -19883,7 +19858,7 @@ type GoogleCloudAiplatformV1beta1NearestNeighborSearchOperationMetadataRecordErr // "INVALID_SPARSE_DIMENSIONS" - Error parsing sparse dimensions field. // "INVALID_TOKEN_VALUE" - Token restrict value is invalid. // "INVALID_SPARSE_EMBEDDING" - Invalid sparse embedding. - // "INVALID_EMBEDDING" - Invalid embedding. + // "INVALID_EMBEDDING" - Invalid dense embedding. ErrorType string `json:"errorType,omitempty"` // RawRecord: The original content of this record. RawRecord string `json:"rawRecord,omitempty"` @@ -21971,9 +21946,6 @@ type GoogleCloudAiplatformV1beta1PublisherModelCallToAction struct { Deploy *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy `json:"deploy,omitempty"` // DeployGke: Optional. Deploy PublisherModel to Google Kubernetes Engine. DeployGke *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` - // FineTune: Optional. Fine tune the PublisherModel with the third-party model - // tuning UI. - FineTune *GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences `json:"fineTune,omitempty"` // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` @@ -23275,6 +23247,9 @@ type GoogleCloudAiplatformV1beta1RagCorpus struct { DisplayName string `json:"displayName,omitempty"` // Name: Output only. The resource name of the RagCorpus. Name string `json:"name,omitempty"` + // RagEmbeddingModelConfig: Optional. Immutable. The embedding model config of + // the RagCorpus. + RagEmbeddingModelConfig *GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig `json:"ragEmbeddingModelConfig,omitempty"` // UpdateTime: Output only. Timestamp when this RagCorpus was last updated. UpdateTime string `json:"updateTime,omitempty"` @@ -23298,6 +23273,64 @@ func (s *GoogleCloudAiplatformV1beta1RagCorpus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig: Config for the +// embedding model to use for RAG. +type GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig struct { + // VertexPredictionEndpoint: The Vertex AI Prediction Endpoint that either + // refers to a publisher model or an endpoint that is hosting a 1P fine-tuned + // text embedding model. Endpoints hosting non-1P fine-tuned text embedding + // models are currently not supported. + VertexPredictionEndpoint *GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint `json:"vertexPredictionEndpoint,omitempty"` + // ForceSendFields is a list of field names (e.g. "VertexPredictionEndpoint") + // 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. "VertexPredictionEndpoint") 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 *GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint: +// Config representing a model hosted on Vertex Prediction Endpoint. +type GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint struct { + // Endpoint: Required. The endpoint resource name. Format: + // `projects/{project}/locations/{location}/publishers/{publisher}/models/{model + // }` or `projects/{project}/locations/{location}/endpoints/{endpoint}` + Endpoint string `json:"endpoint,omitempty"` + // Model: Output only. The resource name of the model that is deployed on the + // endpoint. Present only when the endpoint is not a publisher model. Pattern: + // `projects/{project}/locations/{location}/models/{model}` + Model string `json:"model,omitempty"` + // ModelVersionId: Output only. Version ID of the model that is deployed on the + // endpoint. Present only when the endpoint is not a publisher model. + ModelVersionId string `json:"modelVersionId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Endpoint") 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. "Endpoint") 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 *GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagEmbeddingModelConfigVertexPredictionEndpoint + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RagFile: A RagFile contains user data for // chunking, embedding and indexing. type GoogleCloudAiplatformV1beta1RagFile struct { @@ -32078,19 +32111,17 @@ func (s *GoogleCloudAiplatformV1beta1SearchModelMonitoringAlertsResponse) Marsha // GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilter: Filter for // searching ModelMonitoringStats. type GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilter struct { - // GenAiStatsFilter: GenAi statistics filter. - GenAiStatsFilter *GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter `json:"genAiStatsFilter,omitempty"` // TabularStatsFilter: Tabular statistics filter. TabularStatsFilter *GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterTabularStatsFilter `json:"tabularStatsFilter,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenAiStatsFilter") to + // ForceSendFields is a list of field names (e.g. "TabularStatsFilter") 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. "GenAiStatsFilter") 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. "TabularStatsFilter") 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:"-"` } @@ -32100,39 +32131,6 @@ func (s *GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilter) MarshalJS return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter: -// -// GenAi statistics filter. -type GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter struct { - // ClusterId: From a particular cluster of monitoring results. - ClusterId string `json:"clusterId,omitempty"` - // ModelMonitoringJob: From a particular monitoring job. - ModelMonitoringJob string `json:"modelMonitoringJob,omitempty"` - // ModelMonitoringSchedule: From a particular monitoring schedule. - ModelMonitoringSchedule string `json:"modelMonitoringSchedule,omitempty"` - // ObjectiveType: One of the supported monitoring objectives: `gen-ai-general` - // `gen-ai-evaluation` `gen-ai-safety` - ObjectiveType string `json:"objectiveType,omitempty"` - // StatsName: If not specified, will return all the stats_names. - StatsName string `json:"statsName,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") 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 *GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterGenAiStatsFilter - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterTabularStatsFilte // r: Tabular statistics filter. type GoogleCloudAiplatformV1beta1SearchModelMonitoringStatsFilterTabularStatsFilter struct { @@ -32548,6 +32546,30 @@ func (s *GoogleCloudAiplatformV1beta1StratifiedSplit) UnmarshalJSON(data []byte) return nil } +// GoogleCloudAiplatformV1beta1StreamRawPredictRequest: Request message for +// PredictionService.StreamRawPredict. +type GoogleCloudAiplatformV1beta1StreamRawPredictRequest struct { + // HttpBody: The prediction input. Supports HTTP headers and arbitrary data + // payload. + HttpBody *GoogleApiHttpBody `json:"httpBody,omitempty"` + // ForceSendFields is a list of field names (e.g. "HttpBody") 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. "HttpBody") 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 *GoogleCloudAiplatformV1beta1StreamRawPredictRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1StreamRawPredictRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1StreamingFetchFeatureValuesRequest: Request // message for FeatureOnlineStoreService.StreamingFetchFeatureValues. For the // entities requested, all features under the requested feature view will be @@ -40718,11 +40740,11 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) doRequest(alt string) (*http // Do executes the "aiplatform.projects.locations.cachedContents.delete" 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 *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40741,7 +40763,7 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52632,6 +52654,110 @@ func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googlea return ret, nil } +type ProjectsLocationsEndpointsStreamRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1streamrawpredictrequest *GoogleCloudAiplatformV1beta1StreamRawPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamRawPredict: Perform a streaming online prediction with an arbitrary +// HTTP payload. +// +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1beta1streamrawpredictrequest *GoogleCloudAiplatformV1beta1StreamRawPredictRequest) *ProjectsLocationsEndpointsStreamRawPredictCall { + c := &ProjectsLocationsEndpointsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1streamrawpredictrequest = googlecloudaiplatformv1beta1streamrawpredictrequest + 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 *ProjectsLocationsEndpointsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamRawPredictCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamRawPredictCall { + 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 *ProjectsLocationsEndpointsStreamRawPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1streamrawpredictrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:streamRawPredict") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.streamRawPredict" 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 *ProjectsLocationsEndpointsStreamRawPredictCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsEndpointsTestIamPermissionsCall struct { s *Service resource string @@ -93320,6 +93446,110 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ... return ret, nil } +type ProjectsLocationsPublishersModelsStreamRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1streamrawpredictrequest *GoogleCloudAiplatformV1beta1StreamRawPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamRawPredict: Perform a streaming online prediction with an arbitrary +// HTTP payload. +// +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1beta1streamrawpredictrequest *GoogleCloudAiplatformV1beta1StreamRawPredictRequest) *ProjectsLocationsPublishersModelsStreamRawPredictCall { + c := &ProjectsLocationsPublishersModelsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1streamrawpredictrequest = googlecloudaiplatformv1beta1streamrawpredictrequest + 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 *ProjectsLocationsPublishersModelsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamRawPredictCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamRawPredictCall { + 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 *ProjectsLocationsPublishersModelsStreamRawPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1streamrawpredictrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:streamRawPredict") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.publishers.models.streamRawPredict" 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 *ProjectsLocationsPublishersModelsStreamRawPredictCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRagCorporaCreateCall struct { s *Service parent string diff --git a/airquality/v1/airquality-api.json b/airquality/v1/airquality-api.json new file mode 100644 index 00000000000..44e54f59e21 --- /dev/null +++ b/airquality/v1/airquality-api.json @@ -0,0 +1,875 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://airquality.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Air Quality", + "description": "The Air Quality API.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/maps/documentation/air-quality", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "airquality:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://airquality.mtls.googleapis.com/", + "name": "airquality", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "currentConditions": { + "methods": { + "lookup": { + "description": "The Current Conditions endpoint provides hourly air quality information in more than 100 countries, up to a 500 x 500 meters resolution. Includes over 70 local indexes and global air quality index and categories.", + "flatPath": "v1/currentConditions:lookup", + "httpMethod": "POST", + "id": "airquality.currentConditions.lookup", + "parameterOrder": [], + "parameters": {}, + "path": "v1/currentConditions:lookup", + "request": { + "$ref": "LookupCurrentConditionsRequest" + }, + "response": { + "$ref": "LookupCurrentConditionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "forecast": { + "methods": { + "lookup": { + "description": "Returns air quality forecast for a specific location for a given time range.", + "flatPath": "v1/forecast:lookup", + "httpMethod": "POST", + "id": "airquality.forecast.lookup", + "parameterOrder": [], + "parameters": {}, + "path": "v1/forecast:lookup", + "request": { + "$ref": "LookupForecastRequest" + }, + "response": { + "$ref": "LookupForecastResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "history": { + "methods": { + "lookup": { + "description": "Returns air quality history for a specific location for a given time range.", + "flatPath": "v1/history:lookup", + "httpMethod": "POST", + "id": "airquality.history.lookup", + "parameterOrder": [], + "parameters": {}, + "path": "v1/history:lookup", + "request": { + "$ref": "LookupHistoryRequest" + }, + "response": { + "$ref": "LookupHistoryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "mapTypes": { + "resources": { + "heatmapTiles": { + "methods": { + "lookupHeatmapTile": { + "description": "Returns a bytes array containing the data of the tile PNG image.", + "flatPath": "v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}", + "httpMethod": "GET", + "id": "airquality.mapTypes.heatmapTiles.lookupHeatmapTile", + "parameterOrder": [ + "mapType", + "zoom", + "x", + "y" + ], + "parameters": { + "mapType": { + "description": "Required. The type of the air quality heatmap. Defines the pollutant that the map will graphically represent. Allowed values: - UAQI_RED_GREEN (UAQI, red-green palette) - UAQI_INDIGO_PERSIAN (UAQI, indigo-persian palette) - PM25_INDIGO_PERSIAN - GBR_DEFRA - DEU_UBA - CAN_EC - FRA_ATMO - US_AQI", + "enum": [ + "MAP_TYPE_UNSPECIFIED", + "UAQI_RED_GREEN", + "UAQI_INDIGO_PERSIAN", + "PM25_INDIGO_PERSIAN", + "GBR_DEFRA", + "DEU_UBA", + "CAN_EC", + "FRA_ATMO", + "US_AQI" + ], + "enumDescriptions": [ + "The default value. The server ignores it if it is passed as a parameter.", + "Universal Air Quality Index red-green palette.", + "Universal Air Quality Index indigo-persian palette.", + "PM2.5 index indigo-persian palette.", + "Daily Air Quality Index (UK) color palette.", + "German Local Air Quality Index color palette.", + "Canadian Air Quality Health Index color palette.", + "France Air Quality Index color palette.", + "US Air Quality Index color palette." + ], + "location": "path", + "required": true, + "type": "string" + }, + "x": { + "description": "Required. Defines the east-west point in the requested tile.", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + }, + "y": { + "description": "Required. Defines the north-south point in the requested tile.", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + }, + "zoom": { + "description": "Required. The map's zoom level. Defines how large or small the contents of a map appear in a map view. Zoom level 0 is the entire world in a single tile. Zoom level 1 is the entire world in 4 tiles. Zoom level 2 is the entire world in 16 tiles. Zoom level 16 is the entire world in 65,536 tiles. Allowed values: 0-16", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + } + }, + "path": "v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}", + "response": { + "$ref": "HttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20240611", + "rootUrl": "https://airquality.googleapis.com/", + "schemas": { + "AdditionalInfo": { + "description": "The emission sources and health effects of a given pollutant.", + "id": "AdditionalInfo", + "properties": { + "effects": { + "description": "Text representing the pollutant's main health effects.", + "type": "string" + }, + "sources": { + "description": "Text representing the pollutant's main emission sources.", + "type": "string" + } + }, + "type": "object" + }, + "AirQualityIndex": { + "description": "The basic object for representing different air quality metrics. When brought together, these metrics provide a snapshot about the current air quality conditions. There are multiple indexes in the world serving different purposes and groups interested in measuring different aspects of air quality.", + "id": "AirQualityIndex", + "properties": { + "aqi": { + "description": " The index's numeric score. Examples: 10, 100. The value is not normalized and should only be interpreted in the context of its related air-quality index. For non-numeric indexes, this field will not be returned. Note: This field should be used for calculations, graph display, etc. For displaying the index score, you should use the AQI display field.", + "format": "int32", + "type": "integer" + }, + "aqiDisplay": { + "description": "Textual representation of the index numeric score, that may include prefix or suffix symbols, which usually represents the worst index score. Example: \u003e100 or 10+. Note: This field should be used when you want to display the index score. For non-numeric indexes, this field is empty.", + "type": "string" + }, + "category": { + "description": "Textual classification of the index numeric score interpretation. For example: \"Excellent air quality\".", + "type": "string" + }, + "code": { + "description": "The index's code. This field represents the index for programming purposes by using snake case instead of spaces. Examples: \"uaqi\", \"fra_atmo\".", + "type": "string" + }, + "color": { + "$ref": "Color", + "description": "The color used to represent the AQI numeric score." + }, + "displayName": { + "description": "A human readable representation of the index name. Example: \"AQI (US)\"", + "type": "string" + }, + "dominantPollutant": { + "description": "The chemical symbol of the dominant pollutant. For example: \"CO\".", + "type": "string" + } + }, + "type": "object" + }, + "Color": { + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "id": "Color", + "properties": { + "alpha": { + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", + "format": "float", + "type": "number" + }, + "blue": { + "description": "The amount of blue in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "green": { + "description": "The amount of green in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "red": { + "description": "The amount of red in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "Concentration": { + "description": "The concentration of a given pollutant in the air.", + "id": "Concentration", + "properties": { + "units": { + "description": "Units for measuring this pollutant concentration.", + "enum": [ + "UNIT_UNSPECIFIED", + "PARTS_PER_BILLION", + "MICROGRAMS_PER_CUBIC_METER" + ], + "enumDescriptions": [ + "Unspecified concentration unit.", + "The ppb (parts per billion) concentration unit.", + "The \"µg/m^3\" (micrograms per cubic meter) concentration unit." + ], + "type": "string" + }, + "value": { + "description": "Value of pollutant concentration.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "CustomLocalAqi": { + "description": "Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI.", + "id": "CustomLocalAqi", + "properties": { + "aqi": { + "description": "The AQI to associate the country/region with. Value should be a [valid index](/maps/documentation/air-quality/laqis) code.", + "type": "string" + }, + "regionCode": { + "description": "The country/region requiring the custom AQI. Value should be provided using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.", + "type": "string" + } + }, + "type": "object" + }, + "HealthRecommendations": { + "description": "Health recommendations for different population groups in a free text format. The recommendations are derived from their associated air quality conditions.", + "id": "HealthRecommendations", + "properties": { + "athletes": { + "description": "Sports and other strenuous outdoor activities.", + "type": "string" + }, + "children": { + "description": "Younger populations including children, toddlers, and babies.", + "type": "string" + }, + "elderly": { + "description": "Retirees and people older than the general population.", + "type": "string" + }, + "generalPopulation": { + "description": "No specific sensitivities.", + "type": "string" + }, + "heartDiseasePopulation": { + "description": "Heart and circulatory system diseases.", + "type": "string" + }, + "lungDiseasePopulation": { + "description": "Respiratory related problems and asthma suffers.", + "type": "string" + }, + "pregnantWomen": { + "description": "Women at all stages of pregnancy.", + "type": "string" + } + }, + "type": "object" + }, + "HourInfo": { + "description": "Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of history there will be 48 elements of hourly info.", + "id": "HourInfo", + "properties": { + "dateTime": { + "description": "A rounded down timestamp indicating the time the data refers to in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. For example: \"2014-10-02T15:00:00Z\".", + "format": "google-datetime", + "type": "string" + }, + "healthRecommendations": { + "$ref": "HealthRecommendations", + "description": "Health advice and recommended actions related to the reported air quality conditions. Recommendations are tailored differently for populations at risk, groups with greater sensitivities to pollutants, and the general population." + }, + "indexes": { + "description": "Based on the request parameters, this list will include (up to) two air quality indexes: - Universal AQI. Will be returned if the universalAqi boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra computation is specified.", + "items": { + "$ref": "AirQualityIndex" + }, + "type": "array" + }, + "pollutants": { + "description": "A list of pollutants affecting the location specified in the request. Note: This field will be returned only for requests that specified one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.", + "items": { + "$ref": "Pollutant" + }, + "type": "array" + } + }, + "type": "object" + }, + "HourlyForecast": { + "description": "Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of forecast there will be 48 elements of hourly forecasts.", + "id": "HourlyForecast", + "properties": { + "dateTime": { + "description": "A rounded down timestamp indicating the time (hour) the data refers to in RFC3339 UTC \"Zulu\" format. For example: \"2014-10-02T15:00:00Z\".", + "format": "google-datetime", + "type": "string" + }, + "healthRecommendations": { + "$ref": "HealthRecommendations", + "description": "Health advice and recommended actions related to the reported air quality conditions. Recommendations are tailored differently for populations at risk, groups with greater sensitivities to pollutants, and the general population." + }, + "indexes": { + "description": "Based on the request parameters, this list will include (up to) two air quality indexes: - Universal AQI. Will be returned if the `universal_aqi` boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra computation is specified.", + "items": { + "$ref": "AirQualityIndex" + }, + "type": "array" + }, + "pollutants": { + "description": "A list of pollutants affecting the location specified in the request. Note: This field will be returned only for requests that specified one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.", + "items": { + "$ref": "Pollutant" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "HttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "Interval": { + "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", + "id": "Interval", + "properties": { + "endTime": { + "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "LatLng": { + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", + "id": "LatLng", + "properties": { + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "LookupCurrentConditionsRequest": { + "description": "The request definition of the air quality current conditions.", + "id": "LookupCurrentConditionsRequest", + "properties": { + "customLocalAqis": { + "description": "Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada.", + "items": { + "$ref": "CustomLocalAqi" + }, + "type": "array" + }, + "extraComputations": { + "description": "Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response.", + "items": { + "enum": [ + "EXTRA_COMPUTATION_UNSPECIFIED", + "LOCAL_AQI", + "HEALTH_RECOMMENDATIONS", + "POLLUTANT_ADDITIONAL_INFO", + "DOMINANT_POLLUTANT_CONCENTRATION", + "POLLUTANT_CONCENTRATION" + ], + "enumDescriptions": [ + "The default value. The server ignores it if it is passed as a parameter.", + "Determines whether to include the local (national) AQI of the requested location (country) in the response. If specified, the response will contain an 'air_quality_index' data structure with all the relevant data on the location's local AQI.", + "Determines whether the response will include the health advice and recommended actions for the current AQI conditions. The recommendations are tailored for the general population and six populations at risk groups with greater sensitivities to pollutants than the general population. If specified, the `health_recommendations` field will be populated in the response when the relevant data is available.", + "Determines whether to include in the response the additional information of each pollutant. If specified, each air quality index object contained in the 'indexes' field response will include an `additional_info` field when the data is available.", + "Determines whether the response would include the concentrations of the dominant pollutants measured according to global and/or local indexes. If the request specified both the global AQI and the local AQI, there may be up to two pollutant codes returned. If specified, the dominant pollutant object contained in the 'pollutants' list will include a `concentration` field when the data is available.", + "Determines whether the response would include the concentrations of all pollutants with available measurements according to global and/or local indexes. If specified, each pollutant object contained in the 'pollutants' field in the response will include a `concentration` field when the data is available." + ], + "type": "string" + }, + "type": "array" + }, + "languageCode": { + "description": "Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard. Default value is en.", + "type": "string" + }, + "location": { + "$ref": "LatLng", + "description": "Required. The longitude and latitude from which the API looks for air quality current conditions data." + }, + "uaqiColorPalette": { + "description": "Optional. Determines the color palette used for data provided by the 'Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled.", + "enum": [ + "COLOR_PALETTE_UNSPECIFIED", + "RED_GREEN", + "INDIGO_PERSIAN_DARK", + "INDIGO_PERSIAN_LIGHT" + ], + "enumDescriptions": [ + "The default value. Ignored if passed as a parameter.", + "Determines whether to use a red/green palette.", + "Determines whether to use a indigo/persian palette (dark theme).", + "Determines whether to use a indigo/persian palette (light theme)." + ], + "type": "string" + }, + "universalAqi": { + "description": "Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response. Default value is true.", + "type": "boolean" + } + }, + "type": "object" + }, + "LookupCurrentConditionsResponse": { + "id": "LookupCurrentConditionsResponse", + "properties": { + "dateTime": { + "description": "A rounded down timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. For example: \"2014-10-02T15:00:00Z\".", + "format": "google-datetime", + "type": "string" + }, + "healthRecommendations": { + "$ref": "HealthRecommendations", + "description": "Health advice and recommended actions related to the reported air quality conditions. Recommendations are tailored differently for populations at risk, groups with greater sensitivities to pollutants, and the general population." + }, + "indexes": { + "description": "Based on the request parameters, this list will include (up to) two air quality indexes: - Universal AQI. Will be returned if the universalAqi boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra computation is specified.", + "items": { + "$ref": "AirQualityIndex" + }, + "type": "array" + }, + "pollutants": { + "description": "A list of pollutants affecting the location specified in the request. Note: This field will be returned only for requests that specified one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.", + "items": { + "$ref": "Pollutant" + }, + "type": "array" + }, + "regionCode": { + "description": "The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory.", + "type": "string" + } + }, + "type": "object" + }, + "LookupForecastRequest": { + "description": "The request object of the air quality forecast API.", + "id": "LookupForecastRequest", + "properties": { + "customLocalAqis": { + "description": "Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada.", + "items": { + "$ref": "CustomLocalAqi" + }, + "type": "array" + }, + "dateTime": { + "description": "A timestamp for which to return the data for a specific point in time. The timestamp is rounded to the previous exact hour. Note: this will return hourly data for the requested timestamp only (i.e. a single hourly info element). For example, a request sent where the date_time parameter is set to 2023-01-03T11:05:49Z will be rounded down to 2023-01-03T11:00:00Z.", + "format": "google-datetime", + "type": "string" + }, + "extraComputations": { + "description": "Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response.", + "items": { + "enum": [ + "EXTRA_COMPUTATION_UNSPECIFIED", + "LOCAL_AQI", + "HEALTH_RECOMMENDATIONS", + "POLLUTANT_ADDITIONAL_INFO", + "DOMINANT_POLLUTANT_CONCENTRATION", + "POLLUTANT_CONCENTRATION" + ], + "enumDescriptions": [ + "The default value. The server ignores it if it is passed as a parameter.", + "Determines whether to include the local (national) AQI of the requested location (country) in the response. If specified, the response will contain an 'air_quality_index' data structure with all the relevant data on the location's local AQI.", + "Determines whether the response will include the health advice and recommended actions for the current AQI conditions. The recommendations are tailored for the general population and six populations at risk groups with greater sensitivities to pollutants than the general population. If specified, the `health_recommendations` field will be populated in the response when the relevant data is available.", + "Determines whether to include in the response the additional information of each pollutant. If specified, each air quality index object contained in the 'indexes' field response will include an `additional_info` field when the data is available.", + "Determines whether the response would include the concentrations of the dominant pollutants measured according to global and/or local indexes. If the request specified both the global AQI and the local AQI, there may be up to two pollutant codes returned. If specified, the dominant pollutant object contained in the 'pollutants' list will include a `concentration` field when the data is available.", + "Determines whether the response would include the concentrations of all pollutants with available measurements according to global and/or local indexes. If specified, each pollutant object contained in the 'pollutants' field in the response will include a `concentration` field when the data is available." + ], + "type": "string" + }, + "type": "array" + }, + "languageCode": { + "description": "Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard (default = 'en').", + "type": "string" + }, + "location": { + "$ref": "LatLng", + "description": "Required. The latitude and longitude for which the API looks for air quality data." + }, + "pageSize": { + "description": "Optional. The maximum number of hourly info records to return per page (default = 24).", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token received from a previous forecast call. It is used to retrieve the subsequent page.", + "type": "string" + }, + "period": { + "$ref": "Interval", + "description": "Indicates the start and end period for which to get the forecast data. The timestamp is rounded to the previous exact hour." + }, + "uaqiColorPalette": { + "description": "Optional. Determines the color palette used for data provided by the 'Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled.", + "enum": [ + "COLOR_PALETTE_UNSPECIFIED", + "RED_GREEN", + "INDIGO_PERSIAN_DARK", + "INDIGO_PERSIAN_LIGHT" + ], + "enumDescriptions": [ + "The default value. Ignored if passed as a parameter.", + "Determines whether to use a red/green palette.", + "Determines whether to use a indigo/persian palette (dark theme).", + "Determines whether to use a indigo/persian palette (light theme)." + ], + "type": "string" + }, + "universalAqi": { + "description": "Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response (default = true).", + "type": "boolean" + } + }, + "type": "object" + }, + "LookupForecastResponse": { + "description": "The response object of the air quality forecast API.", + "id": "LookupForecastResponse", + "properties": { + "hourlyForecasts": { + "description": "Optional. Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of forecast there will be 48 elements of hourly forecasts.", + "items": { + "$ref": "HourlyForecast" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. The token to retrieve the next page.", + "type": "string" + }, + "regionCode": { + "description": "Optional. The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory.", + "type": "string" + } + }, + "type": "object" + }, + "LookupHistoryRequest": { + "description": "The request object of the air quality history API.", + "id": "LookupHistoryRequest", + "properties": { + "customLocalAqis": { + "description": "Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada.", + "items": { + "$ref": "CustomLocalAqi" + }, + "type": "array" + }, + "dateTime": { + "description": "A timestamp for which to return historical data. The timestamp is rounded to the previous exact hour. Note: this will return hourly data for the requested timestamp only (i.e. a single hourly info element). For example, a request sent where the dateTime parameter is set to 2023-01-03T11:05:49Z will be rounded down to 2023-01-03T11:00:00Z. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: \"2014-10-02T15:01:23Z\" and \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "type": "string" + }, + "extraComputations": { + "description": "Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response.", + "items": { + "enum": [ + "EXTRA_COMPUTATION_UNSPECIFIED", + "LOCAL_AQI", + "HEALTH_RECOMMENDATIONS", + "POLLUTANT_ADDITIONAL_INFO", + "DOMINANT_POLLUTANT_CONCENTRATION", + "POLLUTANT_CONCENTRATION" + ], + "enumDescriptions": [ + "The default value. The server ignores it if it is passed as a parameter.", + "Determines whether to include the local (national) AQI of the requested location (country) in the response. If specified, the response will contain an 'air_quality_index' data structure with all the relevant data on the location's local AQI.", + "Determines whether the response will include the health advice and recommended actions for the current AQI conditions. The recommendations are tailored for the general population and six populations at risk groups with greater sensitivities to pollutants than the general population. If specified, the `health_recommendations` field will be populated in the response when the relevant data is available.", + "Determines whether to include in the response the additional information of each pollutant. If specified, each air quality index object contained in the 'indexes' field response will include an `additional_info` field when the data is available.", + "Determines whether the response would include the concentrations of the dominant pollutants measured according to global and/or local indexes. If the request specified both the global AQI and the local AQI, there may be up to two pollutant codes returned. If specified, the dominant pollutant object contained in the 'pollutants' list will include a `concentration` field when the data is available.", + "Determines whether the response would include the concentrations of all pollutants with available measurements according to global and/or local indexes. If specified, each pollutant object contained in the 'pollutants' field in the response will include a `concentration` field when the data is available." + ], + "type": "string" + }, + "type": "array" + }, + "hours": { + "description": "Number from 1 to 720 that indicates the hours range for the request. For example: A value of 48 will yield data from the last 48 hours.", + "format": "int32", + "type": "integer" + }, + "languageCode": { + "description": "Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard. Default value is en.", + "type": "string" + }, + "location": { + "$ref": "LatLng", + "description": "Required. The latitude and longitude for which the API looks for air quality history data." + }, + "pageSize": { + "description": "Optional. The maximum number of hourly info records to return per page. The default is 72 and the max value is 168 (7 days of data).", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token received from a previous history call. It is used to retrieve the subsequent page. Note that when providing a value for this parameter all other parameters provided must match the call that provided the page token (the previous call).", + "type": "string" + }, + "period": { + "$ref": "Interval", + "description": "Indicates the start and end period for which to get the historical data. The timestamp is rounded to the previous exact hour." + }, + "uaqiColorPalette": { + "description": "Optional. Determines the color palette used for data provided by the 'Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled.", + "enum": [ + "COLOR_PALETTE_UNSPECIFIED", + "RED_GREEN", + "INDIGO_PERSIAN_DARK", + "INDIGO_PERSIAN_LIGHT" + ], + "enumDescriptions": [ + "The default value. Ignored if passed as a parameter.", + "Determines whether to use a red/green palette.", + "Determines whether to use a indigo/persian palette (dark theme).", + "Determines whether to use a indigo/persian palette (light theme)." + ], + "type": "string" + }, + "universalAqi": { + "description": "Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response. Default value is true.", + "type": "boolean" + } + }, + "type": "object" + }, + "LookupHistoryResponse": { + "id": "LookupHistoryResponse", + "properties": { + "hoursInfo": { + "description": "Optional. Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of history there will be 48 elements of hourly info.", + "items": { + "$ref": "HourInfo" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. The token to retrieve the next page.", + "type": "string" + }, + "regionCode": { + "description": "Optional. The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory.", + "type": "string" + } + }, + "type": "object" + }, + "Pollutant": { + "description": "Data regarding an air quality pollutant.", + "id": "Pollutant", + "properties": { + "additionalInfo": { + "$ref": "AdditionalInfo", + "description": "Additional information about the pollutant." + }, + "code": { + "description": "The pollutant's code name. For example: \"so2\". A list of all available codes could be found [here](/maps/documentation/air-quality/pollutants#reported_pollutants).", + "type": "string" + }, + "concentration": { + "$ref": "Concentration", + "description": "The pollutant's concentration level measured by one of the standard air pollutation measure units." + }, + "displayName": { + "description": "The pollutant's display name. For example: \"NOx\".", + "type": "string" + }, + "fullName": { + "description": "The pollutant's full name. For chemical compounds, this is the IUPAC name. Example: \"Sulfur Dioxide\". For more information about the IUPAC names table, see https://iupac.org/what-we-do/periodic-table-of-elements/", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Air Quality API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/airquality/v1/airquality-gen.go b/airquality/v1/airquality-gen.go new file mode 100644 index 00000000000..a530b70f738 --- /dev/null +++ b/airquality/v1/airquality-gen.go @@ -0,0 +1,1602 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package airquality provides access to the Air Quality API. +// +// For product documentation, see: https://developers.google.com/maps/documentation/air-quality +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/airquality/v1" +// ... +// ctx := context.Background() +// airqualityService, err := airquality.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// airqualityService, err := airquality.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// airqualityService, err := airquality.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package airquality // import "google.golang.org/api/airquality/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "airquality:v1" +const apiName = "airquality" +const apiVersion = "v1" +const basePath = "https://airquality.googleapis.com/" +const basePathTemplate = "https://airquality.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://airquality.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.CurrentConditions = NewCurrentConditionsService(s) + s.Forecast = NewForecastService(s) + s.History = NewHistoryService(s) + s.MapTypes = NewMapTypesService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + CurrentConditions *CurrentConditionsService + + Forecast *ForecastService + + History *HistoryService + + MapTypes *MapTypesService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewCurrentConditionsService(s *Service) *CurrentConditionsService { + rs := &CurrentConditionsService{s: s} + return rs +} + +type CurrentConditionsService struct { + s *Service +} + +func NewForecastService(s *Service) *ForecastService { + rs := &ForecastService{s: s} + return rs +} + +type ForecastService struct { + s *Service +} + +func NewHistoryService(s *Service) *HistoryService { + rs := &HistoryService{s: s} + return rs +} + +type HistoryService struct { + s *Service +} + +func NewMapTypesService(s *Service) *MapTypesService { + rs := &MapTypesService{s: s} + rs.HeatmapTiles = NewMapTypesHeatmapTilesService(s) + return rs +} + +type MapTypesService struct { + s *Service + + HeatmapTiles *MapTypesHeatmapTilesService +} + +func NewMapTypesHeatmapTilesService(s *Service) *MapTypesHeatmapTilesService { + rs := &MapTypesHeatmapTilesService{s: s} + return rs +} + +type MapTypesHeatmapTilesService struct { + s *Service +} + +// AdditionalInfo: The emission sources and health effects of a given +// pollutant. +type AdditionalInfo struct { + // Effects: Text representing the pollutant's main health effects. + Effects string `json:"effects,omitempty"` + // Sources: Text representing the pollutant's main emission sources. + Sources string `json:"sources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Effects") 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. "Effects") 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 *AdditionalInfo) MarshalJSON() ([]byte, error) { + type NoMethod AdditionalInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// AirQualityIndex: The basic object for representing different air quality +// metrics. When brought together, these metrics provide a snapshot about the +// current air quality conditions. There are multiple indexes in the world +// serving different purposes and groups interested in measuring different +// aspects of air quality. +type AirQualityIndex struct { + // Aqi: The index's numeric score. Examples: 10, 100. The value is not + // normalized and should only be interpreted in the context of its related + // air-quality index. For non-numeric indexes, this field will not be returned. + // Note: This field should be used for calculations, graph display, etc. For + // displaying the index score, you should use the AQI display field. + Aqi int64 `json:"aqi,omitempty"` + // AqiDisplay: Textual representation of the index numeric score, that may + // include prefix or suffix symbols, which usually represents the worst index + // score. Example: >100 or 10+. Note: This field should be used when you want + // to display the index score. For non-numeric indexes, this field is empty. + AqiDisplay string `json:"aqiDisplay,omitempty"` + // Category: Textual classification of the index numeric score interpretation. + // For example: "Excellent air quality". + Category string `json:"category,omitempty"` + // Code: The index's code. This field represents the index for programming + // purposes by using snake case instead of spaces. Examples: "uaqi", + // "fra_atmo". + Code string `json:"code,omitempty"` + // Color: The color used to represent the AQI numeric score. + Color *Color `json:"color,omitempty"` + // DisplayName: A human readable representation of the index name. Example: + // "AQI (US)" + DisplayName string `json:"displayName,omitempty"` + // DominantPollutant: The chemical symbol of the dominant pollutant. For + // example: "CO". + DominantPollutant string `json:"dominantPollutant,omitempty"` + // ForceSendFields is a list of field names (e.g. "Aqi") 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. "Aqi") 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 *AirQualityIndex) MarshalJSON() ([]byte, error) { + type NoMethod AirQualityIndex + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// Color: Represents a color in the RGBA color space. This representation is +// designed for simplicity of conversion to and from color representations in +// various languages over compactness. For example, the fields of this +// representation can be trivially provided to the constructor of +// `java.awt.Color` in Java; it can also be trivially provided to UIColor's +// `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little +// work, it can be easily formatted into a CSS `rgba()` string in JavaScript. +// This reference page doesn't have information about the absolute color space +// that should be used to interpret the RGB value—for example, sRGB, Adobe +// RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB +// color space. When color equality needs to be decided, implementations, +// unless documented otherwise, treat two colors as equal if all their red, +// green, blue, and alpha values each differ by at most `1e-5`. Example (Java): +// import com.google.type.Color; // ... public static java.awt.Color +// fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? +// protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( +// protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } +// public static Color toProto(java.awt.Color color) { float red = (float) +// color.getRed(); float green = (float) color.getGreen(); float blue = (float) +// color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = +// Color .newBuilder() .setRed(red / denominator) .setGreen(green / +// denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if +// (alpha != 255) { result.setAlpha( FloatValue .newBuilder() +// .setValue(((float) alpha) / denominator) .build()); } return +// resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static +// UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float +// green = [protocolor green]; float blue = [protocolor blue]; FloatValue* +// alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != +// nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red +// green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) +// { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green +// blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] +// init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; +// if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } +// [result autorelease]; return result; } // ... Example (JavaScript): // ... +// var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || +// 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue +// || 0.0; var red = Math.floor(redFrac * 255); var green = +// Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if +// (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var +// alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, +// blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); +// }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new +// Number((red << 16) | (green << 8) | blue); var hexString = +// rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var +// resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { +// resultBuilder.push('0'); } resultBuilder.push(hexString); return +// resultBuilder.join(”); }; // ... +type Color struct { + // Alpha: The fraction of this color that should be applied to the pixel. That + // is, the final pixel color is defined by the equation: `pixel color = alpha * + // (this color) + (1.0 - alpha) * (background color)` This means that a value + // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a + // completely transparent color. This uses a wrapper message rather than a + // simple float scalar so that it is possible to distinguish between a default + // value and the value being unset. If omitted, this color object is rendered + // as a solid color (as if the alpha value had been explicitly given a value of + // 1.0). + Alpha float64 `json:"alpha,omitempty"` + // Blue: The amount of blue in the color as a value in the interval [0, 1]. + Blue float64 `json:"blue,omitempty"` + // Green: The amount of green in the color as a value in the interval [0, 1]. + Green float64 `json:"green,omitempty"` + // Red: The amount of red in the color as a value in the interval [0, 1]. + Red float64 `json:"red,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") 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 *Color) MarshalJSON() ([]byte, error) { + type NoMethod Color + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *Color) UnmarshalJSON(data []byte) error { + type NoMethod Color + var s1 struct { + Alpha gensupport.JSONFloat64 `json:"alpha"` + Blue gensupport.JSONFloat64 `json:"blue"` + Green gensupport.JSONFloat64 `json:"green"` + Red gensupport.JSONFloat64 `json:"red"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Alpha = float64(s1.Alpha) + s.Blue = float64(s1.Blue) + s.Green = float64(s1.Green) + s.Red = float64(s1.Red) + return nil +} + +// Concentration: The concentration of a given pollutant in the air. +type Concentration struct { + // Units: Units for measuring this pollutant concentration. + // + // Possible values: + // "UNIT_UNSPECIFIED" - Unspecified concentration unit. + // "PARTS_PER_BILLION" - The ppb (parts per billion) concentration unit. + // "MICROGRAMS_PER_CUBIC_METER" - The "µg/m^3" (micrograms per cubic meter) + // concentration unit. + Units string `json:"units,omitempty"` + // Value: Value of pollutant concentration. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Units") 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. "Units") 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 *Concentration) MarshalJSON() ([]byte, error) { + type NoMethod Concentration + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *Concentration) UnmarshalJSON(data []byte) error { + type NoMethod Concentration + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil +} + +// CustomLocalAqi: Expresses a 'country/region to AQI' relationship. Pairs a +// country/region with a desired AQI so that air quality data that is required +// for that country/region will be displayed according to the chosen AQI. +type CustomLocalAqi struct { + // Aqi: The AQI to associate the country/region with. Value should be a valid + // index (/maps/documentation/air-quality/laqis) code. + Aqi string `json:"aqi,omitempty"` + // RegionCode: The country/region requiring the custom AQI. Value should be + // provided using ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. + RegionCode string `json:"regionCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Aqi") 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. "Aqi") 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 *CustomLocalAqi) MarshalJSON() ([]byte, error) { + type NoMethod CustomLocalAqi + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HealthRecommendations: Health recommendations for different population +// groups in a free text format. The recommendations are derived from their +// associated air quality conditions. +type HealthRecommendations struct { + // Athletes: Sports and other strenuous outdoor activities. + Athletes string `json:"athletes,omitempty"` + // Children: Younger populations including children, toddlers, and babies. + Children string `json:"children,omitempty"` + // Elderly: Retirees and people older than the general population. + Elderly string `json:"elderly,omitempty"` + // GeneralPopulation: No specific sensitivities. + GeneralPopulation string `json:"generalPopulation,omitempty"` + // HeartDiseasePopulation: Heart and circulatory system diseases. + HeartDiseasePopulation string `json:"heartDiseasePopulation,omitempty"` + // LungDiseasePopulation: Respiratory related problems and asthma suffers. + LungDiseasePopulation string `json:"lungDiseasePopulation,omitempty"` + // PregnantWomen: Women at all stages of pregnancy. + PregnantWomen string `json:"pregnantWomen,omitempty"` + // ForceSendFields is a list of field names (e.g. "Athletes") 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. "Athletes") 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 *HealthRecommendations) MarshalJSON() ([]byte, error) { + type NoMethod HealthRecommendations + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HourInfo: Contains the air quality information for each hour in the +// requested range. For example, if the request is for 48 hours of history +// there will be 48 elements of hourly info. +type HourInfo struct { + // DateTime: A rounded down timestamp indicating the time the data refers to in + // RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine + // fractional digits. For example: "2014-10-02T15:00:00Z". + DateTime string `json:"dateTime,omitempty"` + // HealthRecommendations: Health advice and recommended actions related to the + // reported air quality conditions. Recommendations are tailored differently + // for populations at risk, groups with greater sensitivities to pollutants, + // and the general population. + HealthRecommendations *HealthRecommendations `json:"healthRecommendations,omitempty"` + // Indexes: Based on the request parameters, this list will include (up to) two + // air quality indexes: - Universal AQI. Will be returned if the universalAqi + // boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra + // computation is specified. + Indexes []*AirQualityIndex `json:"indexes,omitempty"` + // Pollutants: A list of pollutants affecting the location specified in the + // request. Note: This field will be returned only for requests that specified + // one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, + // DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION. + Pollutants []*Pollutant `json:"pollutants,omitempty"` + // ForceSendFields is a list of field names (e.g. "DateTime") 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. "DateTime") 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 *HourInfo) MarshalJSON() ([]byte, error) { + type NoMethod HourInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HourlyForecast: Contains the air quality information for each hour in the +// requested range. For example, if the request is for 48 hours of forecast +// there will be 48 elements of hourly forecasts. +type HourlyForecast struct { + // DateTime: A rounded down timestamp indicating the time (hour) the data + // refers to in RFC3339 UTC "Zulu" format. For example: "2014-10-02T15:00:00Z". + DateTime string `json:"dateTime,omitempty"` + // HealthRecommendations: Health advice and recommended actions related to the + // reported air quality conditions. Recommendations are tailored differently + // for populations at risk, groups with greater sensitivities to pollutants, + // and the general population. + HealthRecommendations *HealthRecommendations `json:"healthRecommendations,omitempty"` + // Indexes: Based on the request parameters, this list will include (up to) two + // air quality indexes: - Universal AQI. Will be returned if the + // `universal_aqi` boolean is set to true. - Local AQI. Will be returned if the + // LOCAL_AQI extra computation is specified. + Indexes []*AirQualityIndex `json:"indexes,omitempty"` + // Pollutants: A list of pollutants affecting the location specified in the + // request. Note: This field will be returned only for requests that specified + // one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, + // DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION. + Pollutants []*Pollutant `json:"pollutants,omitempty"` + // ForceSendFields is a list of field names (e.g. "DateTime") 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. "DateTime") 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 *HourlyForecast) MarshalJSON() ([]byte, error) { + type NoMethod HourlyForecast + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpBody: Message that represents an arbitrary HTTP body. It should only be +// used for payload formats that can't be represented as JSON, such as raw +// binary or an HTML page. This message can be used both in streaming and +// non-streaming API methods in the request as well as the response. It can be +// used as a top-level request field, which is convenient if one wants to +// extract parameters from either the URL or HTTP template into the request +// fields and also want access to the raw HTTP body. Example: message +// GetResourceRequest { // A unique request id. string request_id = 1; // The +// raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } +// service ResourceService { rpc GetResource(GetResourceRequest) returns +// (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); } Example with streaming methods: service +// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream +// google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns +// (stream google.api.HttpBody); } Use of this type only changes how the +// request and response bodies are handled, all other features will continue to +// work unchanged. +type HttpBody struct { + // ContentType: The HTTP Content-Type header value specifying the content type + // of the body. + ContentType string `json:"contentType,omitempty"` + // Data: The HTTP request/response body as raw binary. + Data string `json:"data,omitempty"` + // Extensions: Application specific response metadata. Must be set in the first + // response for streaming APIs. + Extensions []googleapi.RawMessage `json:"extensions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ContentType") 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. "ContentType") 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 *HttpBody) MarshalJSON() ([]byte, error) { + type NoMethod HttpBody + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// Interval: Represents a time interval, encoded as a Timestamp start +// (inclusive) and a Timestamp end (exclusive). The start must be less than or +// equal to the end. When the start equals the end, the interval is empty +// (matches no time). When both start and end are unspecified, the interval +// matches any time. +type Interval struct { + // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp + // matching this interval will have to be before the end. + EndTime string `json:"endTime,omitempty"` + // StartTime: Optional. Inclusive start of the interval. If specified, a + // Timestamp matching this interval will have to be the same or after the + // start. + 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 *Interval) MarshalJSON() ([]byte, error) { + type NoMethod Interval + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// LatLng: An object that represents a latitude/longitude pair. This is +// expressed as a pair of doubles to represent degrees latitude and degrees +// longitude. Unless specified otherwise, this object must conform to the WGS84 +// standard. Values must be within normalized ranges. +type LatLng struct { + // Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0]. + Latitude float64 `json:"latitude,omitempty"` + // Longitude: The longitude in degrees. It must be in the range [-180.0, + // +180.0]. + Longitude float64 `json:"longitude,omitempty"` + // ForceSendFields is a list of field names (e.g. "Latitude") 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. "Latitude") 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 *LatLng) MarshalJSON() ([]byte, error) { + type NoMethod LatLng + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *LatLng) UnmarshalJSON(data []byte) error { + type NoMethod LatLng + var s1 struct { + Latitude gensupport.JSONFloat64 `json:"latitude"` + Longitude gensupport.JSONFloat64 `json:"longitude"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Latitude = float64(s1.Latitude) + s.Longitude = float64(s1.Longitude) + return nil +} + +// LookupCurrentConditionsRequest: The request definition of the air quality +// current conditions. +type LookupCurrentConditionsRequest struct { + // CustomLocalAqis: Optional. Expresses a 'country/region to AQI' relationship. + // Pairs a country/region with a desired AQI so that air quality data that is + // required for that country/region will be displayed according to the chosen + // AQI. This parameter can be used to specify a non-default AQI for a given + // country, for example, to get the US EPA index for Canada rather than the + // default index for Canada. + CustomLocalAqis []*CustomLocalAqi `json:"customLocalAqis,omitempty"` + // ExtraComputations: Optional. Additional features that can be optionally + // enabled. Specifying extra computations will result in the relevant elements + // and fields to be returned in the response. + // + // Possible values: + // "EXTRA_COMPUTATION_UNSPECIFIED" - The default value. The server ignores it + // if it is passed as a parameter. + // "LOCAL_AQI" - Determines whether to include the local (national) AQI of + // the requested location (country) in the response. If specified, the response + // will contain an 'air_quality_index' data structure with all the relevant + // data on the location's local AQI. + // "HEALTH_RECOMMENDATIONS" - Determines whether the response will include + // the health advice and recommended actions for the current AQI conditions. + // The recommendations are tailored for the general population and six + // populations at risk groups with greater sensitivities to pollutants than the + // general population. If specified, the `health_recommendations` field will be + // populated in the response when the relevant data is available. + // "POLLUTANT_ADDITIONAL_INFO" - Determines whether to include in the + // response the additional information of each pollutant. If specified, each + // air quality index object contained in the 'indexes' field response will + // include an `additional_info` field when the data is available. + // "DOMINANT_POLLUTANT_CONCENTRATION" - Determines whether the response would + // include the concentrations of the dominant pollutants measured according to + // global and/or local indexes. If the request specified both the global AQI + // and the local AQI, there may be up to two pollutant codes returned. If + // specified, the dominant pollutant object contained in the 'pollutants' list + // will include a `concentration` field when the data is available. + // "POLLUTANT_CONCENTRATION" - Determines whether the response would include + // the concentrations of all pollutants with available measurements according + // to global and/or local indexes. If specified, each pollutant object + // contained in the 'pollutants' field in the response will include a + // `concentration` field when the data is available. + ExtraComputations []string `json:"extraComputations,omitempty"` + // LanguageCode: Optional. Allows the client to choose the language for the + // response. If data cannot be provided for that language the API uses the + // closest match. Allowed values rely on the IETF standard. Default value is + // en. + LanguageCode string `json:"languageCode,omitempty"` + // Location: Required. The longitude and latitude from which the API looks for + // air quality current conditions data. + Location *LatLng `json:"location,omitempty"` + // UaqiColorPalette: Optional. Determines the color palette used for data + // provided by the 'Universal Air Quality Index' (UAQI). This color palette is + // relevant just for UAQI, other AQIs have a predetermined color palette that + // can't be controlled. + // + // Possible values: + // "COLOR_PALETTE_UNSPECIFIED" - The default value. Ignored if passed as a + // parameter. + // "RED_GREEN" - Determines whether to use a red/green palette. + // "INDIGO_PERSIAN_DARK" - Determines whether to use a indigo/persian palette + // (dark theme). + // "INDIGO_PERSIAN_LIGHT" - Determines whether to use a indigo/persian + // palette (light theme). + UaqiColorPalette string `json:"uaqiColorPalette,omitempty"` + // UniversalAqi: Optional. If set to true, the Universal AQI will be included + // in the 'indexes' field of the response. Default value is true. + UniversalAqi bool `json:"universalAqi,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomLocalAqis") 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. "CustomLocalAqis") 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 *LookupCurrentConditionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod LookupCurrentConditionsRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type LookupCurrentConditionsResponse struct { + // DateTime: A rounded down timestamp in RFC3339 UTC "Zulu" format, with + // nanosecond resolution and up to nine fractional digits. For example: + // "2014-10-02T15:00:00Z". + DateTime string `json:"dateTime,omitempty"` + // HealthRecommendations: Health advice and recommended actions related to the + // reported air quality conditions. Recommendations are tailored differently + // for populations at risk, groups with greater sensitivities to pollutants, + // and the general population. + HealthRecommendations *HealthRecommendations `json:"healthRecommendations,omitempty"` + // Indexes: Based on the request parameters, this list will include (up to) two + // air quality indexes: - Universal AQI. Will be returned if the universalAqi + // boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra + // computation is specified. + Indexes []*AirQualityIndex `json:"indexes,omitempty"` + // Pollutants: A list of pollutants affecting the location specified in the + // request. Note: This field will be returned only for requests that specified + // one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, + // DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION. + Pollutants []*Pollutant `json:"pollutants,omitempty"` + // RegionCode: The ISO_3166-1 alpha-2 code of the country/region corresponding + // to the location provided in the request. This field might be omitted from + // the response if the location provided in the request resides in a disputed + // territory. + RegionCode string `json:"regionCode,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DateTime") 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. "DateTime") 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 *LookupCurrentConditionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod LookupCurrentConditionsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// LookupForecastRequest: The request object of the air quality forecast API. +type LookupForecastRequest struct { + // CustomLocalAqis: Optional. Expresses a 'country/region to AQI' relationship. + // Pairs a country/region with a desired AQI so that air quality data that is + // required for that country/region will be displayed according to the chosen + // AQI. This parameter can be used to specify a non-default AQI for a given + // country, for example, to get the US EPA index for Canada rather than the + // default index for Canada. + CustomLocalAqis []*CustomLocalAqi `json:"customLocalAqis,omitempty"` + // DateTime: A timestamp for which to return the data for a specific point in + // time. The timestamp is rounded to the previous exact hour. Note: this will + // return hourly data for the requested timestamp only (i.e. a single hourly + // info element). For example, a request sent where the date_time parameter is + // set to 2023-01-03T11:05:49Z will be rounded down to 2023-01-03T11:00:00Z. + DateTime string `json:"dateTime,omitempty"` + // ExtraComputations: Optional. Additional features that can be optionally + // enabled. Specifying extra computations will result in the relevant elements + // and fields to be returned in the response. + // + // Possible values: + // "EXTRA_COMPUTATION_UNSPECIFIED" - The default value. The server ignores it + // if it is passed as a parameter. + // "LOCAL_AQI" - Determines whether to include the local (national) AQI of + // the requested location (country) in the response. If specified, the response + // will contain an 'air_quality_index' data structure with all the relevant + // data on the location's local AQI. + // "HEALTH_RECOMMENDATIONS" - Determines whether the response will include + // the health advice and recommended actions for the current AQI conditions. + // The recommendations are tailored for the general population and six + // populations at risk groups with greater sensitivities to pollutants than the + // general population. If specified, the `health_recommendations` field will be + // populated in the response when the relevant data is available. + // "POLLUTANT_ADDITIONAL_INFO" - Determines whether to include in the + // response the additional information of each pollutant. If specified, each + // air quality index object contained in the 'indexes' field response will + // include an `additional_info` field when the data is available. + // "DOMINANT_POLLUTANT_CONCENTRATION" - Determines whether the response would + // include the concentrations of the dominant pollutants measured according to + // global and/or local indexes. If the request specified both the global AQI + // and the local AQI, there may be up to two pollutant codes returned. If + // specified, the dominant pollutant object contained in the 'pollutants' list + // will include a `concentration` field when the data is available. + // "POLLUTANT_CONCENTRATION" - Determines whether the response would include + // the concentrations of all pollutants with available measurements according + // to global and/or local indexes. If specified, each pollutant object + // contained in the 'pollutants' field in the response will include a + // `concentration` field when the data is available. + ExtraComputations []string `json:"extraComputations,omitempty"` + // LanguageCode: Optional. Allows the client to choose the language for the + // response. If data cannot be provided for that language the API uses the + // closest match. Allowed values rely on the IETF standard (default = 'en'). + LanguageCode string `json:"languageCode,omitempty"` + // Location: Required. The latitude and longitude for which the API looks for + // air quality data. + Location *LatLng `json:"location,omitempty"` + // PageSize: Optional. The maximum number of hourly info records to return per + // page (default = 24). + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: Optional. A page token received from a previous forecast call. It + // is used to retrieve the subsequent page. + PageToken string `json:"pageToken,omitempty"` + // Period: Indicates the start and end period for which to get the forecast + // data. The timestamp is rounded to the previous exact hour. + Period *Interval `json:"period,omitempty"` + // UaqiColorPalette: Optional. Determines the color palette used for data + // provided by the 'Universal Air Quality Index' (UAQI). This color palette is + // relevant just for UAQI, other AQIs have a predetermined color palette that + // can't be controlled. + // + // Possible values: + // "COLOR_PALETTE_UNSPECIFIED" - The default value. Ignored if passed as a + // parameter. + // "RED_GREEN" - Determines whether to use a red/green palette. + // "INDIGO_PERSIAN_DARK" - Determines whether to use a indigo/persian palette + // (dark theme). + // "INDIGO_PERSIAN_LIGHT" - Determines whether to use a indigo/persian + // palette (light theme). + UaqiColorPalette string `json:"uaqiColorPalette,omitempty"` + // UniversalAqi: Optional. If set to true, the Universal AQI will be included + // in the 'indexes' field of the response (default = true). + UniversalAqi bool `json:"universalAqi,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomLocalAqis") 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. "CustomLocalAqis") 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 *LookupForecastRequest) MarshalJSON() ([]byte, error) { + type NoMethod LookupForecastRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// LookupForecastResponse: The response object of the air quality forecast API. +type LookupForecastResponse struct { + // HourlyForecasts: Optional. Contains the air quality information for each + // hour in the requested range. For example, if the request is for 48 hours of + // forecast there will be 48 elements of hourly forecasts. + HourlyForecasts []*HourlyForecast `json:"hourlyForecasts,omitempty"` + // NextPageToken: Optional. The token to retrieve the next page. + NextPageToken string `json:"nextPageToken,omitempty"` + // RegionCode: Optional. The ISO_3166-1 alpha-2 code of the country/region + // corresponding to the location provided in the request. This field might be + // omitted from the response if the location provided in the request resides in + // a disputed territory. + RegionCode string `json:"regionCode,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "HourlyForecasts") 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. "HourlyForecasts") 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 *LookupForecastResponse) MarshalJSON() ([]byte, error) { + type NoMethod LookupForecastResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// LookupHistoryRequest: The request object of the air quality history API. +type LookupHistoryRequest struct { + // CustomLocalAqis: Optional. Expresses a 'country/region to AQI' relationship. + // Pairs a country/region with a desired AQI so that air quality data that is + // required for that country/region will be displayed according to the chosen + // AQI. This parameter can be used to specify a non-default AQI for a given + // country, for example, to get the US EPA index for Canada rather than the + // default index for Canada. + CustomLocalAqis []*CustomLocalAqi `json:"customLocalAqis,omitempty"` + // DateTime: A timestamp for which to return historical data. The timestamp is + // rounded to the previous exact hour. Note: this will return hourly data for + // the requested timestamp only (i.e. a single hourly info element). For + // example, a request sent where the dateTime parameter is set to + // 2023-01-03T11:05:49Z will be rounded down to 2023-01-03T11:00:00Z. A + // timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to + // nine fractional digits. Examples: "2014-10-02T15:01:23Z" and + // "2014-10-02T15:01:23.045123456Z". + DateTime string `json:"dateTime,omitempty"` + // ExtraComputations: Optional. Additional features that can be optionally + // enabled. Specifying extra computations will result in the relevant elements + // and fields to be returned in the response. + // + // Possible values: + // "EXTRA_COMPUTATION_UNSPECIFIED" - The default value. The server ignores it + // if it is passed as a parameter. + // "LOCAL_AQI" - Determines whether to include the local (national) AQI of + // the requested location (country) in the response. If specified, the response + // will contain an 'air_quality_index' data structure with all the relevant + // data on the location's local AQI. + // "HEALTH_RECOMMENDATIONS" - Determines whether the response will include + // the health advice and recommended actions for the current AQI conditions. + // The recommendations are tailored for the general population and six + // populations at risk groups with greater sensitivities to pollutants than the + // general population. If specified, the `health_recommendations` field will be + // populated in the response when the relevant data is available. + // "POLLUTANT_ADDITIONAL_INFO" - Determines whether to include in the + // response the additional information of each pollutant. If specified, each + // air quality index object contained in the 'indexes' field response will + // include an `additional_info` field when the data is available. + // "DOMINANT_POLLUTANT_CONCENTRATION" - Determines whether the response would + // include the concentrations of the dominant pollutants measured according to + // global and/or local indexes. If the request specified both the global AQI + // and the local AQI, there may be up to two pollutant codes returned. If + // specified, the dominant pollutant object contained in the 'pollutants' list + // will include a `concentration` field when the data is available. + // "POLLUTANT_CONCENTRATION" - Determines whether the response would include + // the concentrations of all pollutants with available measurements according + // to global and/or local indexes. If specified, each pollutant object + // contained in the 'pollutants' field in the response will include a + // `concentration` field when the data is available. + ExtraComputations []string `json:"extraComputations,omitempty"` + // Hours: Number from 1 to 720 that indicates the hours range for the request. + // For example: A value of 48 will yield data from the last 48 hours. + Hours int64 `json:"hours,omitempty"` + // LanguageCode: Optional. Allows the client to choose the language for the + // response. If data cannot be provided for that language the API uses the + // closest match. Allowed values rely on the IETF standard. Default value is + // en. + LanguageCode string `json:"languageCode,omitempty"` + // Location: Required. The latitude and longitude for which the API looks for + // air quality history data. + Location *LatLng `json:"location,omitempty"` + // PageSize: Optional. The maximum number of hourly info records to return per + // page. The default is 72 and the max value is 168 (7 days of data). + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: Optional. A page token received from a previous history call. It + // is used to retrieve the subsequent page. Note that when providing a value + // for this parameter all other parameters provided must match the call that + // provided the page token (the previous call). + PageToken string `json:"pageToken,omitempty"` + // Period: Indicates the start and end period for which to get the historical + // data. The timestamp is rounded to the previous exact hour. + Period *Interval `json:"period,omitempty"` + // UaqiColorPalette: Optional. Determines the color palette used for data + // provided by the 'Universal Air Quality Index' (UAQI). This color palette is + // relevant just for UAQI, other AQIs have a predetermined color palette that + // can't be controlled. + // + // Possible values: + // "COLOR_PALETTE_UNSPECIFIED" - The default value. Ignored if passed as a + // parameter. + // "RED_GREEN" - Determines whether to use a red/green palette. + // "INDIGO_PERSIAN_DARK" - Determines whether to use a indigo/persian palette + // (dark theme). + // "INDIGO_PERSIAN_LIGHT" - Determines whether to use a indigo/persian + // palette (light theme). + UaqiColorPalette string `json:"uaqiColorPalette,omitempty"` + // UniversalAqi: Optional. If set to true, the Universal AQI will be included + // in the 'indexes' field of the response. Default value is true. + UniversalAqi bool `json:"universalAqi,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomLocalAqis") 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. "CustomLocalAqis") 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 *LookupHistoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod LookupHistoryRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type LookupHistoryResponse struct { + // HoursInfo: Optional. Contains the air quality information for each hour in + // the requested range. For example, if the request is for 48 hours of history + // there will be 48 elements of hourly info. + HoursInfo []*HourInfo `json:"hoursInfo,omitempty"` + // NextPageToken: Optional. The token to retrieve the next page. + NextPageToken string `json:"nextPageToken,omitempty"` + // RegionCode: Optional. The ISO_3166-1 alpha-2 code of the country/region + // corresponding to the location provided in the request. This field might be + // omitted from the response if the location provided in the request resides in + // a disputed territory. + RegionCode string `json:"regionCode,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "HoursInfo") 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. "HoursInfo") 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 *LookupHistoryResponse) MarshalJSON() ([]byte, error) { + type NoMethod LookupHistoryResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// Pollutant: Data regarding an air quality pollutant. +type Pollutant struct { + // AdditionalInfo: Additional information about the pollutant. + AdditionalInfo *AdditionalInfo `json:"additionalInfo,omitempty"` + // Code: The pollutant's code name. For example: "so2". A list of all available + // codes could be found here + // (/maps/documentation/air-quality/pollutants#reported_pollutants). + Code string `json:"code,omitempty"` + // Concentration: The pollutant's concentration level measured by one of the + // standard air pollutation measure units. + Concentration *Concentration `json:"concentration,omitempty"` + // DisplayName: The pollutant's display name. For example: "NOx". + DisplayName string `json:"displayName,omitempty"` + // FullName: The pollutant's full name. For chemical compounds, this is the + // IUPAC name. Example: "Sulfur Dioxide". For more information about the IUPAC + // names table, see https://iupac.org/what-we-do/periodic-table-of-elements/ + FullName string `json:"fullName,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalInfo") 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. "AdditionalInfo") 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 *Pollutant) MarshalJSON() ([]byte, error) { + type NoMethod Pollutant + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type CurrentConditionsLookupCall struct { + s *Service + lookupcurrentconditionsrequest *LookupCurrentConditionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Lookup: The Current Conditions endpoint provides hourly air quality +// information in more than 100 countries, up to a 500 x 500 meters resolution. +// Includes over 70 local indexes and global air quality index and categories. +func (r *CurrentConditionsService) Lookup(lookupcurrentconditionsrequest *LookupCurrentConditionsRequest) *CurrentConditionsLookupCall { + c := &CurrentConditionsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.lookupcurrentconditionsrequest = lookupcurrentconditionsrequest + 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 *CurrentConditionsLookupCall) Fields(s ...googleapi.Field) *CurrentConditionsLookupCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *CurrentConditionsLookupCall) Context(ctx context.Context) *CurrentConditionsLookupCall { + 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 *CurrentConditionsLookupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CurrentConditionsLookupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookupcurrentconditionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/currentConditions:lookup") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "airquality.currentConditions.lookup" call. +// Any non-2xx status code is an error. Response headers are in either +// *LookupCurrentConditionsResponse.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 *CurrentConditionsLookupCall) Do(opts ...googleapi.CallOption) (*LookupCurrentConditionsResponse, 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 := &LookupCurrentConditionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ForecastLookupCall struct { + s *Service + lookupforecastrequest *LookupForecastRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Lookup: Returns air quality forecast for a specific location for a given +// time range. +func (r *ForecastService) Lookup(lookupforecastrequest *LookupForecastRequest) *ForecastLookupCall { + c := &ForecastLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.lookupforecastrequest = lookupforecastrequest + 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 *ForecastLookupCall) Fields(s ...googleapi.Field) *ForecastLookupCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ForecastLookupCall) Context(ctx context.Context) *ForecastLookupCall { + 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 *ForecastLookupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ForecastLookupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookupforecastrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forecast:lookup") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "airquality.forecast.lookup" call. +// Any non-2xx status code is an error. Response headers are in either +// *LookupForecastResponse.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 *ForecastLookupCall) Do(opts ...googleapi.CallOption) (*LookupForecastResponse, 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 := &LookupForecastResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ForecastLookupCall) Pages(ctx context.Context, f func(*LookupForecastResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.lookupforecastrequest.PageToken = pt }(c.lookupforecastrequest.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.lookupforecastrequest.PageToken = x.NextPageToken + } +} + +type HistoryLookupCall struct { + s *Service + lookuphistoryrequest *LookupHistoryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Lookup: Returns air quality history for a specific location for a given time +// range. +func (r *HistoryService) Lookup(lookuphistoryrequest *LookupHistoryRequest) *HistoryLookupCall { + c := &HistoryLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.lookuphistoryrequest = lookuphistoryrequest + 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 *HistoryLookupCall) Fields(s ...googleapi.Field) *HistoryLookupCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *HistoryLookupCall) Context(ctx context.Context) *HistoryLookupCall { + 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 *HistoryLookupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *HistoryLookupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookuphistoryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/history:lookup") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "airquality.history.lookup" call. +// Any non-2xx status code is an error. Response headers are in either +// *LookupHistoryResponse.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 *HistoryLookupCall) Do(opts ...googleapi.CallOption) (*LookupHistoryResponse, 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 := &LookupHistoryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *HistoryLookupCall) Pages(ctx context.Context, f func(*LookupHistoryResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.lookuphistoryrequest.PageToken = pt }(c.lookuphistoryrequest.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.lookuphistoryrequest.PageToken = x.NextPageToken + } +} + +type MapTypesHeatmapTilesLookupHeatmapTileCall struct { + s *Service + mapType string + zoom int64 + x int64 + y int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// LookupHeatmapTile: Returns a bytes array containing the data of the tile PNG +// image. +// +// - mapType: The type of the air quality heatmap. Defines the pollutant that +// the map will graphically represent. Allowed values: - UAQI_RED_GREEN +// (UAQI, red-green palette) - UAQI_INDIGO_PERSIAN (UAQI, indigo-persian +// palette) - PM25_INDIGO_PERSIAN - GBR_DEFRA - DEU_UBA - CAN_EC - FRA_ATMO - +// US_AQI. +// - x: Defines the east-west point in the requested tile. +// - y: Defines the north-south point in the requested tile. +// - zoom: The map's zoom level. Defines how large or small the contents of a +// map appear in a map view. Zoom level 0 is the entire world in a single +// tile. Zoom level 1 is the entire world in 4 tiles. Zoom level 2 is the +// entire world in 16 tiles. Zoom level 16 is the entire world in 65,536 +// tiles. Allowed values: 0-16. +func (r *MapTypesHeatmapTilesService) LookupHeatmapTile(mapType string, zoom int64, x int64, y int64) *MapTypesHeatmapTilesLookupHeatmapTileCall { + c := &MapTypesHeatmapTilesLookupHeatmapTileCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.mapType = mapType + c.zoom = zoom + c.x = x + c.y = y + 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 *MapTypesHeatmapTilesLookupHeatmapTileCall) Fields(s ...googleapi.Field) *MapTypesHeatmapTilesLookupHeatmapTileCall { + 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 *MapTypesHeatmapTilesLookupHeatmapTileCall) IfNoneMatch(entityTag string) *MapTypesHeatmapTilesLookupHeatmapTileCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *MapTypesHeatmapTilesLookupHeatmapTileCall) Context(ctx context.Context) *MapTypesHeatmapTilesLookupHeatmapTileCall { + 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 *MapTypesHeatmapTilesLookupHeatmapTileCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MapTypesHeatmapTilesLookupHeatmapTileCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "mapType": c.mapType, + "zoom": strconv.FormatInt(c.zoom, 10), + "x": strconv.FormatInt(c.x, 10), + "y": strconv.FormatInt(c.y, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "airquality.mapTypes.heatmapTiles.lookupHeatmapTile" call. +// Any non-2xx status code is an error. Response headers are in either +// *HttpBody.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 *MapTypesHeatmapTilesLookupHeatmapTileCall) Do(opts ...googleapi.CallOption) (*HttpBody, 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 := &HttpBody{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json index 222f79bb270..6d8f38240d2 100644 --- a/alloydb/v1/alloydb-api.json +++ b/alloydb/v1/alloydb-api.json @@ -1461,7 +1461,7 @@ } } }, - "revision": "20240517", + "revision": "20240529", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -3375,9 +3375,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -3503,6 +3511,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -3521,9 +3537,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -3787,14 +3811,6 @@ "userLabelSet": { "$ref": "StorageDatabasecenterPartnerapiV1mainUserLabels", "description": "User-provided labels associated with the resource" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "deprecated": true, - "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", - "type": "object" } }, "type": "object" @@ -3870,9 +3886,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -3998,6 +4022,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -4016,9 +4048,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -4116,12 +4156,12 @@ "id": "StorageDatabasecenterPartnerapiV1mainMachineConfiguration", "properties": { "cpuCount": { - "description": "The number of CPUs.", + "description": "The number of CPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", "format": "int32", "type": "integer" }, "memorySizeInBytes": { - "description": "Memory size in bytes.", + "description": "Memory size in bytes. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", "format": "int64", "type": "string" } @@ -4131,31 +4171,46 @@ "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData": { "id": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData", "properties": { - "metricTimestamp": { - "description": "Required. The timestamp of the metric value.", - "format": "google-datetime", + "aggregationType": { + "description": "Required. Type of aggregation performed on the metric.", + "enum": [ + "AGGREGATION_TYPE_UNSPECIFIED", + "MAXIMUM" + ], + "enumDescriptions": [ + "Unspecified aggregation type.", + "Maximum aggregation type." + ], "type": "string" }, "metricType": { "description": "Required. Type of metric like CPU, Memory, etc.", "enum": [ "METRIC_TYPE_UNSPECIFIED", - "INSTANCE_PEAK_CPU_UTILISATION" + "CPU_UTILIZATION", + "MEMORY_UTILIZATION", + "NETWORK_CONNECTIONS" ], "enumDescriptions": [ - "", - "Peak CPU utilization for a DB instance as a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases) List will keep increasing, e.g. PEAK_MEMORY_UTILISATION, NUMBER_OF_CONNECTIONS, SUCCESS_RATIO_FOR_QUERIES, etc." + "Unspecified metric type.", + "CPU utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Memory utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Number of network connections for a resource." ], "type": "string" }, + "observationTime": { + "description": "Required. The time the metric value was observed.", + "format": "google-datetime", + "type": "string" + }, "resourceName": { "description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", "type": "string" }, "value": { - "description": "Required. Value of the metric type.", - "format": "double", - "type": "number" + "$ref": "StorageDatabasecenterProtoCommonTypedValue", + "description": "Required. Value of the metric type." } }, "type": "object" @@ -4345,6 +4400,31 @@ }, "type": "object" }, + "StorageDatabasecenterProtoCommonTypedValue": { + "description": "TypedValue represents the value of a metric type. It can either be a double, an int64, a string or a bool.", + "id": "StorageDatabasecenterProtoCommonTypedValue", + "properties": { + "boolValue": { + "description": "For boolean value", + "type": "boolean" + }, + "doubleValue": { + "description": "For double value", + "format": "double", + "type": "number" + }, + "int64Value": { + "description": "For integer value", + "format": "int64", + "type": "string" + }, + "stringValue": { + "description": "For string value", + "type": "string" + } + }, + "type": "object" + }, "StringRestrictions": { "description": "Restrictions on STRING type values", "id": "StringRestrictions", diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go index 4f4735d2344..1c0a721a636 100644 --- a/alloydb/v1/alloydb-gen.go +++ b/alloydb/v1/alloydb-gen.go @@ -2486,12 +2486,27 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -2780,9 +2795,6 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { UpdationTime string `json:"updationTime,omitempty"` // UserLabelSet: User-provided labels associated with the resource UserLabelSet *StorageDatabasecenterPartnerapiV1mainUserLabels `json:"userLabelSet,omitempty"` - // UserLabels: User-provided labels, represented as a dictionary where each - // label is a single key value pair. - UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. "AvailabilityConfiguration") // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2885,12 +2897,27 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalDa // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -3080,9 +3107,11 @@ func (s *StorageDatabasecenterPartnerapiV1mainEntitlement) MarshalJSON() ([]byte // MachineConfiguration describes the configuration of a machine specific to // Database Resource. type StorageDatabasecenterPartnerapiV1mainMachineConfiguration struct { - // CpuCount: The number of CPUs. + // CpuCount: The number of CPUs. TODO(b/342344482, b/342346271) add proto + // validations again after bug fix. CpuCount int64 `json:"cpuCount,omitempty"` - // MemorySizeInBytes: Memory size in bytes. + // MemorySizeInBytes: Memory size in bytes. TODO(b/342344482, b/342346271) add + // proto validations again after bug fix. MemorySizeInBytes int64 `json:"memorySizeInBytes,omitempty,string"` // ForceSendFields is a list of field names (e.g. "CpuCount") to // unconditionally include in API requests. By default, fields with empty or @@ -3103,30 +3132,37 @@ func (s *StorageDatabasecenterPartnerapiV1mainMachineConfiguration) MarshalJSON( } type StorageDatabasecenterPartnerapiV1mainObservabilityMetricData struct { - // MetricTimestamp: Required. The timestamp of the metric value. - MetricTimestamp string `json:"metricTimestamp,omitempty"` + // AggregationType: Required. Type of aggregation performed on the metric. + // + // Possible values: + // "AGGREGATION_TYPE_UNSPECIFIED" - Unspecified aggregation type. + // "MAXIMUM" - Maximum aggregation type. + AggregationType string `json:"aggregationType,omitempty"` // MetricType: Required. Type of metric like CPU, Memory, etc. // // Possible values: - // "METRIC_TYPE_UNSPECIFIED" - // "INSTANCE_PEAK_CPU_UTILISATION" - Peak CPU utilization for a DB instance - // as a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases) - // List will keep increasing, e.g. PEAK_MEMORY_UTILISATION, - // NUMBER_OF_CONNECTIONS, SUCCESS_RATIO_FOR_QUERIES, etc. + // "METRIC_TYPE_UNSPECIFIED" - Unspecified metric type. + // "CPU_UTILIZATION" - CPU utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "MEMORY_UTILIZATION" - Memory utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "NETWORK_CONNECTIONS" - Number of network connections for a resource. MetricType string `json:"metricType,omitempty"` + // ObservationTime: Required. The time the metric value was observed. + ObservationTime string `json:"observationTime,omitempty"` // ResourceName: Required. Database resource name associated with the signal. // Resource name to follow CAIS resource_name format as noted here // go/condor-common-datamodel ResourceName string `json:"resourceName,omitempty"` // Value: Required. Value of the metric type. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetricTimestamp") to + Value *StorageDatabasecenterProtoCommonTypedValue `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregationType") 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. "MetricTimestamp") to include in + // NullFields is a list of field names (e.g. "AggregationType") 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. @@ -3138,20 +3174,6 @@ func (s *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData) MarshalJS return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData) UnmarshalJSON(data []byte) error { - type NoMethod StorageDatabasecenterPartnerapiV1mainObservabilityMetricData - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - // StorageDatabasecenterPartnerapiV1mainOperationError: An error that occurred // during a backup creation operation. type StorageDatabasecenterPartnerapiV1mainOperationError struct { @@ -3312,6 +3334,49 @@ func (s *StorageDatabasecenterProtoCommonProduct) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterProtoCommonTypedValue: TypedValue represents the value +// of a metric type. It can either be a double, an int64, a string or a bool. +type StorageDatabasecenterProtoCommonTypedValue struct { + // BoolValue: For boolean value + BoolValue bool `json:"boolValue,omitempty"` + // DoubleValue: For double value + DoubleValue float64 `json:"doubleValue,omitempty"` + // Int64Value: For integer value + Int64Value int64 `json:"int64Value,omitempty,string"` + // StringValue: For string value + StringValue string `json:"stringValue,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 *StorageDatabasecenterProtoCommonTypedValue) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterProtoCommonTypedValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *StorageDatabasecenterProtoCommonTypedValue) UnmarshalJSON(data []byte) error { + type NoMethod StorageDatabasecenterProtoCommonTypedValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} + // StringRestrictions: Restrictions on STRING type values type StringRestrictions struct { // AllowedValues: The list of allowed values, if bounded. This field will be diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json index 523a9cb1198..8aaf75f0125 100644 --- a/alloydb/v1alpha/alloydb-api.json +++ b/alloydb/v1alpha/alloydb-api.json @@ -1461,7 +1461,7 @@ } } }, - "revision": "20240517", + "revision": "20240529", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -3498,9 +3498,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -3626,6 +3634,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -3644,9 +3660,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -3910,14 +3934,6 @@ "userLabelSet": { "$ref": "StorageDatabasecenterPartnerapiV1mainUserLabels", "description": "User-provided labels associated with the resource" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "deprecated": true, - "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", - "type": "object" } }, "type": "object" @@ -3993,9 +4009,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -4121,6 +4145,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -4139,9 +4171,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -4239,12 +4279,12 @@ "id": "StorageDatabasecenterPartnerapiV1mainMachineConfiguration", "properties": { "cpuCount": { - "description": "The number of CPUs.", + "description": "The number of CPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", "format": "int32", "type": "integer" }, "memorySizeInBytes": { - "description": "Memory size in bytes.", + "description": "Memory size in bytes. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", "format": "int64", "type": "string" } @@ -4254,31 +4294,46 @@ "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData": { "id": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData", "properties": { - "metricTimestamp": { - "description": "Required. The timestamp of the metric value.", - "format": "google-datetime", + "aggregationType": { + "description": "Required. Type of aggregation performed on the metric.", + "enum": [ + "AGGREGATION_TYPE_UNSPECIFIED", + "MAXIMUM" + ], + "enumDescriptions": [ + "Unspecified aggregation type.", + "Maximum aggregation type." + ], "type": "string" }, "metricType": { "description": "Required. Type of metric like CPU, Memory, etc.", "enum": [ "METRIC_TYPE_UNSPECIFIED", - "INSTANCE_PEAK_CPU_UTILISATION" + "CPU_UTILIZATION", + "MEMORY_UTILIZATION", + "NETWORK_CONNECTIONS" ], "enumDescriptions": [ - "", - "Peak CPU utilization for a DB instance as a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases) List will keep increasing, e.g. PEAK_MEMORY_UTILISATION, NUMBER_OF_CONNECTIONS, SUCCESS_RATIO_FOR_QUERIES, etc." + "Unspecified metric type.", + "CPU utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Memory utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Number of network connections for a resource." ], "type": "string" }, + "observationTime": { + "description": "Required. The time the metric value was observed.", + "format": "google-datetime", + "type": "string" + }, "resourceName": { "description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", "type": "string" }, "value": { - "description": "Required. Value of the metric type.", - "format": "double", - "type": "number" + "$ref": "StorageDatabasecenterProtoCommonTypedValue", + "description": "Required. Value of the metric type." } }, "type": "object" @@ -4468,6 +4523,31 @@ }, "type": "object" }, + "StorageDatabasecenterProtoCommonTypedValue": { + "description": "TypedValue represents the value of a metric type. It can either be a double, an int64, a string or a bool.", + "id": "StorageDatabasecenterProtoCommonTypedValue", + "properties": { + "boolValue": { + "description": "For boolean value", + "type": "boolean" + }, + "doubleValue": { + "description": "For double value", + "format": "double", + "type": "number" + }, + "int64Value": { + "description": "For integer value", + "format": "int64", + "type": "string" + }, + "stringValue": { + "description": "For string value", + "type": "string" + } + }, + "type": "object" + }, "StringRestrictions": { "description": "Restrictions on STRING type values", "id": "StringRestrictions", diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go index bf3d064045d..2137b4ad68f 100644 --- a/alloydb/v1alpha/alloydb-gen.go +++ b/alloydb/v1alpha/alloydb-gen.go @@ -2617,12 +2617,27 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -2911,9 +2926,6 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { UpdationTime string `json:"updationTime,omitempty"` // UserLabelSet: User-provided labels associated with the resource UserLabelSet *StorageDatabasecenterPartnerapiV1mainUserLabels `json:"userLabelSet,omitempty"` - // UserLabels: User-provided labels, represented as a dictionary where each - // label is a single key value pair. - UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. "AvailabilityConfiguration") // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3016,12 +3028,27 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalDa // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -3211,9 +3238,11 @@ func (s *StorageDatabasecenterPartnerapiV1mainEntitlement) MarshalJSON() ([]byte // MachineConfiguration describes the configuration of a machine specific to // Database Resource. type StorageDatabasecenterPartnerapiV1mainMachineConfiguration struct { - // CpuCount: The number of CPUs. + // CpuCount: The number of CPUs. TODO(b/342344482, b/342346271) add proto + // validations again after bug fix. CpuCount int64 `json:"cpuCount,omitempty"` - // MemorySizeInBytes: Memory size in bytes. + // MemorySizeInBytes: Memory size in bytes. TODO(b/342344482, b/342346271) add + // proto validations again after bug fix. MemorySizeInBytes int64 `json:"memorySizeInBytes,omitempty,string"` // ForceSendFields is a list of field names (e.g. "CpuCount") to // unconditionally include in API requests. By default, fields with empty or @@ -3234,30 +3263,37 @@ func (s *StorageDatabasecenterPartnerapiV1mainMachineConfiguration) MarshalJSON( } type StorageDatabasecenterPartnerapiV1mainObservabilityMetricData struct { - // MetricTimestamp: Required. The timestamp of the metric value. - MetricTimestamp string `json:"metricTimestamp,omitempty"` + // AggregationType: Required. Type of aggregation performed on the metric. + // + // Possible values: + // "AGGREGATION_TYPE_UNSPECIFIED" - Unspecified aggregation type. + // "MAXIMUM" - Maximum aggregation type. + AggregationType string `json:"aggregationType,omitempty"` // MetricType: Required. Type of metric like CPU, Memory, etc. // // Possible values: - // "METRIC_TYPE_UNSPECIFIED" - // "INSTANCE_PEAK_CPU_UTILISATION" - Peak CPU utilization for a DB instance - // as a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases) - // List will keep increasing, e.g. PEAK_MEMORY_UTILISATION, - // NUMBER_OF_CONNECTIONS, SUCCESS_RATIO_FOR_QUERIES, etc. + // "METRIC_TYPE_UNSPECIFIED" - Unspecified metric type. + // "CPU_UTILIZATION" - CPU utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "MEMORY_UTILIZATION" - Memory utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "NETWORK_CONNECTIONS" - Number of network connections for a resource. MetricType string `json:"metricType,omitempty"` + // ObservationTime: Required. The time the metric value was observed. + ObservationTime string `json:"observationTime,omitempty"` // ResourceName: Required. Database resource name associated with the signal. // Resource name to follow CAIS resource_name format as noted here // go/condor-common-datamodel ResourceName string `json:"resourceName,omitempty"` // Value: Required. Value of the metric type. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetricTimestamp") to + Value *StorageDatabasecenterProtoCommonTypedValue `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregationType") 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. "MetricTimestamp") to include in + // NullFields is a list of field names (e.g. "AggregationType") 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. @@ -3269,20 +3305,6 @@ func (s *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData) MarshalJS return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData) UnmarshalJSON(data []byte) error { - type NoMethod StorageDatabasecenterPartnerapiV1mainObservabilityMetricData - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - // StorageDatabasecenterPartnerapiV1mainOperationError: An error that occurred // during a backup creation operation. type StorageDatabasecenterPartnerapiV1mainOperationError struct { @@ -3443,6 +3465,49 @@ func (s *StorageDatabasecenterProtoCommonProduct) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterProtoCommonTypedValue: TypedValue represents the value +// of a metric type. It can either be a double, an int64, a string or a bool. +type StorageDatabasecenterProtoCommonTypedValue struct { + // BoolValue: For boolean value + BoolValue bool `json:"boolValue,omitempty"` + // DoubleValue: For double value + DoubleValue float64 `json:"doubleValue,omitempty"` + // Int64Value: For integer value + Int64Value int64 `json:"int64Value,omitempty,string"` + // StringValue: For string value + StringValue string `json:"stringValue,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 *StorageDatabasecenterProtoCommonTypedValue) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterProtoCommonTypedValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *StorageDatabasecenterProtoCommonTypedValue) UnmarshalJSON(data []byte) error { + type NoMethod StorageDatabasecenterProtoCommonTypedValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} + // StringRestrictions: Restrictions on STRING type values type StringRestrictions struct { // AllowedValues: The list of allowed values, if bounded. This field will be diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index d512a77d77d..c32bf3244c2 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -1458,7 +1458,7 @@ } } }, - "revision": "20240517", + "revision": "20240529", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -3474,9 +3474,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -3602,6 +3610,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -3620,9 +3636,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -3886,14 +3910,6 @@ "userLabelSet": { "$ref": "StorageDatabasecenterPartnerapiV1mainUserLabels", "description": "User-provided labels associated with the resource" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "deprecated": true, - "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", - "type": "object" } }, "type": "object" @@ -3969,9 +3985,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -4097,6 +4121,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -4115,9 +4147,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -4215,12 +4255,12 @@ "id": "StorageDatabasecenterPartnerapiV1mainMachineConfiguration", "properties": { "cpuCount": { - "description": "The number of CPUs.", + "description": "The number of CPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", "format": "int32", "type": "integer" }, "memorySizeInBytes": { - "description": "Memory size in bytes.", + "description": "Memory size in bytes. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", "format": "int64", "type": "string" } @@ -4230,31 +4270,46 @@ "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData": { "id": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData", "properties": { - "metricTimestamp": { - "description": "Required. The timestamp of the metric value.", - "format": "google-datetime", + "aggregationType": { + "description": "Required. Type of aggregation performed on the metric.", + "enum": [ + "AGGREGATION_TYPE_UNSPECIFIED", + "MAXIMUM" + ], + "enumDescriptions": [ + "Unspecified aggregation type.", + "Maximum aggregation type." + ], "type": "string" }, "metricType": { "description": "Required. Type of metric like CPU, Memory, etc.", "enum": [ "METRIC_TYPE_UNSPECIFIED", - "INSTANCE_PEAK_CPU_UTILISATION" + "CPU_UTILIZATION", + "MEMORY_UTILIZATION", + "NETWORK_CONNECTIONS" ], "enumDescriptions": [ - "", - "Peak CPU utilization for a DB instance as a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases) List will keep increasing, e.g. PEAK_MEMORY_UTILISATION, NUMBER_OF_CONNECTIONS, SUCCESS_RATIO_FOR_QUERIES, etc." + "Unspecified metric type.", + "CPU utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Memory utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Number of network connections for a resource." ], "type": "string" }, + "observationTime": { + "description": "Required. The time the metric value was observed.", + "format": "google-datetime", + "type": "string" + }, "resourceName": { "description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", "type": "string" }, "value": { - "description": "Required. Value of the metric type.", - "format": "double", - "type": "number" + "$ref": "StorageDatabasecenterProtoCommonTypedValue", + "description": "Required. Value of the metric type." } }, "type": "object" @@ -4444,6 +4499,31 @@ }, "type": "object" }, + "StorageDatabasecenterProtoCommonTypedValue": { + "description": "TypedValue represents the value of a metric type. It can either be a double, an int64, a string or a bool.", + "id": "StorageDatabasecenterProtoCommonTypedValue", + "properties": { + "boolValue": { + "description": "For boolean value", + "type": "boolean" + }, + "doubleValue": { + "description": "For double value", + "format": "double", + "type": "number" + }, + "int64Value": { + "description": "For integer value", + "format": "int64", + "type": "string" + }, + "stringValue": { + "description": "For string value", + "type": "string" + } + }, + "type": "object" + }, "StringRestrictions": { "description": "Restrictions on STRING type values", "id": "StringRestrictions", diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index 3300f6d8281..45d5c236c0a 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -2607,12 +2607,27 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -2901,9 +2916,6 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { UpdationTime string `json:"updationTime,omitempty"` // UserLabelSet: User-provided labels associated with the resource UserLabelSet *StorageDatabasecenterPartnerapiV1mainUserLabels `json:"userLabelSet,omitempty"` - // UserLabels: User-provided labels, represented as a dictionary where each - // label is a single key value pair. - UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. "AvailabilityConfiguration") // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3006,12 +3018,27 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalDa // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -3201,9 +3228,11 @@ func (s *StorageDatabasecenterPartnerapiV1mainEntitlement) MarshalJSON() ([]byte // MachineConfiguration describes the configuration of a machine specific to // Database Resource. type StorageDatabasecenterPartnerapiV1mainMachineConfiguration struct { - // CpuCount: The number of CPUs. + // CpuCount: The number of CPUs. TODO(b/342344482, b/342346271) add proto + // validations again after bug fix. CpuCount int64 `json:"cpuCount,omitempty"` - // MemorySizeInBytes: Memory size in bytes. + // MemorySizeInBytes: Memory size in bytes. TODO(b/342344482, b/342346271) add + // proto validations again after bug fix. MemorySizeInBytes int64 `json:"memorySizeInBytes,omitempty,string"` // ForceSendFields is a list of field names (e.g. "CpuCount") to // unconditionally include in API requests. By default, fields with empty or @@ -3224,30 +3253,37 @@ func (s *StorageDatabasecenterPartnerapiV1mainMachineConfiguration) MarshalJSON( } type StorageDatabasecenterPartnerapiV1mainObservabilityMetricData struct { - // MetricTimestamp: Required. The timestamp of the metric value. - MetricTimestamp string `json:"metricTimestamp,omitempty"` + // AggregationType: Required. Type of aggregation performed on the metric. + // + // Possible values: + // "AGGREGATION_TYPE_UNSPECIFIED" - Unspecified aggregation type. + // "MAXIMUM" - Maximum aggregation type. + AggregationType string `json:"aggregationType,omitempty"` // MetricType: Required. Type of metric like CPU, Memory, etc. // // Possible values: - // "METRIC_TYPE_UNSPECIFIED" - // "INSTANCE_PEAK_CPU_UTILISATION" - Peak CPU utilization for a DB instance - // as a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases) - // List will keep increasing, e.g. PEAK_MEMORY_UTILISATION, - // NUMBER_OF_CONNECTIONS, SUCCESS_RATIO_FOR_QUERIES, etc. + // "METRIC_TYPE_UNSPECIFIED" - Unspecified metric type. + // "CPU_UTILIZATION" - CPU utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "MEMORY_UTILIZATION" - Memory utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "NETWORK_CONNECTIONS" - Number of network connections for a resource. MetricType string `json:"metricType,omitempty"` + // ObservationTime: Required. The time the metric value was observed. + ObservationTime string `json:"observationTime,omitempty"` // ResourceName: Required. Database resource name associated with the signal. // Resource name to follow CAIS resource_name format as noted here // go/condor-common-datamodel ResourceName string `json:"resourceName,omitempty"` // Value: Required. Value of the metric type. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetricTimestamp") to + Value *StorageDatabasecenterProtoCommonTypedValue `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregationType") 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. "MetricTimestamp") to include in + // NullFields is a list of field names (e.g. "AggregationType") 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. @@ -3259,20 +3295,6 @@ func (s *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData) MarshalJS return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData) UnmarshalJSON(data []byte) error { - type NoMethod StorageDatabasecenterPartnerapiV1mainObservabilityMetricData - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - // StorageDatabasecenterPartnerapiV1mainOperationError: An error that occurred // during a backup creation operation. type StorageDatabasecenterPartnerapiV1mainOperationError struct { @@ -3433,6 +3455,49 @@ func (s *StorageDatabasecenterProtoCommonProduct) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterProtoCommonTypedValue: TypedValue represents the value +// of a metric type. It can either be a double, an int64, a string or a bool. +type StorageDatabasecenterProtoCommonTypedValue struct { + // BoolValue: For boolean value + BoolValue bool `json:"boolValue,omitempty"` + // DoubleValue: For double value + DoubleValue float64 `json:"doubleValue,omitempty"` + // Int64Value: For integer value + Int64Value int64 `json:"int64Value,omitempty,string"` + // StringValue: For string value + StringValue string `json:"stringValue,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 *StorageDatabasecenterProtoCommonTypedValue) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterProtoCommonTypedValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *StorageDatabasecenterProtoCommonTypedValue) UnmarshalJSON(data []byte) error { + type NoMethod StorageDatabasecenterProtoCommonTypedValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} + // StringRestrictions: Restrictions on STRING type values type StringRestrictions struct { // AllowedValues: The list of allowed values, if bounded. This field will be diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 299e3cec519..275aec20b37 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -638,7 +638,7 @@ ] }, "get": { - "description": "Gets an active, unexpired enrollment token. Only a partial view of EnrollmentToken is returned: all the fields but name and expiration_timestamp are empty. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to delete active enrollment tokens as soon as they're not intended to be used anymore.", + "description": "Gets an active, unexpired enrollment token. A partial view of the enrollment token is returned. Only the following fields are populated: name, expirationTimestamp, allowPersonalUsage, value, qrCode. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to delete active enrollment tokens as soon as they're not intended to be used anymore.", "flatPath": "v1/enterprises/{enterprisesId}/enrollmentTokens/{enrollmentTokensId}", "httpMethod": "GET", "id": "androidmanagement.enterprises.enrollmentTokens.get", @@ -663,7 +663,7 @@ ] }, "list": { - "description": "Lists active, unexpired enrollment tokens for a given enterprise. The list items contain only a partial view of EnrollmentToken: all the fields but name and expiration_timestamp are empty. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to delete active enrollment tokens as soon as they're not intended to be used anymore.", + "description": "Lists active, unexpired enrollment tokens for a given enterprise. The list items contain only a partial view of EnrollmentToken object. Only the following fields are populated: name, expirationTimestamp, allowPersonalUsage, value, qrCode. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to delete active enrollment tokens as soon as they're not intended to be used anymore.", "flatPath": "v1/enterprises/{enterprisesId}/enrollmentTokens", "httpMethod": "GET", "id": "androidmanagement.enterprises.enrollmentTokens.list", @@ -1168,7 +1168,7 @@ } } }, - "revision": "20240531", + "revision": "20240612", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -1659,7 +1659,7 @@ "Unspecified. Defaults to AUTO_UPDATE_DEFAULT.", "The default update mode.The app is automatically updated with low priority to minimize the impact on the user.The app is updated when all of the following constraints are met: The device is not actively used. The device is connected to an unmetered network. The device is charging. The app to be updated is not running in the foreground.The device is notified about a new update within 24 hours after it is published by the developer, after which the app is updated the next time the constraints above are met.", "The app is not automatically updated for a maximum of 90 days after the app becomes out of date.90 days after the app becomes out of date, the latest available version is installed automatically with low priority (see AUTO_UPDATE_DEFAULT). After the app is updated it is not automatically updated again until 90 days after it becomes out of date again.The user can still manually update the app from the Play Store at any time.", - "The app is updated as soon as possible. No constraints are applied.The device is notified as soon as possible about a new update after it becomes available." + "The app is updated as soon as possible. No constraints are applied.The device is notified as soon as possible about a new update after it becomes available.*NOTE:* Updates to apps with larger deployments across Android's ecosystem can take up to 24h." ], "type": "string" }, @@ -5498,6 +5498,10 @@ "format": "int32", "type": "integer" }, + "authenticatedUserEmail": { + "description": "The email address of the authenticated user (only present for Google Account provisioning method).", + "type": "string" + }, "brand": { "description": "The brand of the device. For example, Google.", "type": "string" diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 14d1a3540e8..35cb5e56acc 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -809,7 +809,8 @@ type ApplicationPolicy struct { // time. // "AUTO_UPDATE_HIGH_PRIORITY" - The app is updated as soon as possible. No // constraints are applied.The device is notified as soon as possible about a - // new update after it becomes available. + // new update after it becomes available.*NOTE:* Updates to apps with larger + // deployments across Android's ecosystem can take up to 24h. AutoUpdateMode string `json:"autoUpdateMode,omitempty"` // ConnectedWorkAndPersonalApp: Controls whether the app can communicate with // itself across a device’s work and personal profiles, subject to user @@ -5316,6 +5317,9 @@ type ProvisioningInfo struct { // ApiLevel: The API level of the Android platform version running on the // device. ApiLevel int64 `json:"apiLevel,omitempty"` + // AuthenticatedUserEmail: The email address of the authenticated user (only + // present for Google Account provisioning method). + AuthenticatedUserEmail string `json:"authenticatedUserEmail,omitempty"` // Brand: The brand of the device. For example, Google. Brand string `json:"brand,omitempty"` // Enterprise: The name of the enterprise in the form enterprises/{enterprise}. @@ -8452,12 +8456,12 @@ type EnterprisesEnrollmentTokensGetCall struct { header_ http.Header } -// Get: Gets an active, unexpired enrollment token. Only a partial view of -// EnrollmentToken is returned: all the fields but name and -// expiration_timestamp are empty. This method is meant to help manage active -// enrollment tokens lifecycle. For security reasons, it's recommended to -// delete active enrollment tokens as soon as they're not intended to be used -// anymore. +// Get: Gets an active, unexpired enrollment token. A partial view of the +// enrollment token is returned. Only the following fields are populated: name, +// expirationTimestamp, allowPersonalUsage, value, qrCode. This method is meant +// to help manage active enrollment tokens lifecycle. For security reasons, +// it's recommended to delete active enrollment tokens as soon as they're not +// intended to be used anymore. // // - name: The name of the enrollment token in the form // enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}. @@ -8567,11 +8571,12 @@ type EnterprisesEnrollmentTokensListCall struct { } // List: Lists active, unexpired enrollment tokens for a given enterprise. The -// list items contain only a partial view of EnrollmentToken: all the fields -// but name and expiration_timestamp are empty. This method is meant to help -// manage active enrollment tokens lifecycle. For security reasons, it's -// recommended to delete active enrollment tokens as soon as they're not -// intended to be used anymore. +// list items contain only a partial view of EnrollmentToken object. Only the +// following fields are populated: name, expirationTimestamp, +// allowPersonalUsage, value, qrCode. This method is meant to help manage +// active enrollment tokens lifecycle. For security reasons, it's recommended +// to delete active enrollment tokens as soon as they're not intended to be +// used anymore. // // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. func (r *EnterprisesEnrollmentTokensService) List(parent string) *EnterprisesEnrollmentTokensListCall { diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index a8b99fc57ca..68a3efe0828 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -4731,7 +4731,7 @@ } } }, - "revision": "20240516", + "revision": "20240611", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -9942,7 +9942,7 @@ "type": "integer" }, "voidedReason": { - "description": "The reason why the purchase was voided, possible values are: 0. Other 1. Remorse 2. Not_received 3. Defective 4. Accidental_purchase 5. Fraud 6. Friendly_fraud 7. Chargeback", + "description": "The reason why the purchase was voided, possible values are: 0. Other 1. Remorse 2. Not_received 3. Defective 4. Accidental_purchase 5. Fraud 6. Friendly_fraud 7. Chargeback 8. Unacknowledged_purchase", "format": "int32", "type": "integer" }, diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 51231389100..8426ce178d8 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -7485,7 +7485,7 @@ type VoidedPurchase struct { VoidedQuantity int64 `json:"voidedQuantity,omitempty"` // VoidedReason: The reason why the purchase was voided, possible values are: // 0. Other 1. Remorse 2. Not_received 3. Defective 4. Accidental_purchase 5. - // Fraud 6. Friendly_fraud 7. Chargeback + // Fraud 6. Friendly_fraud 7. Chargeback 8. Unacknowledged_purchase VoidedReason int64 `json:"voidedReason,omitempty"` // VoidedSource: The initiator of voided purchase, possible values are: 0. User // 1. Developer 2. Google diff --git a/api-list.json b/api-list.json index ce0cab65fd2..0929a1d2df6 100644 --- a/api-list.json +++ b/api-list.json @@ -272,6 +272,21 @@ "documentationLink": "https://cloud.google.com/vertex-ai/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "airquality:v1", + "name": "airquality", + "version": "v1", + "title": "Air Quality API", + "description": "The Air Quality API.", + "discoveryRestUrl": "https://airquality.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://developers.google.com/maps/documentation/air-quality", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "alertcenter:v1beta1", @@ -571,6 +586,21 @@ "documentationLink": "https://cloud.google.com/api-keys/docs", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "apim:v1alpha", + "name": "apim", + "version": "v1alpha", + "title": "API Management API", + "description": "Enables users to discover shadow APIs in existing Google Cloud infrastructure.", + "discoveryRestUrl": "https://apim.googleapis.com/$discovery/rest?version=v1alpha", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/apigee/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "appengine:v1alpha", @@ -1366,6 +1396,21 @@ "documentationLink": "https://cloud.google.com/channel", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "cloudcommerceprocurement:v1", + "name": "cloudcommerceprocurement", + "version": "v1", + "title": "Cloud Commerce Partner Procurement API", + "description": "Partner API for the Cloud Commerce Procurement Service.", + "discoveryRestUrl": "https://cloudcommerceprocurement.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/marketplace/docs/partners/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "cloudcontrolspartner:v1beta", @@ -4837,6 +4882,21 @@ "documentationLink": "https://cloud.google.com/iam/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "pollen:v1", + "name": "pollen", + "version": "v1", + "title": "Pollen API", + "description": "The Pollen API.", + "discoveryRestUrl": "https://pollen.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://developers.google.com/maps/documentation/pollen", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "poly:v1", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index 17f7d100ae7..0963a0365d0 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -10045,7 +10045,7 @@ } } }, - "revision": "20240507", + "revision": "20240607", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -10207,7 +10207,7 @@ }, "analyticsConfig": { "$ref": "GoogleCloudApigeeV1AnalyticsConfig", - "description": "Configuration for the Analytics add-on." + "description": "Configuration for the Analytics add-on. Only used in organizations.environments.addonsConfig." }, "apiSecurityConfig": { "$ref": "GoogleCloudApigeeV1ApiSecurityConfig", diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index de84f58db9a..515d720ec2a 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -1487,7 +1487,8 @@ type GoogleCloudApigeeV1ActivateNatAddressRequest struct { type GoogleCloudApigeeV1AddonsConfig struct { // AdvancedApiOpsConfig: Configuration for the Advanced API Ops add-on. AdvancedApiOpsConfig *GoogleCloudApigeeV1AdvancedApiOpsConfig `json:"advancedApiOpsConfig,omitempty"` - // AnalyticsConfig: Configuration for the Analytics add-on. + // AnalyticsConfig: Configuration for the Analytics add-on. Only used in + // organizations.environments.addonsConfig. AnalyticsConfig *GoogleCloudApigeeV1AnalyticsConfig `json:"analyticsConfig,omitempty"` // ApiSecurityConfig: Configuration for the API Security add-on. ApiSecurityConfig *GoogleCloudApigeeV1ApiSecurityConfig `json:"apiSecurityConfig,omitempty"` diff --git a/apim/v1alpha/apim-api.json b/apim/v1alpha/apim-api.json new file mode 100644 index 00000000000..a266bc5e071 --- /dev/null +++ b/apim/v1alpha/apim-api.json @@ -0,0 +1,1481 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://apim.googleapis.com/", + "batchPath": "batch", + "canonicalName": "API Management", + "description": "Enables users to discover shadow APIs in existing Google Cloud infrastructure.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/apigee/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "apim:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://apim.mtls.googleapis.com/", + "name": "apim", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "apim.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1alpha/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "apim.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "observationJobs": { + "methods": { + "create": { + "description": "CreateObservationJob creates a new ObservationJob but does not have any effecton its own. It is a configuration that can be used in an Observation Job to collect data about existing APIs.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs", + "httpMethod": "POST", + "id": "apim.projects.locations.observationJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "observationJobId": { + "description": "Required. The ID to use for the Observation Job. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource where this ObservationJob will be created. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "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" + } + }, + "path": "v1alpha/{+parent}/observationJobs", + "request": { + "$ref": "ObservationJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "DeleteObservationJob deletes an ObservationJob. This method will fail if the observation job is currently being used by any ObservationSource, even if not enabled.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}", + "httpMethod": "DELETE", + "id": "apim.projects.locations.observationJobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource Format: projects/{project}/locations/{location}/observationJobs/{observation_job}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "disable": { + "description": "Disables the given ObservationJob.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}:disable", + "httpMethod": "POST", + "id": "apim.projects.locations.observationJobs.disable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ObservationJob to disable. Format: projects/{project}/locations/{location}/observationJobs/{job}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:disable", + "request": { + "$ref": "DisableObservationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enable": { + "description": "Enables the given ObservationJob.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}:enable", + "httpMethod": "POST", + "id": "apim.projects.locations.observationJobs.enable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ObservationJob to enable. Format: projects/{project}/locations/{location}/observationJobs/{job}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:enable", + "request": { + "$ref": "EnableObservationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "GetObservationJob retrieves a single ObservationJob by name.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}", + "httpMethod": "GET", + "id": "apim.projects.locations.observationJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ObservationJob to retrieve. Format: projects/{project}/locations/{location}/observationJobs/{job}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "ObservationJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListObservationJobs gets all ObservationJobs for a given project and location", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs", + "httpMethod": "GET", + "id": "apim.projects.locations.observationJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of ObservationJobs to return. The service may return fewer than this value. If unspecified, at most 10 ObservationJobs 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 `ListObservationJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListObservationJobs` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of ObservationJobs. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/observationJobs", + "response": { + "$ref": "ListObservationJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "apiObservations": { + "methods": { + "get": { + "description": "GetApiObservation retrieves a single ApiObservation by name.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations/{apiObservationsId}", + "httpMethod": "GET", + "id": "apim.projects.locations.observationJobs.apiObservations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ApiObservation to retrieve. Format: projects/{project}/locations/{location}/observationJobs/{observation_job}/apiObservations/{api_observation}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+/apiObservations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "ApiObservation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListApiObservations gets all ApiObservations for a given project and location and ObservationJob", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations", + "httpMethod": "GET", + "id": "apim.projects.locations.observationJobs.apiObservations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of ApiObservations to return. The service may return fewer than this value. If unspecified, at most 10 ApiObservations 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 `ListApiObservations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListApiObservations` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of ApiObservations. Format: projects/{project}/locations/{location}/observationJobs/{observation_job}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/apiObservations", + "response": { + "$ref": "ListApiObservationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "apiOperations": { + "methods": { + "get": { + "description": "GetApiOperation retrieves a single ApiOperation by name.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations/{apiObservationsId}/apiOperations/{apiOperationsId}", + "httpMethod": "GET", + "id": "apim.projects.locations.observationJobs.apiObservations.apiOperations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ApiOperation to retrieve. Format: projects/{project}/locations/{location}/observationJobs/{observation_job}/apiObservations/{api_observation}/apiOperation/{api_operation}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+/apiObservations/[^/]+/apiOperations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "ApiOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListApiOperations gets all ApiOperations for a given project and location and ObservationJob and ApiObservation", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations/{apiObservationsId}/apiOperations", + "httpMethod": "GET", + "id": "apim.projects.locations.observationJobs.apiObservations.apiOperations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of ApiOperations to return. The service may return fewer than this value. If unspecified, at most 10 ApiOperations 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 `ListApiApiOperations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListApiApiOperations` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of ApiOperations. Format: projects/{project}/locations/{location}/observationJobs/{observation_job}/apiObservations/{api_observation}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+/apiObservations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/apiOperations", + "response": { + "$ref": "ListApiOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "observationSources": { + "methods": { + "create": { + "description": "CreateObservationSource creates a new ObservationSource but does not affect any deployed infrastructure. It is a configuration that can be used in an Observation Job to collect data about APIs running in user's dataplane.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationSources", + "httpMethod": "POST", + "id": "apim.projects.locations.observationSources.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "observationSourceId": { + "description": "Required. The ID to use for the Observation Source. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "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" + } + }, + "path": "v1alpha/{+parent}/observationSources", + "request": { + "$ref": "ObservationSource" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "DeleteObservationSource deletes an observation source. This method will fail if the observation source is currently being used by any ObservationJob, even if not enabled.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationSources/{observationSourcesId}", + "httpMethod": "DELETE", + "id": "apim.projects.locations.observationSources.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource Format: projects/{project}/locations/{location}/observationSources/{source}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationSources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "GetObservationSource retrieves a single ObservationSource by name.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationSources/{observationSourcesId}", + "httpMethod": "GET", + "id": "apim.projects.locations.observationSources.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ObservationSource to retrieve. Format: projects/{project}/locations/{location}/observationSources/{source}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationSources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "ObservationSource" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListObservationSources gets all ObservationSources for a given project and location", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationSources", + "httpMethod": "GET", + "id": "apim.projects.locations.observationSources.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of ObservationSources to return. The service may return fewer than this value. If unspecified, at most 10 ObservationSources 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 `ListObservationSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListObservationSources` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of ObservationSources. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/observationSources", + "response": { + "$ref": "ListObservationSourcesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "apim.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "apim.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "apim.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "apim.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20240605", + "rootUrl": "https://apim.googleapis.com/", + "schemas": { + "ApiObservation": { + "description": "Message describing ApiObservation object", + "id": "ApiObservation", + "properties": { + "apiOperationCount": { + "description": "The number of observed API Operations.", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Create time stamp", + "format": "google-datetime", + "type": "string" + }, + "hostname": { + "description": "The hostname of requests processed for this Observation.", + "type": "string" + }, + "lastEventDetectedTime": { + "description": "Last event detected time stamp", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Identifier. Name of resource", + "type": "string" + }, + "serverIps": { + "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: `\"192.168.1.1\"`, `\"10.0.0.1:80\"`, `\"FE80::0202:B3FF:FE1E:8329\"`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sourceLocations": { + "description": "Location of the Observation Source, for example \"us-central1\" or \"europe-west1.\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "style": { + "description": "Style of ApiObservation", + "enum": [ + "STYLE_UNSPECIFIED", + "REST", + "GRPC", + "GRAPHQL" + ], + "enumDescriptions": [ + "Unknown style", + "Style is Rest API", + "Style is Grpc API", + "Style is GraphQL API" + ], + "type": "string" + }, + "tags": { + "description": "User-defined tags to organize and sort", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Update time stamp", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "ApiOperation": { + "description": "Message describing ApiOperation object", + "id": "ApiOperation", + "properties": { + "count": { + "description": "The number of occurrences of this API Operation.", + "format": "int64", + "type": "string" + }, + "firstSeenTime": { + "description": "First seen time stamp", + "format": "google-datetime", + "type": "string" + }, + "httpOperation": { + "$ref": "HttpOperation", + "description": "An HTTP Operation." + }, + "lastSeenTime": { + "description": "Last seen time stamp", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Identifier. Name of resource", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "DisableObservationJobRequest": { + "description": "Message for disabling an ObservationJob", + "id": "DisableObservationJobRequest", + "properties": {}, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EnableObservationJobRequest": { + "description": "Message for enabling an ObservationJob", + "id": "EnableObservationJobRequest", + "properties": {}, + "type": "object" + }, + "GclbObservationSource": { + "description": "The GCLB observation source.", + "id": "GclbObservationSource", + "properties": { + "pscNetworkConfigs": { + "description": "Required. The VPC networks where traffic will be observed. All load balancers within this network will be observed. Currently, this is limited to only one network.", + "items": { + "$ref": "GclbObservationSourcePscNetworkConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "GclbObservationSourcePscNetworkConfig": { + "description": "Network information for setting up a PSC connection.", + "id": "GclbObservationSourcePscNetworkConfig", + "properties": { + "network": { + "description": "Required. The VPC network. Format: `projects/{project_id}/global/networks/{network}`", + "type": "string" + }, + "subnetwork": { + "description": "Required. The subnetwork in the source region that will be used to connect to the Cloud Load Balancers via PSC NEGs. Must belong to `network`. Format: projects/{project_id}/regions/{region}/subnetworks/{subnet}", + "type": "string" + } + }, + "type": "object" + }, + "HttpOperation": { + "description": "An HTTP-based API Operation, sometimes called a \"REST\" Operation.", + "id": "HttpOperation", + "properties": { + "method": { + "description": "HTTP Method.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "GET", + "HEAD", + "POST", + "PUT", + "PATCH", + "DELETE", + "TRACE", + "OPTIONS", + "CONNECT" + ], + "enumDescriptions": [ + "Unspecified HTTP method", + "GET HTTP method", + "HEAD HTTP method", + "POST HTTP method", + "PUT HTTP method", + "PATCH HTTP method", + "DELETE HTTP method", + "TRACE HTTP method", + "OPTIONS HTTP method", + "CONNECT HTTP method" + ], + "type": "string" + }, + "path": { + "description": "Path of the HTTP request.", + "type": "string" + }, + "pathParams": { + "description": "Path params of HttpOperation", + "items": { + "$ref": "HttpOperationPathParam" + }, + "type": "array" + }, + "queryParams": { + "additionalProperties": { + "$ref": "HttpOperationQueryParam" + }, + "description": "Query params of HttpOperation", + "type": "object" + }, + "request": { + "$ref": "HttpOperationHttpRequest", + "description": "Request metadata." + }, + "response": { + "$ref": "HttpOperationHttpResponse", + "description": "Response metadata." + } + }, + "type": "object" + }, + "HttpOperationHeader": { + "description": "An aggregation of HTTP header occurrences.", + "id": "HttpOperationHeader", + "properties": { + "count": { + "description": "The number of occurrences of this Header across transactions.", + "format": "int64", + "type": "string" + }, + "dataType": { + "description": "Data type of header", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "BOOL", + "INTEGER", + "FLOAT", + "STRING", + "UUID" + ], + "enumDescriptions": [ + "Unspecified data type", + "Boolean data type", + "Integer data type", + "Float data type", + "String data type", + "UUID data type" + ], + "type": "string" + }, + "name": { + "description": "Header name.", + "type": "string" + } + }, + "type": "object" + }, + "HttpOperationHttpRequest": { + "description": "An aggregation of HTTP requests.", + "id": "HttpOperationHttpRequest", + "properties": { + "headers": { + "additionalProperties": { + "$ref": "HttpOperationHeader" + }, + "description": "Unordered map from header name to header metadata", + "type": "object" + } + }, + "type": "object" + }, + "HttpOperationHttpResponse": { + "description": "An aggregation of HTTP responses.", + "id": "HttpOperationHttpResponse", + "properties": { + "headers": { + "additionalProperties": { + "$ref": "HttpOperationHeader" + }, + "description": "Unordered map from header name to header metadata", + "type": "object" + }, + "responseCodes": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Map of status code to observed count", + "type": "object" + } + }, + "type": "object" + }, + "HttpOperationPathParam": { + "description": "HTTP Path parameter.", + "id": "HttpOperationPathParam", + "properties": { + "dataType": { + "description": "Data type of path param", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "BOOL", + "INTEGER", + "FLOAT", + "STRING", + "UUID" + ], + "enumDescriptions": [ + "Unspecified data type", + "Boolean data type", + "Integer data type", + "Float data type", + "String data type", + "UUID data type" + ], + "type": "string" + }, + "position": { + "description": "Segment location in the path, 1-indexed", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "HttpOperationQueryParam": { + "description": "An aggregation of HTTP query parameter occurrences.", + "id": "HttpOperationQueryParam", + "properties": { + "count": { + "description": "The number of occurrences of this query parameter across transactions.", + "format": "int64", + "type": "string" + }, + "dataType": { + "description": "Data type of path param", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "BOOL", + "INTEGER", + "FLOAT", + "STRING", + "UUID" + ], + "enumDescriptions": [ + "Unspecified data type", + "Boolean data type", + "Integer data type", + "Float data type", + "String data type", + "UUID data type" + ], + "type": "string" + }, + "name": { + "description": "Name of query param", + "type": "string" + } + }, + "type": "object" + }, + "ListApiObservationsResponse": { + "description": "Message for response to listing ApiObservations", + "id": "ListApiObservationsResponse", + "properties": { + "apiObservations": { + "description": "The ApiObservation from the specified project and location and ObservationJobs.", + "items": { + "$ref": "ApiObservation" + }, + "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" + }, + "ListApiOperationsResponse": { + "description": "Message for response to listing ApiOperations", + "id": "ListApiOperationsResponse", + "properties": { + "apiOperations": { + "description": "The ApiOperations from the specified project and location and ObservationJob and ApiObservation.", + "items": { + "$ref": "ApiOperation" + }, + "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" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListObservationJobsResponse": { + "description": "Message for response to listing ObservationJobs", + "id": "ListObservationJobsResponse", + "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" + }, + "observationJobs": { + "description": "The ObservationJob from the specified project and location.", + "items": { + "$ref": "ObservationJob" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListObservationSourcesResponse": { + "description": "Message for response to listing ObservationSources", + "id": "ListObservationSourcesResponse", + "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" + }, + "observationSources": { + "description": "The ObservationSource from the specified project and location.", + "items": { + "$ref": "ObservationSource" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "ObservationJob": { + "description": "Message describing ObservationJob object", + "id": "ObservationJob", + "properties": { + "createTime": { + "description": "Output only. [Output only] Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. name of resource Format: projects/{project}/locations/{location}/observationJobs/{observation_job}", + "type": "string" + }, + "sources": { + "description": "Optional. These should be of the same kind of source.", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "Output only. The observation job state", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ENABLING", + "ENABLED", + "DISABLING", + "DISABLED", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified state", + "Job is in the creating state", + "Job is in the enabling state", + "Job is enabled", + "Job is in the disabling state", + "Job is disabled", + "Job is being deleted", + "Job is in an error state" + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. [Output only] Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ObservationSource": { + "description": "Observation source configuration types", + "id": "ObservationSource", + "properties": { + "createTime": { + "description": "Output only. [Output only] Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "gclbObservationSource": { + "$ref": "GclbObservationSource", + "description": "The GCLB observation source" + }, + "name": { + "description": "Identifier. name of resource For MVP, each region can only have 1 source.", + "type": "string" + }, + "state": { + "description": "Output only. The observation source state", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "CREATED", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified state", + "Source is in the creating state", + "Source has been created and is ready to use", + "Source is being deleted", + "Source is in an error state" + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. [Output only] Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "API Management API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/apim/v1alpha/apim-gen.go b/apim/v1alpha/apim-gen.go new file mode 100644 index 00000000000..602f2dfe2e2 --- /dev/null +++ b/apim/v1alpha/apim-gen.go @@ -0,0 +1,3419 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package apim provides access to the API Management API. +// +// For product documentation, see: https://cloud.google.com/apigee/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/apim/v1alpha" +// ... +// ctx := context.Background() +// apimService, err := apim.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// apimService, err := apim.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// apimService, err := apim.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package apim // import "google.golang.org/api/apim/v1alpha" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "apim:v1alpha" +const apiName = "apim" +const apiVersion = "v1alpha" +const basePath = "https://apim.googleapis.com/" +const basePathTemplate = "https://apim.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://apim.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.ObservationJobs = NewProjectsLocationsObservationJobsService(s) + rs.ObservationSources = NewProjectsLocationsObservationSourcesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + ObservationJobs *ProjectsLocationsObservationJobsService + + ObservationSources *ProjectsLocationsObservationSourcesService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsObservationJobsService(s *Service) *ProjectsLocationsObservationJobsService { + rs := &ProjectsLocationsObservationJobsService{s: s} + rs.ApiObservations = NewProjectsLocationsObservationJobsApiObservationsService(s) + return rs +} + +type ProjectsLocationsObservationJobsService struct { + s *Service + + ApiObservations *ProjectsLocationsObservationJobsApiObservationsService +} + +func NewProjectsLocationsObservationJobsApiObservationsService(s *Service) *ProjectsLocationsObservationJobsApiObservationsService { + rs := &ProjectsLocationsObservationJobsApiObservationsService{s: s} + rs.ApiOperations = NewProjectsLocationsObservationJobsApiObservationsApiOperationsService(s) + return rs +} + +type ProjectsLocationsObservationJobsApiObservationsService struct { + s *Service + + ApiOperations *ProjectsLocationsObservationJobsApiObservationsApiOperationsService +} + +func NewProjectsLocationsObservationJobsApiObservationsApiOperationsService(s *Service) *ProjectsLocationsObservationJobsApiObservationsApiOperationsService { + rs := &ProjectsLocationsObservationJobsApiObservationsApiOperationsService{s: s} + return rs +} + +type ProjectsLocationsObservationJobsApiObservationsApiOperationsService struct { + s *Service +} + +func NewProjectsLocationsObservationSourcesService(s *Service) *ProjectsLocationsObservationSourcesService { + rs := &ProjectsLocationsObservationSourcesService{s: s} + return rs +} + +type ProjectsLocationsObservationSourcesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// ApiObservation: Message describing ApiObservation object +type ApiObservation struct { + // ApiOperationCount: The number of observed API Operations. + ApiOperationCount int64 `json:"apiOperationCount,omitempty,string"` + // CreateTime: Create time stamp + CreateTime string `json:"createTime,omitempty"` + // Hostname: The hostname of requests processed for this Observation. + Hostname string `json:"hostname,omitempty"` + // LastEventDetectedTime: Last event detected time stamp + LastEventDetectedTime string `json:"lastEventDetectedTime,omitempty"` + // Name: Identifier. Name of resource + Name string `json:"name,omitempty"` + // ServerIps: The IP address (IPv4 or IPv6) of the origin server that the + // request was sent to. This field can include port information. Examples: + // "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329". + ServerIps []string `json:"serverIps,omitempty"` + // SourceLocations: Location of the Observation Source, for example + // "us-central1" or "europe-west1." + SourceLocations []string `json:"sourceLocations,omitempty"` + // Style: Style of ApiObservation + // + // Possible values: + // "STYLE_UNSPECIFIED" - Unknown style + // "REST" - Style is Rest API + // "GRPC" - Style is Grpc API + // "GRAPHQL" - Style is GraphQL API + Style string `json:"style,omitempty"` + // Tags: User-defined tags to organize and sort + Tags []string `json:"tags,omitempty"` + // UpdateTime: Update time stamp + 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. "ApiOperationCount") 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. "ApiOperationCount") 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 *ApiObservation) MarshalJSON() ([]byte, error) { + type NoMethod ApiObservation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ApiOperation: Message describing ApiOperation object +type ApiOperation struct { + // Count: The number of occurrences of this API Operation. + Count int64 `json:"count,omitempty,string"` + // FirstSeenTime: First seen time stamp + FirstSeenTime string `json:"firstSeenTime,omitempty"` + // HttpOperation: An HTTP Operation. + HttpOperation *HttpOperation `json:"httpOperation,omitempty"` + // LastSeenTime: Last seen time stamp + LastSeenTime string `json:"lastSeenTime,omitempty"` + // Name: Identifier. Name of resource + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *ApiOperation) MarshalJSON() ([]byte, error) { + type NoMethod ApiOperation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// DisableObservationJobRequest: Message for disabling an ObservationJob +type DisableObservationJobRequest struct { +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// EnableObservationJobRequest: Message for enabling an ObservationJob +type EnableObservationJobRequest struct { +} + +// GclbObservationSource: The GCLB observation source. +type GclbObservationSource struct { + // PscNetworkConfigs: Required. The VPC networks where traffic will be + // observed. All load balancers within this network will be observed. + // Currently, this is limited to only one network. + PscNetworkConfigs []*GclbObservationSourcePscNetworkConfig `json:"pscNetworkConfigs,omitempty"` + // ForceSendFields is a list of field names (e.g. "PscNetworkConfigs") 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. "PscNetworkConfigs") 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 *GclbObservationSource) MarshalJSON() ([]byte, error) { + type NoMethod GclbObservationSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GclbObservationSourcePscNetworkConfig: Network information for setting up a +// PSC connection. +type GclbObservationSourcePscNetworkConfig struct { + // Network: Required. The VPC network. Format: + // `projects/{project_id}/global/networks/{network}` + Network string `json:"network,omitempty"` + // Subnetwork: Required. The subnetwork in the source region that will be used + // to connect to the Cloud Load Balancers via PSC NEGs. Must belong to + // `network`. Format: + // projects/{project_id}/regions/{region}/subnetworks/{subnet} + Subnetwork string `json:"subnetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *GclbObservationSourcePscNetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod GclbObservationSourcePscNetworkConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpOperation: An HTTP-based API Operation, sometimes called a "REST" +// Operation. +type HttpOperation struct { + // Method: HTTP Method. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - Unspecified HTTP method + // "GET" - GET HTTP method + // "HEAD" - HEAD HTTP method + // "POST" - POST HTTP method + // "PUT" - PUT HTTP method + // "PATCH" - PATCH HTTP method + // "DELETE" - DELETE HTTP method + // "TRACE" - TRACE HTTP method + // "OPTIONS" - OPTIONS HTTP method + // "CONNECT" - CONNECT HTTP method + Method string `json:"method,omitempty"` + // Path: Path of the HTTP request. + Path string `json:"path,omitempty"` + // PathParams: Path params of HttpOperation + PathParams []*HttpOperationPathParam `json:"pathParams,omitempty"` + // QueryParams: Query params of HttpOperation + QueryParams map[string]HttpOperationQueryParam `json:"queryParams,omitempty"` + // Request: Request metadata. + Request *HttpOperationHttpRequest `json:"request,omitempty"` + // Response: Response metadata. + Response *HttpOperationHttpResponse `json:"response,omitempty"` + // ForceSendFields is a list of field names (e.g. "Method") 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. "Method") 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 *HttpOperation) MarshalJSON() ([]byte, error) { + type NoMethod HttpOperation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpOperationHeader: An aggregation of HTTP header occurrences. +type HttpOperationHeader struct { + // Count: The number of occurrences of this Header across transactions. + Count int64 `json:"count,omitempty,string"` + // DataType: Data type of header + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Unspecified data type + // "BOOL" - Boolean data type + // "INTEGER" - Integer data type + // "FLOAT" - Float data type + // "STRING" - String data type + // "UUID" - UUID data type + DataType string `json:"dataType,omitempty"` + // Name: Header name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *HttpOperationHeader) MarshalJSON() ([]byte, error) { + type NoMethod HttpOperationHeader + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpOperationHttpRequest: An aggregation of HTTP requests. +type HttpOperationHttpRequest struct { + // Headers: Unordered map from header name to header metadata + Headers map[string]HttpOperationHeader `json:"headers,omitempty"` + // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") 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 *HttpOperationHttpRequest) MarshalJSON() ([]byte, error) { + type NoMethod HttpOperationHttpRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpOperationHttpResponse: An aggregation of HTTP responses. +type HttpOperationHttpResponse struct { + // Headers: Unordered map from header name to header metadata + Headers map[string]HttpOperationHeader `json:"headers,omitempty"` + // ResponseCodes: Map of status code to observed count + ResponseCodes map[string]string `json:"responseCodes,omitempty"` + // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") 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 *HttpOperationHttpResponse) MarshalJSON() ([]byte, error) { + type NoMethod HttpOperationHttpResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpOperationPathParam: HTTP Path parameter. +type HttpOperationPathParam struct { + // DataType: Data type of path param + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Unspecified data type + // "BOOL" - Boolean data type + // "INTEGER" - Integer data type + // "FLOAT" - Float data type + // "STRING" - String data type + // "UUID" - UUID data type + DataType string `json:"dataType,omitempty"` + // Position: Segment location in the path, 1-indexed + Position int64 `json:"position,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataType") 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. "DataType") 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 *HttpOperationPathParam) MarshalJSON() ([]byte, error) { + type NoMethod HttpOperationPathParam + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpOperationQueryParam: An aggregation of HTTP query parameter occurrences. +type HttpOperationQueryParam struct { + // Count: The number of occurrences of this query parameter across + // transactions. + Count int64 `json:"count,omitempty,string"` + // DataType: Data type of path param + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Unspecified data type + // "BOOL" - Boolean data type + // "INTEGER" - Integer data type + // "FLOAT" - Float data type + // "STRING" - String data type + // "UUID" - UUID data type + DataType string `json:"dataType,omitempty"` + // Name: Name of query param + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *HttpOperationQueryParam) MarshalJSON() ([]byte, error) { + type NoMethod HttpOperationQueryParam + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ListApiObservationsResponse: Message for response to listing ApiObservations +type ListApiObservationsResponse struct { + // ApiObservations: The ApiObservation from the specified project and location + // and ObservationJobs. + ApiObservations []*ApiObservation `json:"apiObservations,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. "ApiObservations") 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. "ApiObservations") 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 *ListApiObservationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListApiObservationsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ListApiOperationsResponse: Message for response to listing ApiOperations +type ListApiOperationsResponse struct { + // ApiOperations: The ApiOperations from the specified project and location and + // ObservationJob and ApiObservation. + ApiOperations []*ApiOperation `json:"apiOperations,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. "ApiOperations") 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. "ApiOperations") 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 *ListApiOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListApiOperationsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + 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. "Locations") 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. "Locations") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ListObservationJobsResponse: Message for response to listing ObservationJobs +type ListObservationJobsResponse 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"` + // ObservationJobs: The ObservationJob from the specified project and location. + ObservationJobs []*ObservationJob `json:"observationJobs,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,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 *ListObservationJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListObservationJobsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ListObservationSourcesResponse: Message for response to listing +// ObservationSources +type ListObservationSourcesResponse 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"` + // ObservationSources: The ObservationSource from the specified project and + // location. + ObservationSources []*ObservationSource `json:"observationSources,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,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 *ListObservationSourcesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListObservationSourcesResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + // Operations: A list of operations that matches the specified filter in the + // request. + Operations []*Operation `json:"operations,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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby city + // name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + // LocationId: The canonical id for this location. For example: "us-east1". + LocationId string `json:"locationId,omitempty"` + // Metadata: Service-specific metadata. For example the available capacity at + // the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,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 *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ObservationJob: Message describing ObservationJob object +type ObservationJob struct { + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // Name: Identifier. name of resource Format: + // projects/{project}/locations/{location}/observationJobs/{observation_job} + Name string `json:"name,omitempty"` + // Sources: Optional. These should be of the same kind of source. + Sources []string `json:"sources,omitempty"` + // State: Output only. The observation job state + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state + // "CREATING" - Job is in the creating state + // "ENABLING" - Job is in the enabling state + // "ENABLED" - Job is enabled + // "DISABLING" - Job is in the disabling state + // "DISABLED" - Job is disabled + // "DELETING" - Job is being deleted + // "ERROR" - Job is in an error state + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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 *ObservationJob) MarshalJSON() ([]byte, error) { + type NoMethod ObservationJob + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ObservationSource: Observation source configuration types +type ObservationSource struct { + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // GclbObservationSource: The GCLB observation source + GclbObservationSource *GclbObservationSource `json:"gclbObservationSource,omitempty"` + // Name: Identifier. name of resource For MVP, each region can only have 1 + // source. + Name string `json:"name,omitempty"` + // State: Output only. The observation source state + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state + // "CREATING" - Source is in the creating state + // "CREATED" - Source has been created and is ready to use + // "DELETING" - Source is being deleted + // "ERROR" - Source is in an error state + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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 *ObservationSource) MarshalJSON() ([]byte, error) { + type NoMethod ObservationSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *Status `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been cancelled + // successfully have Operation.error value with a google.rpc.Status.code of 1, + // corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by gRPC (https://github.com/grpc). Each `Status` message contains three +// pieces of data: error code, error message, and error details. You can find +// out more about this error model and how to work with it in the API Design +// Guide (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 ProjectsLocationsObservationJobsCreateCall struct { + s *Service + parent string + observationjob *ObservationJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: CreateObservationJob creates a new ObservationJob but does not have +// any effecton its own. It is a configuration that can be used in an +// Observation Job to collect data about existing APIs. +// +// - parent: The parent resource where this ObservationJob will be created. +// Format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsObservationJobsService) Create(parent string, observationjob *ObservationJob) *ProjectsLocationsObservationJobsCreateCall { + c := &ProjectsLocationsObservationJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.observationjob = observationjob + return c +} + +// ObservationJobId sets the optional parameter "observationJobId": Required. +// The ID to use for the Observation Job. This value should be 4-63 characters, +// and valid characters are /a-z-/. +func (c *ProjectsLocationsObservationJobsCreateCall) ObservationJobId(observationJobId string) *ProjectsLocationsObservationJobsCreateCall { + c.urlParams_.Set("observationJobId", observationJobId) + 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 *ProjectsLocationsObservationJobsCreateCall) RequestId(requestId string) *ProjectsLocationsObservationJobsCreateCall { + 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 *ProjectsLocationsObservationJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsCreateCall { + 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 *ProjectsLocationsObservationJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.observationjob) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/observationJobs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.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 *ProjectsLocationsObservationJobsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: DeleteObservationJob deletes an ObservationJob. This method will +// fail if the observation job is currently being used by any +// ObservationSource, even if not enabled. +// +// - name: Name of the resource Format: +// projects/{project}/locations/{location}/observationJobs/{observation_job}. +func (r *ProjectsLocationsObservationJobsService) Delete(name string) *ProjectsLocationsObservationJobsDeleteCall { + c := &ProjectsLocationsObservationJobsDeleteCall{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 *ProjectsLocationsObservationJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsDeleteCall { + 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 *ProjectsLocationsObservationJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.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 *ProjectsLocationsObservationJobsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationJobsDisableCall struct { + s *Service + name string + disableobservationjobrequest *DisableObservationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Disable: Disables the given ObservationJob. +// +// - name: The name of the ObservationJob to disable. Format: +// projects/{project}/locations/{location}/observationJobs/{job}. +func (r *ProjectsLocationsObservationJobsService) Disable(name string, disableobservationjobrequest *DisableObservationJobRequest) *ProjectsLocationsObservationJobsDisableCall { + c := &ProjectsLocationsObservationJobsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.disableobservationjobrequest = disableobservationjobrequest + 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 *ProjectsLocationsObservationJobsDisableCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsDisableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsDisableCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsDisableCall { + 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 *ProjectsLocationsObservationJobsDisableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsDisableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disableobservationjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:disable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.disable" 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 *ProjectsLocationsObservationJobsDisableCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationJobsEnableCall struct { + s *Service + name string + enableobservationjobrequest *EnableObservationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Enable: Enables the given ObservationJob. +// +// - name: The name of the ObservationJob to enable. Format: +// projects/{project}/locations/{location}/observationJobs/{job}. +func (r *ProjectsLocationsObservationJobsService) Enable(name string, enableobservationjobrequest *EnableObservationJobRequest) *ProjectsLocationsObservationJobsEnableCall { + c := &ProjectsLocationsObservationJobsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.enableobservationjobrequest = enableobservationjobrequest + 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 *ProjectsLocationsObservationJobsEnableCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsEnableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsEnableCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsEnableCall { + 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 *ProjectsLocationsObservationJobsEnableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsEnableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.enableobservationjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:enable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.enable" 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 *ProjectsLocationsObservationJobsEnableCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GetObservationJob retrieves a single ObservationJob by name. +// +// - name: The name of the ObservationJob to retrieve. Format: +// projects/{project}/locations/{location}/observationJobs/{job}. +func (r *ProjectsLocationsObservationJobsService) Get(name string) *ProjectsLocationsObservationJobsGetCall { + c := &ProjectsLocationsObservationJobsGetCall{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 *ProjectsLocationsObservationJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsGetCall { + 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 *ProjectsLocationsObservationJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsGetCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsGetCall { + 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 *ProjectsLocationsObservationJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ObservationJob.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 *ProjectsLocationsObservationJobsGetCall) Do(opts ...googleapi.CallOption) (*ObservationJob, 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 := &ObservationJob{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListObservationJobs gets all ObservationJobs for a given project and +// location +// +// - parent: The parent, which owns this collection of ObservationJobs. Format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsObservationJobsService) List(parent string) *ProjectsLocationsObservationJobsListCall { + c := &ProjectsLocationsObservationJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// ObservationJobs to return. The service may return fewer than this value. If +// unspecified, at most 10 ObservationJobs will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsObservationJobsListCall) PageSize(pageSize int64) *ProjectsLocationsObservationJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListObservationJobs` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListObservationJobs` must match the call that provided the page token. +func (c *ProjectsLocationsObservationJobsListCall) PageToken(pageToken string) *ProjectsLocationsObservationJobsListCall { + 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 *ProjectsLocationsObservationJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsListCall { + 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 *ProjectsLocationsObservationJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsListCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsListCall { + 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 *ProjectsLocationsObservationJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/observationJobs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListObservationJobsResponse.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 *ProjectsLocationsObservationJobsListCall) Do(opts ...googleapi.CallOption) (*ListObservationJobsResponse, 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 := &ListObservationJobsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsObservationJobsListCall) Pages(ctx context.Context, f func(*ListObservationJobsResponse) 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 ProjectsLocationsObservationJobsApiObservationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GetApiObservation retrieves a single ApiObservation by name. +// +// - name: The name of the ApiObservation to retrieve. Format: +// projects/{project}/locations/{location}/observationJobs/{observation_job}/a +// piObservations/{api_observation}. +func (r *ProjectsLocationsObservationJobsApiObservationsService) Get(name string) *ProjectsLocationsObservationJobsApiObservationsGetCall { + c := &ProjectsLocationsObservationJobsApiObservationsGetCall{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 *ProjectsLocationsObservationJobsApiObservationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsApiObservationsGetCall { + 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 *ProjectsLocationsObservationJobsApiObservationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationJobsApiObservationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsApiObservationsGetCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsApiObservationsGetCall { + 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 *ProjectsLocationsObservationJobsApiObservationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsApiObservationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.apiObservations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ApiObservation.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 *ProjectsLocationsObservationJobsApiObservationsGetCall) Do(opts ...googleapi.CallOption) (*ApiObservation, 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 := &ApiObservation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationJobsApiObservationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListApiObservations gets all ApiObservations for a given project and +// location and ObservationJob +// +// - parent: The parent, which owns this collection of ApiObservations. Format: +// projects/{project}/locations/{location}/observationJobs/{observation_job}. +func (r *ProjectsLocationsObservationJobsApiObservationsService) List(parent string) *ProjectsLocationsObservationJobsApiObservationsListCall { + c := &ProjectsLocationsObservationJobsApiObservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// ApiObservations to return. The service may return fewer than this value. If +// unspecified, at most 10 ApiObservations will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsObservationJobsApiObservationsListCall) PageSize(pageSize int64) *ProjectsLocationsObservationJobsApiObservationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListApiObservations` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListApiObservations` must match the call that provided the page token. +func (c *ProjectsLocationsObservationJobsApiObservationsListCall) PageToken(pageToken string) *ProjectsLocationsObservationJobsApiObservationsListCall { + 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 *ProjectsLocationsObservationJobsApiObservationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsApiObservationsListCall { + 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 *ProjectsLocationsObservationJobsApiObservationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationJobsApiObservationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsApiObservationsListCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsApiObservationsListCall { + 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 *ProjectsLocationsObservationJobsApiObservationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsApiObservationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/apiObservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.apiObservations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListApiObservationsResponse.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 *ProjectsLocationsObservationJobsApiObservationsListCall) Do(opts ...googleapi.CallOption) (*ListApiObservationsResponse, 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 := &ListApiObservationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsObservationJobsApiObservationsListCall) Pages(ctx context.Context, f func(*ListApiObservationsResponse) 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 ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GetApiOperation retrieves a single ApiOperation by name. +// +// - name: The name of the ApiOperation to retrieve. Format: +// projects/{project}/locations/{location}/observationJobs/{observation_job}/a +// piObservations/{api_observation}/apiOperation/{api_operation}. +func (r *ProjectsLocationsObservationJobsApiObservationsApiOperationsService) Get(name string) *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall { + c := &ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall{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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall { + 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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall { + 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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.apiObservations.apiOperations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ApiOperation.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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsGetCall) Do(opts ...googleapi.CallOption) (*ApiOperation, 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 := &ApiOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListApiOperations gets all ApiOperations for a given project and +// location and ObservationJob and ApiObservation +// +// - parent: The parent, which owns this collection of ApiOperations. Format: +// projects/{project}/locations/{location}/observationJobs/{observation_job}/a +// piObservations/{api_observation}. +func (r *ProjectsLocationsObservationJobsApiObservationsApiOperationsService) List(parent string) *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall { + c := &ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// ApiOperations to return. The service may return fewer than this value. If +// unspecified, at most 10 ApiOperations will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListApiApiOperations` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListApiApiOperations` must match the call that provided the page token. +func (c *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) PageToken(pageToken string) *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall { + 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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall { + 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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall { + 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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/apiOperations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationJobs.apiObservations.apiOperations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListApiOperationsResponse.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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) Do(opts ...googleapi.CallOption) (*ListApiOperationsResponse, 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 := &ListApiOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall) Pages(ctx context.Context, f func(*ListApiOperationsResponse) 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 ProjectsLocationsObservationSourcesCreateCall struct { + s *Service + parent string + observationsource *ObservationSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: CreateObservationSource creates a new ObservationSource but does not +// affect any deployed infrastructure. It is a configuration that can be used +// in an Observation Job to collect data about APIs running in user's +// dataplane. +// +// - parent: Value for parent. +func (r *ProjectsLocationsObservationSourcesService) Create(parent string, observationsource *ObservationSource) *ProjectsLocationsObservationSourcesCreateCall { + c := &ProjectsLocationsObservationSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.observationsource = observationsource + return c +} + +// ObservationSourceId sets the optional parameter "observationSourceId": +// Required. The ID to use for the Observation Source. This value should be +// 4-63 characters, and valid characters are /a-z-/. +func (c *ProjectsLocationsObservationSourcesCreateCall) ObservationSourceId(observationSourceId string) *ProjectsLocationsObservationSourcesCreateCall { + c.urlParams_.Set("observationSourceId", observationSourceId) + 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 *ProjectsLocationsObservationSourcesCreateCall) RequestId(requestId string) *ProjectsLocationsObservationSourcesCreateCall { + 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 *ProjectsLocationsObservationSourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationSourcesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationSourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsObservationSourcesCreateCall { + 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 *ProjectsLocationsObservationSourcesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationSourcesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.observationsource) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/observationSources") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationSources.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 *ProjectsLocationsObservationSourcesCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationSourcesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: DeleteObservationSource deletes an observation source. This method +// will fail if the observation source is currently being used by any +// ObservationJob, even if not enabled. +// +// - name: Name of the resource Format: +// projects/{project}/locations/{location}/observationSources/{source}. +func (r *ProjectsLocationsObservationSourcesService) Delete(name string) *ProjectsLocationsObservationSourcesDeleteCall { + c := &ProjectsLocationsObservationSourcesDeleteCall{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 *ProjectsLocationsObservationSourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationSourcesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationSourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsObservationSourcesDeleteCall { + 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 *ProjectsLocationsObservationSourcesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationSourcesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationSources.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 *ProjectsLocationsObservationSourcesDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationSourcesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GetObservationSource retrieves a single ObservationSource by name. +// +// - name: The name of the ObservationSource to retrieve. Format: +// projects/{project}/locations/{location}/observationSources/{source}. +func (r *ProjectsLocationsObservationSourcesService) Get(name string) *ProjectsLocationsObservationSourcesGetCall { + c := &ProjectsLocationsObservationSourcesGetCall{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 *ProjectsLocationsObservationSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationSourcesGetCall { + 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 *ProjectsLocationsObservationSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationSourcesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsObservationSourcesGetCall { + 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 *ProjectsLocationsObservationSourcesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationSourcesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationSources.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ObservationSource.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 *ProjectsLocationsObservationSourcesGetCall) Do(opts ...googleapi.CallOption) (*ObservationSource, 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 := &ObservationSource{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsObservationSourcesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListObservationSources gets all ObservationSources for a given project +// and location +// +// - parent: The parent, which owns this collection of ObservationSources. +// Format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsObservationSourcesService) List(parent string) *ProjectsLocationsObservationSourcesListCall { + c := &ProjectsLocationsObservationSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// ObservationSources to return. The service may return fewer than this value. +// If unspecified, at most 10 ObservationSources will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsObservationSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsObservationSourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListObservationSources` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListObservationSources` must match the call that provided the page token. +func (c *ProjectsLocationsObservationSourcesListCall) PageToken(pageToken string) *ProjectsLocationsObservationSourcesListCall { + 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 *ProjectsLocationsObservationSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationSourcesListCall { + 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 *ProjectsLocationsObservationSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsObservationSourcesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationSourcesListCall) Context(ctx context.Context) *ProjectsLocationsObservationSourcesListCall { + 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 *ProjectsLocationsObservationSourcesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationSourcesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/observationSources") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.observationSources.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListObservationSourcesResponse.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 *ProjectsLocationsObservationSourcesListCall) Do(opts ...googleapi.CallOption) (*ListObservationSourcesResponse, 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 := &ListObservationSourcesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsObservationSourcesListCall) Pages(ctx context.Context, f func(*ListObservationSourcesResponse) 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 ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that the +// client is no longer interested in the operation result. It does not cancel +// the operation. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.operations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.operations.get" 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 *ProjectsLocationsOperationsGetCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apim.projects.locations.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) 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) + } +} diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 5c0f1651a71..52c512d9f24 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -2013,7 +2013,7 @@ } } }, - "revision": "20240528", + "revision": "20240603", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -3327,13 +3327,15 @@ "REDIRECTION_FROM_GCR_IO_DISABLED", "REDIRECTION_FROM_GCR_IO_ENABLED", "REDIRECTION_FROM_GCR_IO_FINALIZED", - "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING" + "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING", + "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING" ], "enumDeprecated": [ false, false, false, true, + false, false ], "enumDescriptions": [ @@ -3341,7 +3343,8 @@ "Redirection is disabled.", "Redirection is enabled.", "Redirection is enabled, and has been finalized so cannot be reverted.", - "Redirection is enabled and missing images are copied from GCR" + "Redirection is enabled and missing images are copied from GCR", + "Redirection is partially enabled and missing images are copied from GCR" ], "type": "string" }, diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 729dc7774d8..6ef86ad1411 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -2262,6 +2262,8 @@ type ProjectSettings struct { // finalized so cannot be reverted. // "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING" - Redirection is enabled and // missing images are copied from GCR + // "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING" - Redirection is partially + // enabled and missing images are copied from GCR LegacyRedirectionState string `json:"legacyRedirectionState,omitempty"` // Name: The name of the project's settings. Always of the form: // projects/{project-id}/projectSettings In update request: never set In diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 4ebfd959208..ca37e2ee075 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -1414,7 +1414,7 @@ } } }, - "revision": "20240528", + "revision": "20240603", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -2004,13 +2004,15 @@ "REDIRECTION_FROM_GCR_IO_DISABLED", "REDIRECTION_FROM_GCR_IO_ENABLED", "REDIRECTION_FROM_GCR_IO_FINALIZED", - "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING" + "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING", + "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING" ], "enumDeprecated": [ false, false, false, true, + false, false ], "enumDescriptions": [ @@ -2018,7 +2020,8 @@ "Redirection is disabled.", "Redirection is enabled.", "Redirection is enabled, and has been finalized so cannot be reverted.", - "Redirection is enabled and missing images are copied from GCR" + "Redirection is enabled and missing images are copied from GCR", + "Redirection is partially enabled and missing images are copied from GCR" ], "type": "string" }, diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 518e9dccf1c..87fe32d8451 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -1185,6 +1185,8 @@ type ProjectSettings struct { // finalized so cannot be reverted. // "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING" - Redirection is enabled and // missing images are copied from GCR + // "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING" - Redirection is partially + // enabled and missing images are copied from GCR LegacyRedirectionState string `json:"legacyRedirectionState,omitempty"` // Name: The name of the project's settings. Always of the form: // projects/{project-id}/projectSettings In update request: never set In diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json index a784e2cc229..8ad6eab2297 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json @@ -864,7 +864,7 @@ ] }, "pause": { - "description": "Pauses serving of the given finalized deal. This call only pauses the serving status, and does not affect other fields of the finalized deal. Calling this method for an already paused deal has no effect. This method only applies to programmatic guaranteed deals.", + "description": "Pauses serving of the given finalized deal. This call only pauses the serving status, and does not affect other fields of the finalized deal. Calling this method for an already paused deal has no effect. This method only applies to programmatic guaranteed deals and preferred deals.", "flatPath": "v1/buyers/{buyersId}/finalizedDeals/{finalizedDealsId}:pause", "httpMethod": "POST", "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.pause", @@ -892,7 +892,7 @@ ] }, "resume": { - "description": "Resumes serving of the given finalized deal. Calling this method for an running deal has no effect. If a deal is initially paused by the seller, calling this method will not resume serving of the deal until the seller also resumes the deal. This method only applies to programmatic guaranteed deals.", + "description": "Resumes serving of the given finalized deal. Calling this method for an running deal has no effect. If a deal is initially paused by the seller, calling this method will not resume serving of the deal until the seller also resumes the deal. This method only applies to programmatic guaranteed deals and preferred deals.", "flatPath": "v1/buyers/{buyersId}/finalizedDeals/{finalizedDealsId}:resume", "httpMethod": "POST", "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.resume", @@ -1367,7 +1367,7 @@ } } }, - "revision": "20240508", + "revision": "20240612", "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "schemas": { "AcceptProposalRequest": { diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go index edb5d0cc832..0fd511a64d1 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go @@ -5238,7 +5238,7 @@ type BuyersFinalizedDealsPauseCall struct { // Pause: Pauses serving of the given finalized deal. This call only pauses the // serving status, and does not affect other fields of the finalized deal. // Calling this method for an already paused deal has no effect. This method -// only applies to programmatic guaranteed deals. +// only applies to programmatic guaranteed deals and preferred deals. // // - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`. func (r *BuyersFinalizedDealsService) Pause(name string, pausefinalizeddealrequest *PauseFinalizedDealRequest) *BuyersFinalizedDealsPauseCall { @@ -5343,7 +5343,7 @@ type BuyersFinalizedDealsResumeCall struct { // an running deal has no effect. If a deal is initially paused by the seller, // calling this method will not resume serving of the deal until the seller // also resumes the deal. This method only applies to programmatic guaranteed -// deals. +// deals and preferred deals. // // - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`. func (r *BuyersFinalizedDealsService) Resume(name string, resumefinalizeddealrequest *ResumeFinalizedDealRequest) *BuyersFinalizedDealsResumeCall { diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index fe8d8c931a7..e1baac25f8d 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1935,7 +1935,7 @@ } } }, - "revision": "20240423", + "revision": "20240526", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3160,7 +3160,7 @@ }, "defaultEncryptionConfiguration": { "$ref": "EncryptionConfiguration", - "description": "The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key." + "description": "The default encryption key for all tables in the dataset. After this property is set, the encryption key of all newly-created tables in the dataset is set to this value unless the table creation request or query explicitly overrides the key." }, "defaultPartitionExpirationMs": { "description": "This default partition expiration, expressed in milliseconds. When new time-partitioned tables are created in a dataset where this property is set, the table will inherit this value, propagated as the `TimePartitioning.expirationMs` property on the new table. If you set `TimePartitioning.expirationMs` explicitly when creating a table, the `defaultPartitionExpirationMs` of the containing dataset is ignored. When creating a partitioned table, if `defaultPartitionExpirationMs` is set, the `defaultTableExpirationMs` value is ignored and the table will not be inherit a table expiration deadline.", @@ -3253,6 +3253,13 @@ "format": "int64", "type": "string" }, + "resourceTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The [tags](/bigquery/docs/tags) attached to this dataset. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"123456789012/environment\" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"Production\". See [Tag definitions](/iam/docs/tags-access-control#definitions) for more details.", + "type": "object" + }, "restrictions": { "$ref": "RestrictionConfig", "description": "Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain accesses on the dataset and all its tables based on the config. See [Data egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more details.", @@ -4184,6 +4191,21 @@ }, "type": "object" }, + "ForeignViewDefinition": { + "description": "A view can be represented in multiple ways. Each representation has its own dialect. This message stores the metadata required for these representations.", + "id": "ForeignViewDefinition", + "properties": { + "dialect": { + "description": "Optional. Represents the dialect of the query.", + "type": "string" + }, + "query": { + "description": "Required. The query that defines the view.", + "type": "string" + } + }, + "type": "object" + }, "GetIamPolicyRequest": { "description": "Request message for `GetIamPolicy` method.", "id": "GetIamPolicyRequest", @@ -4846,7 +4868,7 @@ "description": "[Pick one] Configures an extract job." }, "jobTimeoutMs": { - "description": "Optional. Job timeout in milliseconds. If this time limit is exceeded, BigQuery might attempt to stop the job.", + "description": "Optional. Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop a longer job, but may not always succeed in canceling it before the job completes. For example, a job that takes more than 60 seconds to complete has a better chance of being stopped than a job that takes 10 seconds to complete.", "format": "int64", "type": "string" }, @@ -4943,6 +4965,22 @@ "$ref": "Clustering", "description": "Clustering specification for the destination table." }, + "columnNameCharacterMap": { + "description": "Optional. Character map supported for column names in CSV/Parquet loads. Defaults to STRICT and can be overridden by Project Config Service. Using this option with unsupporting load formats will result in an error.", + "enum": [ + "COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED", + "STRICT", + "V1", + "V2" + ], + "enumDescriptions": [ + "Unspecified column name character map.", + "Support flexible column name and reject invalid column names.", + "Support alphanumeric + underscore characters and names must start with a letter or underscore. Invalid column names will be normalized.", + "Support flexible column name. Invalid column names will be normalized." + ], + "type": "string" + }, "connectionProperties": { "description": "Optional. Connection properties which can modify the load job behavior. Currently, only the 'session_id' connection property is supported, and is used to resolve _SESSION appearing as the dataset id.", "items": { @@ -6675,14 +6713,14 @@ "type": "boolean" }, "mapTargetType": { - "description": "Optional. Will indicate how to represent a parquet map if present.", + "description": "Optional. Indicates how to represent a Parquet map if present.", "enum": [ "MAP_TARGET_TYPE_UNSPECIFIED", "ARRAY_OF_STRUCT" ], "enumDescriptions": [ - "In this mode, we fall back to the default. Currently (3/24) we represent the map as: struct map_field_name { repeated struct key_value { key value } }", - "In this mode, we omit parquet's key_value struct and represent the map as: repeated struct map_field_name { key value }" + "In this mode, the map will have the following schema: struct map_field_name { repeated struct key_value { key value } }.", + "In this mode, the map will have the following schema: repeated struct map_field_name { key value }." ], "type": "string" } @@ -8407,6 +8445,12 @@ "readOnly": true, "type": "string" }, + "numCurrentPhysicalBytes": { + "description": "Output only. Number of physical bytes used by current live data storage. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "numLongTermBytes": { "description": "Output only. The number of logical bytes in the table that are considered \"long-term storage\".", "format": "int64", @@ -10137,7 +10181,7 @@ "id": "UndeleteDatasetRequest", "properties": { "deletionTime": { - "description": "Optional. The exact time when the dataset was deleted. If not specified, the most recently deleted version is undeleted.", + "description": "Optional. The exact time when the dataset was deleted. If not specified, the most recently deleted version is undeleted. Undeleting a dataset using deletion time is not supported.", "format": "google-datetime", "type": "string" } @@ -10193,6 +10237,13 @@ "description": "Describes the definition of a logical view.", "id": "ViewDefinition", "properties": { + "foreignDefinitions": { + "description": "Optional. Foreign view representations.", + "items": { + "$ref": "ForeignViewDefinition" + }, + "type": "array" + }, "privacyPolicy": { "$ref": "PrivacyPolicy", "description": "Optional. Specifices the privacy policy for the view." diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 1355d2ee727..5e1d7bd25b3 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -1949,9 +1949,9 @@ type Dataset struct { // '': empty string. Default to case-sensitive behavior. DefaultCollation string `json:"defaultCollation,omitempty"` // DefaultEncryptionConfiguration: The default encryption key for all tables in - // the dataset. Once this property is set, all newly-created partitioned tables - // in the dataset will have encryption key set to this value, unless table - // creation request (or query) overrides the key. + // the dataset. After this property is set, the encryption key of all + // newly-created tables in the dataset is set to this value unless the table + // creation request or query explicitly overrides the key. DefaultEncryptionConfiguration *EncryptionConfiguration `json:"defaultEncryptionConfiguration,omitempty"` // DefaultPartitionExpirationMs: This default partition expiration, expressed // in milliseconds. When new time-partitioned tables are created in a dataset @@ -2046,6 +2046,14 @@ type Dataset struct { // value can be from 48 to 168 hours (2 to 7 days). The default value is 168 // hours if this is not set. MaxTimeTravelHours int64 `json:"maxTimeTravelHours,omitempty,string"` + // ResourceTags: Optional. The tags (/bigquery/docs/tags) attached to this + // dataset. Tag keys are globally unique. Tag key is expected to be in the + // namespaced format, for example "123456789012/environment" where 123456789012 + // is the ID of the parent organization or project resource for this tag key. + // Tag value is expected to be the short name, for example "Production". See + // Tag definitions (/iam/docs/tags-access-control#definitions) for more + // details. + ResourceTags map[string]string `json:"resourceTags,omitempty"` // Restrictions: Optional. Output only. Restriction config for all tables and // dataset. If set, restrict certain accesses on the dataset and all its tables // based on the config. See Data egress @@ -3387,6 +3395,32 @@ func (s *ForeignTypeInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ForeignViewDefinition: A view can be represented in multiple ways. Each +// representation has its own dialect. This message stores the metadata +// required for these representations. +type ForeignViewDefinition struct { + // Dialect: Optional. Represents the dialect of the query. + Dialect string `json:"dialect,omitempty"` + // Query: Required. The query that defines the view. + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Dialect") 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. "Dialect") 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 *ForeignViewDefinition) MarshalJSON() ([]byte, error) { + type NoMethod ForeignViewDefinition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GetIamPolicyRequest: Request message for `GetIamPolicy` method. type GetIamPolicyRequest struct { // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to @@ -4203,7 +4237,10 @@ type JobConfiguration struct { // Extract: [Pick one] Configures an extract job. Extract *JobConfigurationExtract `json:"extract,omitempty"` // JobTimeoutMs: Optional. Job timeout in milliseconds. If this time limit is - // exceeded, BigQuery might attempt to stop the job. + // exceeded, BigQuery will attempt to stop a longer job, but may not always + // succeed in canceling it before the job completes. For example, a job that + // takes more than 60 seconds to complete has a better chance of being stopped + // than a job that takes 10 seconds to complete. JobTimeoutMs int64 `json:"jobTimeoutMs,omitempty,string"` // JobType: Output only. The type of the job. Can be QUERY, LOAD, EXTRACT, COPY // or UNKNOWN. @@ -4313,6 +4350,20 @@ type JobConfigurationLoad struct { Autodetect bool `json:"autodetect,omitempty"` // Clustering: Clustering specification for the destination table. Clustering *Clustering `json:"clustering,omitempty"` + // ColumnNameCharacterMap: Optional. Character map supported for column names + // in CSV/Parquet loads. Defaults to STRICT and can be overridden by Project + // Config Service. Using this option with unsupporting load formats will result + // in an error. + // + // Possible values: + // "COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED" - Unspecified column name + // character map. + // "STRICT" - Support flexible column name and reject invalid column names. + // "V1" - Support alphanumeric + underscore characters and names must start + // with a letter or underscore. Invalid column names will be normalized. + // "V2" - Support flexible column name. Invalid column names will be + // normalized. + ColumnNameCharacterMap string `json:"columnNameCharacterMap,omitempty"` // ConnectionProperties: Optional. Connection properties which can modify the // load job behavior. Currently, only the 'session_id' connection property is // supported, and is used to resolve _SESSION appearing as the dataset id. @@ -6246,15 +6297,15 @@ type ParquetOptions struct { // EnumAsString: Optional. Indicates whether to infer Parquet ENUM logical type // as STRING instead of BYTES by default. EnumAsString bool `json:"enumAsString,omitempty"` - // MapTargetType: Optional. Will indicate how to represent a parquet map if + // MapTargetType: Optional. Indicates how to represent a Parquet map if // present. // // Possible values: - // "MAP_TARGET_TYPE_UNSPECIFIED" - In this mode, we fall back to the default. - // Currently (3/24) we represent the map as: struct map_field_name { repeated - // struct key_value { key value } } - // "ARRAY_OF_STRUCT" - In this mode, we omit parquet's key_value struct and - // represent the map as: repeated struct map_field_name { key value } + // "MAP_TARGET_TYPE_UNSPECIFIED" - In this mode, the map will have the + // following schema: struct map_field_name { repeated struct key_value { key + // value } }. + // "ARRAY_OF_STRUCT" - In this mode, the map will have the following schema: + // repeated struct map_field_name { key value }. MapTargetType string `json:"mapTargetType,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableListInference") to // unconditionally include in API requests. By default, fields with empty or @@ -8451,6 +8502,10 @@ type Table struct { // NumBytes: Output only. The size of this table in logical bytes, excluding // any data in the streaming buffer. NumBytes int64 `json:"numBytes,omitempty,string"` + // NumCurrentPhysicalBytes: Output only. Number of physical bytes used by + // current live data storage. This data is not kept in real time, and might be + // delayed by a few seconds to a few minutes. + NumCurrentPhysicalBytes int64 `json:"numCurrentPhysicalBytes,omitempty,string"` // NumLongTermBytes: Output only. The number of logical bytes in the table that // are considered "long-term storage". NumLongTermBytes int64 `json:"numLongTermBytes,omitempty,string"` @@ -10099,7 +10154,8 @@ func (s *TransformColumn) MarshalJSON() ([]byte, error) { // UndeleteDatasetRequest: Request format for undeleting a dataset. type UndeleteDatasetRequest struct { // DeletionTime: Optional. The exact time when the dataset was deleted. If not - // specified, the most recently deleted version is undeleted. + // specified, the most recently deleted version is undeleted. Undeleting a + // dataset using deletion time is not supported. DeletionTime string `json:"deletionTime,omitempty"` // ForceSendFields is a list of field names (e.g. "DeletionTime") to // unconditionally include in API requests. By default, fields with empty or @@ -10193,6 +10249,8 @@ func (s *VectorSearchStatistics) MarshalJSON() ([]byte, error) { // ViewDefinition: Describes the definition of a logical view. type ViewDefinition struct { + // ForeignDefinitions: Optional. Foreign view representations. + ForeignDefinitions []*ForeignViewDefinition `json:"foreignDefinitions,omitempty"` // PrivacyPolicy: Optional. Specifices the privacy policy for the view. PrivacyPolicy *PrivacyPolicy `json:"privacyPolicy,omitempty"` // Query: Required. A query that BigQuery executes when the view is referenced. @@ -10210,15 +10268,15 @@ type ViewDefinition struct { // UserDefinedFunctionResources: Describes user-defined function resources used // in the query. UserDefinedFunctionResources []*UserDefinedFunctionResource `json:"userDefinedFunctionResources,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrivacyPolicy") to + // ForceSendFields is a list of field names (e.g. "ForeignDefinitions") 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. "PrivacyPolicy") 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. "ForeignDefinitions") 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/bigqueryconnection/v1/bigqueryconnection-api.json b/bigqueryconnection/v1/bigqueryconnection-api.json index 4b9fd688b8d..d8342c20295 100644 --- a/bigqueryconnection/v1/bigqueryconnection-api.json +++ b/bigqueryconnection/v1/bigqueryconnection-api.json @@ -366,7 +366,7 @@ } } }, - "revision": "20240418", + "revision": "20240526", "rootUrl": "https://bigqueryconnection.googleapis.com/", "schemas": { "AuditConfig": { @@ -681,7 +681,7 @@ "properties": { "asset": { "$ref": "ConnectorConfigurationAsset", - "description": "Optional. Data asset." + "description": "Data asset." }, "authentication": { "$ref": "ConnectorConfigurationAuthentication", @@ -707,7 +707,7 @@ "id": "ConnectorConfigurationAsset", "properties": { "database": { - "description": "Optional. Name of the database.", + "description": "Name of the database.", "type": "string" }, "googleCloudResource": { @@ -721,6 +721,11 @@ "description": "Client authentication.", "id": "ConnectorConfigurationAuthentication", "properties": { + "serviceAccount": { + "description": "Output only. Google-managed service account associated with this connection, e.g., `service-{project_number}@gcp-sa-bigqueryconnection.iam.gserviceaccount.com`. BigQuery jobs using this connection will act as `service_account` identity while connecting to the datasource.", + "readOnly": true, + "type": "string" + }, "usernamePassword": { "$ref": "ConnectorConfigurationUsernamePassword", "description": "Username/password authentication." diff --git a/bigqueryconnection/v1/bigqueryconnection-gen.go b/bigqueryconnection/v1/bigqueryconnection-gen.go index ce28b8facb2..12f4f21d2df 100644 --- a/bigqueryconnection/v1/bigqueryconnection-gen.go +++ b/bigqueryconnection/v1/bigqueryconnection-gen.go @@ -665,7 +665,7 @@ func (s *Connection) MarshalJSON() ([]byte, error) { // ConnectorConfiguration: Represents concrete parameter values for Connector // Configuration. type ConnectorConfiguration struct { - // Asset: Optional. Data asset. + // Asset: Data asset. Asset *ConnectorConfigurationAsset `json:"asset,omitempty"` // Authentication: Client authentication. Authentication *ConnectorConfigurationAuthentication `json:"authentication,omitempty"` @@ -699,7 +699,7 @@ func (s *ConnectorConfiguration) MarshalJSON() ([]byte, error) { // system, reachable under specified endpoint. For example a database name in a // SQL DB. type ConnectorConfigurationAsset struct { - // Database: Optional. Name of the database. + // Database: Name of the database. Database string `json:"database,omitempty"` // GoogleCloudResource: Full Google Cloud resource name - // https://cloud.google.com/apis/design/resource_names#full_resource_name. @@ -725,15 +725,21 @@ func (s *ConnectorConfigurationAsset) MarshalJSON() ([]byte, error) { // ConnectorConfigurationAuthentication: Client authentication. type ConnectorConfigurationAuthentication struct { + // ServiceAccount: Output only. Google-managed service account associated with + // this connection, e.g., + // `service-{project_number}@gcp-sa-bigqueryconnection.iam.gserviceaccount.com`. + // BigQuery jobs using this connection will act as `service_account` identity + // while connecting to the datasource. + ServiceAccount string `json:"serviceAccount,omitempty"` // UsernamePassword: Username/password authentication. UsernamePassword *ConnectorConfigurationUsernamePassword `json:"usernamePassword,omitempty"` - // ForceSendFields is a list of field names (e.g. "UsernamePassword") to + // ForceSendFields is a list of field names (e.g. "ServiceAccount") 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. "UsernamePassword") to include in + // NullFields is a list of field names (e.g. "ServiceAccount") 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. diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index b1e01b0ce0a..394fa4bfaf0 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -2,6 +2,21 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/chat.admin.delete": { + "description": "Delete conversations and spaces owned by your organization and remove access to associated files in Google Chat" + }, + "https://www.googleapis.com/auth/chat.admin.memberships": { + "description": "View, add, update and remove members and managers in conversations owned by your organization" + }, + "https://www.googleapis.com/auth/chat.admin.memberships.readonly": { + "description": "View members and managers in conversations owned by your organization" + }, + "https://www.googleapis.com/auth/chat.admin.spaces": { + "description": "View or edit display name, description, and other metadata for all Google Chat conversations owned by your organization" + }, + "https://www.googleapis.com/auth/chat.admin.spaces.readonly": { + "description": "View display name, description, and other metadata for all Google Chat conversations owned by your organization" + }, "https://www.googleapis.com/auth/chat.bot": { "description": "Private Service: https://www.googleapis.com/auth/chat.bot" }, @@ -310,6 +325,7 @@ "$ref": "Empty" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.delete", "https://www.googleapis.com/auth/chat.delete", "https://www.googleapis.com/auth/chat.import" ] @@ -359,13 +375,15 @@ "$ref": "Space" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.spaces", + "https://www.googleapis.com/auth/chat.admin.spaces.readonly", "https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.spaces", "https://www.googleapis.com/auth/chat.spaces.readonly" ] }, "list": { - "description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/workspace/chat/list-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. To list all named spaces by Google Workspace organization, use the `spaces.search()` method using Workspace administrator privileges instead.", + "description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/workspace/chat/list-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. To list all named spaces by Google Workspace organization, use the [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) method using Workspace administrator privileges instead.", "flatPath": "v1/spaces", "httpMethod": "GET", "id": "chat.spaces.list", @@ -429,6 +447,7 @@ "$ref": "Space" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.spaces", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.spaces" ] @@ -481,6 +500,7 @@ "$ref": "Membership" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.memberships", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.app" @@ -508,6 +528,7 @@ "$ref": "Membership" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.memberships", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.app" @@ -535,6 +556,8 @@ "$ref": "Membership" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.memberships", + "https://www.googleapis.com/auth/chat.admin.memberships.readonly", "https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.readonly" @@ -588,6 +611,8 @@ "$ref": "ListMembershipsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.memberships", + "https://www.googleapis.com/auth/chat.admin.memberships.readonly", "https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships", @@ -625,6 +650,7 @@ "$ref": "Membership" }, "scopes": [ + "https://www.googleapis.com/auth/chat.admin.memberships", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships" ] @@ -1215,7 +1241,7 @@ } } }, - "revision": "20240519", + "revision": "20240604", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessoryWidget": { @@ -1665,7 +1691,7 @@ "The add-on launches from Google Sheets.", "The add-on launches from Google Slides.", "The add-on launches from Google Drawings.", - "A Google Chat app. Not used for Google Workspace Add-ons." + "A Google Chat app." ], "type": "string" }, @@ -2692,11 +2718,13 @@ "description": "A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.", "enum": [ "UNKNOWN", - "USER" + "USER", + "DRIVE" ], "enumDescriptions": [ "Default value. Don't use.", - "Google Workspace users. The user can only view and select users from their Google Workspace organization." + "Google Workspace users. The user can only view and select users from their Google Workspace organization.", + "Represents a data source from Google Drive OnePick." ], "type": "string" }, diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 770960542c6..1c02124065c 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -100,6 +100,25 @@ const mtlsBasePath = "https://chat.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( + // Delete conversations and spaces owned by your organization and remove access + // to associated files in Google Chat + ChatAdminDeleteScope = "https://www.googleapis.com/auth/chat.admin.delete" + + // View, add, update and remove members and managers in conversations owned by + // your organization + ChatAdminMembershipsScope = "https://www.googleapis.com/auth/chat.admin.memberships" + + // View members and managers in conversations owned by your organization + ChatAdminMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.admin.memberships.readonly" + + // View or edit display name, description, and other metadata for all Google + // Chat conversations owned by your organization + ChatAdminSpacesScope = "https://www.googleapis.com/auth/chat.admin.spaces" + + // View display name, description, and other metadata for all Google Chat + // conversations owned by your organization + ChatAdminSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.admin.spaces.readonly" + // Private Service: https://www.googleapis.com/auth/chat.bot ChatBotScope = "https://www.googleapis.com/auth/chat.bot" @@ -158,6 +177,11 @@ const ( // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/chat.admin.delete", + "https://www.googleapis.com/auth/chat.admin.memberships", + "https://www.googleapis.com/auth/chat.admin.memberships.readonly", + "https://www.googleapis.com/auth/chat.admin.spaces", + "https://www.googleapis.com/auth/chat.admin.spaces.readonly", "https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.delete", "https://www.googleapis.com/auth/chat.import", @@ -1026,7 +1050,7 @@ type CommonEventObject struct { // "SHEETS" - The add-on launches from Google Sheets. // "SLIDES" - The add-on launches from Google Slides. // "DRAWINGS" - The add-on launches from Google Drawings. - // "CHAT" - A Google Chat app. Not used for Google Workspace Add-ons. + // "CHAT" - A Google Chat app. HostApp string `json:"hostApp,omitempty"` // InvokedFunction: Name of the invoked function associated with the widget. // Only set for Chat apps. @@ -2564,6 +2588,7 @@ type GoogleAppsCardV1PlatformDataSource struct { // "UNKNOWN" - Default value. Don't use. // "USER" - Google Workspace users. The user can only view and select users // from their Google Workspace organization. + // "DRIVE" - Represents a data source from Google Drive OnePick. CommonDataSource string `json:"commonDataSource,omitempty"` // HostAppDataSource: A data source that's unique to a Google Workspace host // application, such spaces in Google Chat. @@ -6178,8 +6203,9 @@ type SpacesListCall struct { // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). // Lists spaces visible to the caller or authenticated user. Group chats and // DMs aren't listed until the first message is sent. To list all named spaces -// by Google Workspace organization, use the `spaces.search()` method using -// Workspace administrator privileges instead. +// by Google Workspace organization, use the `spaces.search()` +// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) +// method using Workspace administrator privileges instead. func (r *SpacesService) List() *SpacesListCall { c := &SpacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c diff --git a/civicinfo/v2/civicinfo-api.json b/civicinfo/v2/civicinfo-api.json index baf5491307a..9ee61279934 100644 --- a/civicinfo/v2/civicinfo-api.json +++ b/civicinfo/v2/civicinfo-api.json @@ -143,14 +143,11 @@ "flatPath": "civicinfo/v2/voterinfo", "httpMethod": "GET", "id": "civicinfo.elections.voterInfoQuery", - "parameterOrder": [ - "address" - ], + "parameterOrder": [], "parameters": { "address": { "description": "The registered address of the voter to look up.", "location": "query", - "required": true, "type": "string" }, "electionId": { @@ -365,7 +362,7 @@ } } }, - "revision": "20230613", + "revision": "20240611", "rootUrl": "https://civicinfo.googleapis.com/", "schemas": { "AdministrationRegion": { diff --git a/civicinfo/v2/civicinfo-gen.go b/civicinfo/v2/civicinfo-gen.go index 7ed663cab35..5b0051a7d62 100644 --- a/civicinfo/v2/civicinfo-gen.go +++ b/civicinfo/v2/civicinfo-gen.go @@ -1341,10 +1341,14 @@ type ElectionsVoterInfoQueryCall struct { // VoterInfoQuery: Looks up information relevant to a voter based on the // voter's registered address. -// -// - address: The registered address of the voter to look up. -func (r *ElectionsService) VoterInfoQuery(address string) *ElectionsVoterInfoQueryCall { +func (r *ElectionsService) VoterInfoQuery() *ElectionsVoterInfoQueryCall { c := &ElectionsVoterInfoQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Address sets the optional parameter "address": The registered address of the +// voter to look up. +func (c *ElectionsVoterInfoQueryCall) Address(address string) *ElectionsVoterInfoQueryCall { c.urlParams_.Set("address", address) return c } diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 373f7f7b94d..03894ded237 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20240412", + "revision": "20240608", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -2584,7 +2584,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", "type": "string" }, "title": { @@ -2599,11 +2599,11 @@ "id": "GoogleIdentityAccesscontextmanagerV1AccessPolicy", "properties": { "etag": { - "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", + "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Policies will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", "type": "string" }, "name": { - "description": "Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", + "description": "Output only. Identifier. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", "type": "string" }, "parent": { @@ -3047,7 +3047,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", "type": "string" }, "perimeterType": { @@ -4075,7 +4075,7 @@ "type": "object" }, "ResourceSearchResult": { - "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 34", + "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 36", "id": "ResourceSearchResult", "properties": { "additionalAttributes": { @@ -4140,7 +4140,7 @@ "additionalProperties": { "type": "string" }, - "description": "Labels associated with this resource. See [Labelling and grouping Google Cloud resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information. This field is available only when the resource's Protobuf contains it. To search against the `labels`: * Use a field query: - query on any label's key or value. Example: `labels:prod` - query by a given label. Example: `labels.env:prod` - query by a given label's existence. Example: `labels.env:*` * Use a free text query. Example: `prod`", + "description": "User labels associated with this resource. See [Labelling and grouping Google Cloud resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information. This field is available only when the resource's Protobuf contains it. To search against the `labels`: * Use a field query: - query on any label's key or value. Example: `labels:prod` - query by a given label. Example: `labels.env:prod` - query by a given label's existence. Example: `labels.env:*` * Use a free text query. Example: `prod`", "type": "object" }, "location": { diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index f65aa0bb725..8ca87011267 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -2642,7 +2642,7 @@ type GoogleIdentityAccesscontextmanagerV1AccessLevel struct { // Description: Description of the `AccessLevel` and its use. Does not affect // behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `AccessLevel`. Format: + // Name: Identifier. Resource name for the `AccessLevel`. Format: // `accessPolicies/{access_policy}/accessLevels/{access_level}`. The // `access_level` component must begin with a letter, followed by alphanumeric // characters or `_`. Its maximum length is 50 characters. After you create an @@ -2677,10 +2677,10 @@ func (s *GoogleIdentityAccesscontextmanagerV1AccessLevel) MarshalJSON() ([]byte, type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // Etag: Output only. An opaque identifier for the current version of the // `AccessPolicy`. This will always be a strongly validated etag, meaning that - // two Access Polices will be identical if and only if their etags are + // two Access Policies will be identical if and only if their etags are // identical. Clients should not expect this to be in any specific format. Etag string `json:"etag,omitempty"` - // Name: Output only. Resource name of the `AccessPolicy`. Format: + // Name: Output only. Identifier. Resource name of the `AccessPolicy`. Format: // `accessPolicies/{access_policy}` Name string `json:"name,omitempty"` // Parent: Required. The parent of this `AccessPolicy` in the Cloud Resource @@ -3344,7 +3344,7 @@ type GoogleIdentityAccesscontextmanagerV1ServicePerimeter struct { // Description: Description of the `ServicePerimeter` and its use. Does not // affect behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `ServicePerimeter`. Format: + // Name: Identifier. Resource name for the `ServicePerimeter`. Format: // `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The // `service_perimeter` component must begin with a letter, followed by // alphanumeric characters or `_`. After you create a `ServicePerimeter`, you @@ -4944,7 +4944,7 @@ func (s *Resource) MarshalJSON() ([]byte, error) { } // ResourceSearchResult: A result of Resource Search, containing information of -// a cloud resource. Next ID: 34 +// a cloud resource. Next ID: 36 type ResourceSearchResult struct { // AdditionalAttributes: The additional searchable attributes of this resource. // The attributes may vary from one resource type to another. Examples: @@ -5029,8 +5029,8 @@ type ResourceSearchResult struct { // it. To search against the `kms_keys`: * Use a field query. Example: // `kmsKeys:key` * Use a free text query. Example: `key` KmsKeys []string `json:"kmsKeys,omitempty"` - // Labels: Labels associated with this resource. See Labelling and grouping - // Google Cloud resources + // Labels: User labels associated with this resource. See Labelling and + // grouping Google Cloud resources // (https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) // for more information. This field is available only when the resource's // Protobuf contains it. To search against the `labels`: * Use a field query: - diff --git a/cloudasset/v1beta1/cloudasset-api.json b/cloudasset/v1beta1/cloudasset-api.json index c84f8d19bb0..532cbb141df 100644 --- a/cloudasset/v1beta1/cloudasset-api.json +++ b/cloudasset/v1beta1/cloudasset-api.json @@ -411,7 +411,7 @@ } } }, - "revision": "20240412", + "revision": "20240608", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -909,7 +909,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", "type": "string" }, "title": { @@ -924,11 +924,11 @@ "id": "GoogleIdentityAccesscontextmanagerV1AccessPolicy", "properties": { "etag": { - "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", + "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Policies will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", "type": "string" }, "name": { - "description": "Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", + "description": "Output only. Identifier. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", "type": "string" }, "parent": { @@ -1372,7 +1372,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", "type": "string" }, "perimeterType": { diff --git a/cloudasset/v1beta1/cloudasset-gen.go b/cloudasset/v1beta1/cloudasset-gen.go index 1bdc98d39ac..fb16354cbd8 100644 --- a/cloudasset/v1beta1/cloudasset-gen.go +++ b/cloudasset/v1beta1/cloudasset-gen.go @@ -1114,7 +1114,7 @@ type GoogleIdentityAccesscontextmanagerV1AccessLevel struct { // Description: Description of the `AccessLevel` and its use. Does not affect // behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `AccessLevel`. Format: + // Name: Identifier. Resource name for the `AccessLevel`. Format: // `accessPolicies/{access_policy}/accessLevels/{access_level}`. The // `access_level` component must begin with a letter, followed by alphanumeric // characters or `_`. Its maximum length is 50 characters. After you create an @@ -1149,10 +1149,10 @@ func (s *GoogleIdentityAccesscontextmanagerV1AccessLevel) MarshalJSON() ([]byte, type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // Etag: Output only. An opaque identifier for the current version of the // `AccessPolicy`. This will always be a strongly validated etag, meaning that - // two Access Polices will be identical if and only if their etags are + // two Access Policies will be identical if and only if their etags are // identical. Clients should not expect this to be in any specific format. Etag string `json:"etag,omitempty"` - // Name: Output only. Resource name of the `AccessPolicy`. Format: + // Name: Output only. Identifier. Resource name of the `AccessPolicy`. Format: // `accessPolicies/{access_policy}` Name string `json:"name,omitempty"` // Parent: Required. The parent of this `AccessPolicy` in the Cloud Resource @@ -1816,7 +1816,7 @@ type GoogleIdentityAccesscontextmanagerV1ServicePerimeter struct { // Description: Description of the `ServicePerimeter` and its use. Does not // affect behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `ServicePerimeter`. Format: + // Name: Identifier. Resource name for the `ServicePerimeter`. Format: // `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The // `service_perimeter` component must begin with a letter, followed by // alphanumeric characters or `_`. After you create a `ServicePerimeter`, you diff --git a/cloudasset/v1p1beta1/cloudasset-api.json b/cloudasset/v1p1beta1/cloudasset-api.json index 61b28bf7956..cdc9c5465ef 100644 --- a/cloudasset/v1p1beta1/cloudasset-api.json +++ b/cloudasset/v1p1beta1/cloudasset-api.json @@ -207,7 +207,7 @@ } } }, - "revision": "20240412", + "revision": "20240608", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -611,7 +611,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", "type": "string" }, "title": { @@ -626,11 +626,11 @@ "id": "GoogleIdentityAccesscontextmanagerV1AccessPolicy", "properties": { "etag": { - "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", + "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Policies will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", "type": "string" }, "name": { - "description": "Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", + "description": "Output only. Identifier. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", "type": "string" }, "parent": { @@ -1074,7 +1074,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", "type": "string" }, "perimeterType": { diff --git a/cloudasset/v1p1beta1/cloudasset-gen.go b/cloudasset/v1p1beta1/cloudasset-gen.go index 90ba5689fda..1a95995e4de 100644 --- a/cloudasset/v1p1beta1/cloudasset-gen.go +++ b/cloudasset/v1p1beta1/cloudasset-gen.go @@ -925,7 +925,7 @@ type GoogleIdentityAccesscontextmanagerV1AccessLevel struct { // Description: Description of the `AccessLevel` and its use. Does not affect // behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `AccessLevel`. Format: + // Name: Identifier. Resource name for the `AccessLevel`. Format: // `accessPolicies/{access_policy}/accessLevels/{access_level}`. The // `access_level` component must begin with a letter, followed by alphanumeric // characters or `_`. Its maximum length is 50 characters. After you create an @@ -960,10 +960,10 @@ func (s *GoogleIdentityAccesscontextmanagerV1AccessLevel) MarshalJSON() ([]byte, type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // Etag: Output only. An opaque identifier for the current version of the // `AccessPolicy`. This will always be a strongly validated etag, meaning that - // two Access Polices will be identical if and only if their etags are + // two Access Policies will be identical if and only if their etags are // identical. Clients should not expect this to be in any specific format. Etag string `json:"etag,omitempty"` - // Name: Output only. Resource name of the `AccessPolicy`. Format: + // Name: Output only. Identifier. Resource name of the `AccessPolicy`. Format: // `accessPolicies/{access_policy}` Name string `json:"name,omitempty"` // Parent: Required. The parent of this `AccessPolicy` in the Cloud Resource @@ -1627,7 +1627,7 @@ type GoogleIdentityAccesscontextmanagerV1ServicePerimeter struct { // Description: Description of the `ServicePerimeter` and its use. Does not // affect behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `ServicePerimeter`. Format: + // Name: Identifier. Resource name for the `ServicePerimeter`. Format: // `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The // `service_perimeter` component must begin with a letter, followed by // alphanumeric characters or `_`. After you create a `ServicePerimeter`, you diff --git a/cloudasset/v1p5beta1/cloudasset-api.json b/cloudasset/v1p5beta1/cloudasset-api.json index 446866e9cd3..b14e0d57bd1 100644 --- a/cloudasset/v1p5beta1/cloudasset-api.json +++ b/cloudasset/v1p5beta1/cloudasset-api.json @@ -177,7 +177,7 @@ } } }, - "revision": "20240412", + "revision": "20240608", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -616,7 +616,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", "type": "string" }, "title": { @@ -631,11 +631,11 @@ "id": "GoogleIdentityAccesscontextmanagerV1AccessPolicy", "properties": { "etag": { - "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", + "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Policies will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", "type": "string" }, "name": { - "description": "Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", + "description": "Output only. Identifier. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", "type": "string" }, "parent": { @@ -1079,7 +1079,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", "type": "string" }, "perimeterType": { diff --git a/cloudasset/v1p5beta1/cloudasset-gen.go b/cloudasset/v1p5beta1/cloudasset-gen.go index fa9d9b2e9fd..a2854b60962 100644 --- a/cloudasset/v1p5beta1/cloudasset-gen.go +++ b/cloudasset/v1p5beta1/cloudasset-gen.go @@ -959,7 +959,7 @@ type GoogleIdentityAccesscontextmanagerV1AccessLevel struct { // Description: Description of the `AccessLevel` and its use. Does not affect // behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `AccessLevel`. Format: + // Name: Identifier. Resource name for the `AccessLevel`. Format: // `accessPolicies/{access_policy}/accessLevels/{access_level}`. The // `access_level` component must begin with a letter, followed by alphanumeric // characters or `_`. Its maximum length is 50 characters. After you create an @@ -994,10 +994,10 @@ func (s *GoogleIdentityAccesscontextmanagerV1AccessLevel) MarshalJSON() ([]byte, type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // Etag: Output only. An opaque identifier for the current version of the // `AccessPolicy`. This will always be a strongly validated etag, meaning that - // two Access Polices will be identical if and only if their etags are + // two Access Policies will be identical if and only if their etags are // identical. Clients should not expect this to be in any specific format. Etag string `json:"etag,omitempty"` - // Name: Output only. Resource name of the `AccessPolicy`. Format: + // Name: Output only. Identifier. Resource name of the `AccessPolicy`. Format: // `accessPolicies/{access_policy}` Name string `json:"name,omitempty"` // Parent: Required. The parent of this `AccessPolicy` in the Cloud Resource @@ -1661,7 +1661,7 @@ type GoogleIdentityAccesscontextmanagerV1ServicePerimeter struct { // Description: Description of the `ServicePerimeter` and its use. Does not // affect behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `ServicePerimeter`. Format: + // Name: Identifier. Resource name for the `ServicePerimeter`. Format: // `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The // `service_perimeter` component must begin with a letter, followed by // alphanumeric characters or `_`. After you create a `ServicePerimeter`, you diff --git a/cloudasset/v1p7beta1/cloudasset-api.json b/cloudasset/v1p7beta1/cloudasset-api.json index 32fa6a7fa3c..136b95fa7dd 100644 --- a/cloudasset/v1p7beta1/cloudasset-api.json +++ b/cloudasset/v1p7beta1/cloudasset-api.json @@ -167,7 +167,7 @@ } } }, - "revision": "20240412", + "revision": "20240608", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -685,7 +685,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.", "type": "string" }, "title": { @@ -700,11 +700,11 @@ "id": "GoogleIdentityAccesscontextmanagerV1AccessPolicy", "properties": { "etag": { - "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", + "description": "Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Policies will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.", "type": "string" }, "name": { - "description": "Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", + "description": "Output only. Identifier. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`", "type": "string" }, "parent": { @@ -1148,7 +1148,7 @@ "type": "string" }, "name": { - "description": "Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", + "description": "Identifier. Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.", "type": "string" }, "perimeterType": { diff --git a/cloudasset/v1p7beta1/cloudasset-gen.go b/cloudasset/v1p7beta1/cloudasset-gen.go index 2c68a50b954..1bb92526bd0 100644 --- a/cloudasset/v1p7beta1/cloudasset-gen.go +++ b/cloudasset/v1p7beta1/cloudasset-gen.go @@ -1135,7 +1135,7 @@ type GoogleIdentityAccesscontextmanagerV1AccessLevel struct { // Description: Description of the `AccessLevel` and its use. Does not affect // behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `AccessLevel`. Format: + // Name: Identifier. Resource name for the `AccessLevel`. Format: // `accessPolicies/{access_policy}/accessLevels/{access_level}`. The // `access_level` component must begin with a letter, followed by alphanumeric // characters or `_`. Its maximum length is 50 characters. After you create an @@ -1170,10 +1170,10 @@ func (s *GoogleIdentityAccesscontextmanagerV1AccessLevel) MarshalJSON() ([]byte, type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // Etag: Output only. An opaque identifier for the current version of the // `AccessPolicy`. This will always be a strongly validated etag, meaning that - // two Access Polices will be identical if and only if their etags are + // two Access Policies will be identical if and only if their etags are // identical. Clients should not expect this to be in any specific format. Etag string `json:"etag,omitempty"` - // Name: Output only. Resource name of the `AccessPolicy`. Format: + // Name: Output only. Identifier. Resource name of the `AccessPolicy`. Format: // `accessPolicies/{access_policy}` Name string `json:"name,omitempty"` // Parent: Required. The parent of this `AccessPolicy` in the Cloud Resource @@ -1837,7 +1837,7 @@ type GoogleIdentityAccesscontextmanagerV1ServicePerimeter struct { // Description: Description of the `ServicePerimeter` and its use. Does not // affect behavior. Description string `json:"description,omitempty"` - // Name: Resource name for the `ServicePerimeter`. Format: + // Name: Identifier. Resource name for the `ServicePerimeter`. Format: // `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The // `service_perimeter` component must begin with a letter, followed by // alphanumeric characters or `_`. After you create a `ServicePerimeter`, you diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index 91bc7aeb976..b48f0071934 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -453,7 +453,7 @@ "type": "string" }, "parent": { - "description": "Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}", + "description": "Required. Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -592,7 +592,7 @@ ], "parameters": { "name": { - "description": "Optional. The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", + "description": "The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", "location": "path", "pattern": "^projects/[^/]+/githubEnterpriseConfigs/[^/]+$", "required": true, @@ -1384,7 +1384,7 @@ "type": "string" }, "parent": { - "description": "Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}", + "description": "Required. Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1523,7 +1523,7 @@ ], "parameters": { "name": { - "description": "Optional. The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", + "description": "The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/githubEnterpriseConfigs/[^/]+$", "required": true, @@ -2024,7 +2024,7 @@ "type": "string" }, "updateMask": { - "description": "A mask specifying which fields in `worker_pool` to update.", + "description": "Optional. A mask specifying which fields in `worker_pool` to update.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2346,7 +2346,7 @@ } } }, - "revision": "20240519", + "revision": "20240609", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -3908,7 +3908,7 @@ "type": "string" }, "displayName": { - "description": "Name to display for this config.", + "description": "Optional. Name to display for this config.", "type": "string" }, "hostUrl": { @@ -3916,7 +3916,7 @@ "type": "string" }, "name": { - "description": "Optional. The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", + "description": "The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", "type": "string" }, "peeredNetwork": { @@ -3925,7 +3925,7 @@ }, "secrets": { "$ref": "GitHubEnterpriseSecrets", - "description": "Names of secrets in Secret Manager." + "description": "Optional. Names of secrets in Secret Manager." }, "sslCa": { "description": "Optional. SSL certificate to use for requests to GitHub Enterprise.", @@ -3986,7 +3986,7 @@ "id": "GitHubEventsConfig", "properties": { "enterpriseConfigResourceName": { - "description": "Optional. The resource name of the github enterprise config that should be applied to this installation. For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", + "description": "The resource name of the github enterprise config that should be applied to this installation. For example: \"projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}\"", "type": "string" }, "installationId": { @@ -4713,7 +4713,7 @@ "type": "string" }, "topic": { - "description": "The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`.", + "description": "Optional. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`.", "type": "string" } }, @@ -5449,7 +5449,7 @@ "type": "string" }, "machineType": { - "description": "Machine type of a worker, such as `e2-medium`. See [Worker pool config file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). If left blank, Cloud Build will use a sensible default.", + "description": "Optional. Machine type of a worker, such as `e2-medium`. See [Worker pool config file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). If left blank, Cloud Build will use a sensible default.", "type": "string" } }, diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index 91aa7dafb7c..c55960959d7 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -2177,12 +2177,11 @@ type GitHubEnterpriseConfig struct { // CreateTime: Output only. Time when the installation was associated with the // project. CreateTime string `json:"createTime,omitempty"` - // DisplayName: Name to display for this config. + // DisplayName: Optional. Name to display for this config. DisplayName string `json:"displayName,omitempty"` // HostUrl: The URL of the github enterprise host the configuration is for. HostUrl string `json:"hostUrl,omitempty"` - // Name: Optional. The full resource name for the GitHubEnterpriseConfig For - // example: + // Name: The full resource name for the GitHubEnterpriseConfig For example: // "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$co // nfig_id}" Name string `json:"name,omitempty"` @@ -2195,7 +2194,7 @@ type GitHubEnterpriseConfig struct { // `projects/{project}/global/networks/{network}`, where {project} is a project // number or id and {network} is the name of a VPC network in the project. PeeredNetwork string `json:"peeredNetwork,omitempty"` - // Secrets: Names of secrets in Secret Manager. + // Secrets: Optional. Names of secrets in Secret Manager. Secrets *GitHubEnterpriseSecrets `json:"secrets,omitempty"` // SslCa: Optional. SSL certificate to use for requests to GitHub Enterprise. SslCa string `json:"sslCa,omitempty"` @@ -2269,8 +2268,8 @@ func (s *GitHubEnterpriseSecrets) MarshalJSON() ([]byte, error) { // GitHubEventsConfig: GitHubEventsConfig describes the configuration of a // trigger that creates a build whenever a GitHub event is received. type GitHubEventsConfig struct { - // EnterpriseConfigResourceName: Optional. The resource name of the github - // enterprise config that should be applied to this installation. For example: + // EnterpriseConfigResourceName: The resource name of the github enterprise + // config that should be applied to this installation. For example: // "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$co // nfig_id}" EnterpriseConfigResourceName string `json:"enterpriseConfigResourceName,omitempty"` @@ -3269,8 +3268,8 @@ type PubsubConfig struct { // Subscription: Output only. Name of the subscription. Format is // `projects/{project}/subscriptions/{subscription}`. Subscription string `json:"subscription,omitempty"` - // Topic: The name of the topic from which this subscription is receiving - // messages. Format is `projects/{project}/topics/{topic}`. + // Topic: Optional. The name of the topic from which this subscription is + // receiving messages. Format is `projects/{project}/topics/{topic}`. Topic string `json:"topic,omitempty"` // ForceSendFields is a list of field names (e.g. "ServiceAccountEmail") to // unconditionally include in API requests. By default, fields with empty or @@ -4264,8 +4263,8 @@ type WorkerConfig struct { // Specify a value of up to 2000. If `0` is specified, Cloud Build will use a // standard disk size. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // MachineType: Machine type of a worker, such as `e2-medium`. See Worker pool - // config file + // MachineType: Optional. Machine type of a worker, such as `e2-medium`. See + // Worker pool config file // (https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). // If left blank, Cloud Build will use a sensible default. MachineType string `json:"machineType,omitempty"` @@ -5994,8 +5993,7 @@ type ProjectsGithubEnterpriseConfigsPatchCall struct { // Patch: Update an association between a GCP project and a GitHub Enterprise // server. // -// - name: Optional. The full resource name for the GitHubEnterpriseConfig For -// example: +// - name: The full resource name for the GitHubEnterpriseConfig For example: // "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$ // config_id}". func (r *ProjectsGithubEnterpriseConfigsService) Patch(name string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsGithubEnterpriseConfigsPatchCall { @@ -9266,8 +9264,7 @@ type ProjectsLocationsGithubEnterpriseConfigsPatchCall struct { // Patch: Update an association between a GCP project and a GitHub Enterprise // server. // -// - name: Optional. The full resource name for the GitHubEnterpriseConfig For -// example: +// - name: The full resource name for the GitHubEnterpriseConfig For example: // "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$ // config_id}". func (r *ProjectsLocationsGithubEnterpriseConfigsService) Patch(name string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsLocationsGithubEnterpriseConfigsPatchCall { diff --git a/cloudbuild/v2/cloudbuild-api.json b/cloudbuild/v2/cloudbuild-api.json index bae79739ac2..0b40339c03e 100644 --- a/cloudbuild/v2/cloudbuild-api.json +++ b/cloudbuild/v2/cloudbuild-api.json @@ -844,7 +844,7 @@ } } }, - "revision": "20240528", + "revision": "20240609", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "AuditConfig": { @@ -2723,6 +2723,20 @@ "description": "Name of the container specified as a DNS_LABEL.", "type": "string" }, + "onError": { + "description": "Optional. OnError defines the exiting behavior on error can be set to [ continue | stopAndFail ]", + "enum": [ + "ON_ERROR_TYPE_UNSPECIFIED", + "STOP_AND_FAIL", + "CONTINUE" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "StopAndFail indicates exit if the step/task exits with non-zero exit code", + "Continue indicates continue executing the rest of the steps/tasks irrespective of the exit code" + ], + "type": "string" + }, "params": { "description": "Optional. Optional parameters passed to the StepAction.", "items": { diff --git a/cloudbuild/v2/cloudbuild-gen.go b/cloudbuild/v2/cloudbuild-gen.go index a3167b10261..2d848cbf444 100644 --- a/cloudbuild/v2/cloudbuild-gen.go +++ b/cloudbuild/v2/cloudbuild-gen.go @@ -2441,6 +2441,16 @@ type Step struct { Image string `json:"image,omitempty"` // Name: Name of the container specified as a DNS_LABEL. Name string `json:"name,omitempty"` + // OnError: Optional. OnError defines the exiting behavior on error can be set + // to [ continue | stopAndFail ] + // + // Possible values: + // "ON_ERROR_TYPE_UNSPECIFIED" - Default enum type; should not be used. + // "STOP_AND_FAIL" - StopAndFail indicates exit if the step/task exits with + // non-zero exit code + // "CONTINUE" - Continue indicates continue executing the rest of the + // steps/tasks irrespective of the exit code + OnError string `json:"onError,omitempty"` // Params: Optional. Optional parameters passed to the StepAction. Params []*Param `json:"params,omitempty"` // Ref: Optional. Optional reference to a remote StepAction. diff --git a/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json b/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json index df5cc61f6ab..86e9c7724c0 100644 --- a/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json +++ b/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json @@ -119,7 +119,7 @@ ], "parameters": { "name": { - "description": "The resource name of the account. Required.", + "description": "Required. The resource name of the account, with the format `providers/{providerId}/accounts/{accountId}`.", "location": "path", "pattern": "^providers/[^/]+/accounts/[^/]+$", "required": true, @@ -147,7 +147,7 @@ ], "parameters": { "name": { - "description": "The name of the account to retrieve.", + "description": "Required. The name of the account to retrieve.", "location": "path", "pattern": "^providers/[^/]+/accounts/[^/]+$", "required": true, @@ -172,7 +172,7 @@ ], "parameters": { "pageSize": { - "description": "The maximum number of entries that are requested The default page size is 25 and the maximum page size is 200.", + "description": "The maximum number of entries that are requested. The default page size is 25 and the maximum page size is 200.", "format": "int32", "location": "query", "type": "integer" @@ -183,7 +183,7 @@ "type": "string" }, "parent": { - "description": "The parent resource name.", + "description": "Required. The parent resource name.", "location": "path", "pattern": "^providers/[^/]+$", "required": true, @@ -208,7 +208,7 @@ ], "parameters": { "name": { - "description": "The resource name of the account. Required.", + "description": "Required. The resource name of the account.", "location": "path", "pattern": "^providers/[^/]+/accounts/[^/]+$", "required": true, @@ -227,7 +227,7 @@ ] }, "reset": { - "description": "Resets an Account and cancel all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.", + "description": "Resets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.", "flatPath": "v1/providers/{providersId}/accounts/{accountsId}:reset", "httpMethod": "POST", "id": "cloudcommerceprocurement.providers.accounts.reset", @@ -236,7 +236,7 @@ ], "parameters": { "name": { - "description": "The resource name of the account. Required.", + "description": "Required. The resource name of the account.", "location": "path", "pattern": "^providers/[^/]+/accounts/[^/]+$", "required": true, @@ -268,7 +268,7 @@ ], "parameters": { "name": { - "description": "The resource name of the entitlement. Required.", + "description": "Required. The resource name of the entitlement, with the format `providers/{providerId}/entitlements/{entitlementId}`.", "location": "path", "pattern": "^providers/[^/]+/entitlements/[^/]+$", "required": true, @@ -296,7 +296,7 @@ ], "parameters": { "name": { - "description": "The resource name of the entitlement. Required.", + "description": "Required. The resource name of the entitlement.", "location": "path", "pattern": "^providers/[^/]+/entitlements/[^/]+$", "required": true, @@ -324,7 +324,7 @@ ], "parameters": { "name": { - "description": "The name of the entitlement to retrieve.", + "description": "Required. The name of the entitlement to retrieve.", "location": "path", "pattern": "^providers/[^/]+/entitlements/[^/]+$", "required": true, @@ -349,7 +349,7 @@ ], "parameters": { "filter": { - "description": "The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and `plan!=foo-plan`. Supported query attributes are * `account` * `customer_billing_account` with value in the format of: `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or `new_pending_plan` * `state` * `consumers.project` Note that the consumers match works on repeated structures, so equality (`consumers.project=projects/123456789`) is not supported. Set membership can be expressed with the `:` operator. For example, `consumers.project:projects/123456789` finds entitlements with at least one consumer with project field equal to `projects/123456789`. Also note that the state name match is case-insensitive and query can omit the prefix \"ENTITLEMENT_\". For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, `product=\"providerId:productId\"`, where the product name needs to be quoted because it contains special character colon. Queries can be combined with `AND`, `OR`, and `NOT` to form more complex queries. They can also be grouped to force a desired evaluation order. For example, `state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective `AND` can be omitted between two predicates. For example `account=E-1234 state=active` is equivalent to `account=E-1234 AND state=active`.", + "description": "The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and `plan!=foo-plan`. Supported query attributes are * `account` * `customer_billing_account` with value in the format of: `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or `new_pending_plan` * `state` * `consumers.project` * `change_history.new_offer` Note that the consumers and change_history.new_offer match works on repeated structures, so equality (`consumers.project=projects/123456789`) is not supported. Set membership can be expressed with the `:` operator. For example, `consumers.project:projects/123456789` finds entitlements with at least one consumer with project field equal to `projects/123456789`. `change_history.new_offer` retrieves all entitlements that were once associated or are currently active with the offer. Also note that the state name match is case-insensitive and query can omit the prefix \"ENTITLEMENT_\". For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, `product=\"providerId:productId\"`, where the product name needs to be quoted because it contains special character colon. Queries can be combined with `AND`, `OR`, and `NOT` to form more complex queries. They can also be grouped to force a desired evaluation order. For example, `state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective `AND` can be omitted between two predicates. For example `account=E-1234 state=active` is equivalent to `account=E-1234 AND state=active`.", "location": "query", "type": "string" }, @@ -365,7 +365,7 @@ "type": "string" }, "parent": { - "description": "The parent resource name.", + "description": "Required. The parent resource name.", "location": "path", "pattern": "^providers/[^/]+$", "required": true, @@ -390,7 +390,7 @@ ], "parameters": { "name": { - "description": "The name of the entitlement to update.", + "description": "Required. The name of the entitlement to update.", "location": "path", "pattern": "^providers/[^/]+/entitlements/[^/]+$", "required": true, @@ -424,7 +424,7 @@ ], "parameters": { "name": { - "description": "The resource name of the entitlement. Required.", + "description": "Required. The resource name of the entitlement.", "location": "path", "pattern": "^providers/[^/]+/entitlements/[^/]+$", "required": true, @@ -452,7 +452,7 @@ ], "parameters": { "name": { - "description": "The resource name of the entitlement. Required.", + "description": "Required. The resource name of the entitlement.", "location": "path", "pattern": "^providers/[^/]+/entitlements/[^/]+$", "required": true, @@ -480,7 +480,7 @@ ], "parameters": { "name": { - "description": "The name of the entitlement to suspend.", + "description": "Required. The name of the entitlement to suspend.", "location": "path", "pattern": "^providers/[^/]+/entitlements/[^/]+$", "required": true, @@ -503,7 +503,7 @@ } } }, - "revision": "20220422", + "revision": "20240609", "rootUrl": "https://cloudcommerceprocurement.googleapis.com/", "schemas": { "Account": { @@ -527,6 +527,7 @@ "description": "Properties of the object.", "type": "any" }, + "deprecated": true, "description": "Output only. The custom properties that were collected from the user to create this account.", "type": "object" }, @@ -623,7 +624,7 @@ "id": "ApproveEntitlementPlanChangeRequest", "properties": { "pendingPlanName": { - "description": "Name of the pending plan that is being approved. Required.", + "description": "Required. Name of the pending plan that's being approved.", "type": "string" } }, @@ -634,13 +635,14 @@ "id": "ApproveEntitlementRequest", "properties": { "entitlementMigrated": { - "description": "Optional. The resource name of the entitlement that was migrated. Format: providers/{provider_id}/entitlements/{entitlement_id}. Should only be sent when resources have been migrated from entitlement_migrated to the new entitlement. Optional.", + "description": "Optional. The resource name of the entitlement that was migrated, with the format `providers/{provider_id}/entitlements/{entitlement_id}`. Should only be sent when resources have been migrated from entitlement_migrated to the new entitlement. Optional.", "type": "string" }, "properties": { "additionalProperties": { "type": "string" }, + "deprecated": true, "description": "Set of properties that should be associated with the entitlement. Optional.", "type": "object" } @@ -672,6 +674,11 @@ "description": "Output only. The resource name of the account that this entitlement is based on, if any.", "type": "string" }, + "cancellationReason": { + "description": "Output only. The reason the entitlement was cancelled. If this entitlement wasn't cancelled, this field is empty. Possible values include \"unknown\", \"expired\", \"user-cancelled\", \"account-closed\", \"billing-disabled\" (if the customer has manually disabled billing to their resources), \"user-aborted\", and \"migrated\" (if the entitlement has migrated across products). Values of this field are subject to change, and we recommend that you don't build your technical integration to rely on these fields.", + "readOnly": true, + "type": "string" + }, "consumers": { "description": "Output only. The resources using this entitlement, if applicable.", "items": { @@ -684,11 +691,20 @@ "format": "google-datetime", "type": "string" }, + "entitlementBenefitIds": { + "description": "Output only. The entitlement benefit IDs associated with the purchase.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "inputProperties": { "additionalProperties": { "description": "Properties of the object.", "type": "any" }, + "deprecated": true, "description": "Output only. The custom properties that were collected from the user to create this entitlement.", "type": "object" }, @@ -700,13 +716,25 @@ "description": "Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`.", "type": "string" }, + "newOfferEndTime": { + "description": "Output only. The end time of the new offer. If the offer was created with a term instead of a specified end date, this field is empty. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is be empty.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "newOfferStartTime": { + "description": "Output only. The timestamp when the new offer becomes effective. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is empty.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "newPendingOffer": { - "description": "Output only. The name of the offer the entitlement is switching to upon a pending plan change. Only exists if the pending plan change is moving to an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public.", + "description": "Output only. The name of the offer the entitlement is switching to upon a pending plan change. Only exists if the pending plan change is moving to an offer. This field isn't populated for entitlements which aren't active yet. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part.", "readOnly": true, "type": "string" }, "newPendingOfferDuration": { - "description": "Output only. The offer duration of the new offer in ISO 8601 duration format. Field is empty if the pending plan change is not moving to an offer since the entitlement is not pending, only the plan change is pending.", + "description": "Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was created with a specified end date instead of a duration, this field is empty.", "readOnly": true, "type": "string" }, @@ -715,12 +743,12 @@ "type": "string" }, "offer": { - "description": "Output only. The name of the offer that was procured. Field is empty if order was not made using an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public.", + "description": "Output only. The name of the offer that was procured. Field is empty if order was not made using an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part.", "readOnly": true, "type": "string" }, "offerDuration": { - "description": "Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer.", + "description": "Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer was created with a specified end date instead of a duration, this field is empty.", "readOnly": true, "type": "string" }, @@ -730,12 +758,18 @@ "readOnly": true, "type": "string" }, + "orderId": { + "description": "Output only. The order ID of this entitlement, without any `orders/` resource name prefix.", + "readOnly": true, + "type": "string" + }, "plan": { "description": "Output only. The identifier of the plan that was procured. Required if the product has plans.", "type": "string" }, "product": { - "description": "Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer. It is highly recommended to use the more explicit fields productExternalName, quoteExternalName, or offer listed below based on your needs.", + "deprecated": true, + "description": "Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer. We strongly recommend that you use the following more explicit fields: productExternalName, quoteExternalName, or offer.", "type": "string" }, "productExternalName": { @@ -850,7 +884,7 @@ "id": "RejectEntitlementPlanChangeRequest", "properties": { "pendingPlanName": { - "description": "Name of the pending plan that is being rejected. Required.", + "description": "Required. Name of the pending plan that is being rejected.", "type": "string" }, "reason": { @@ -872,7 +906,7 @@ "type": "object" }, "ResetAccountRequest": { - "description": "Request message for for PartnerProcurementService.ResetAccount.", + "description": "Request message for PartnerProcurementService.ResetAccount.", "id": "ResetAccountRequest", "properties": {}, "type": "object" diff --git a/cloudcommerceprocurement/v1/cloudcommerceprocurement-gen.go b/cloudcommerceprocurement/v1/cloudcommerceprocurement-gen.go index d68e3b79ad2..0ab83f81737 100644 --- a/cloudcommerceprocurement/v1/cloudcommerceprocurement-gen.go +++ b/cloudcommerceprocurement/v1/cloudcommerceprocurement-gen.go @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC. +// Copyright 2024 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/marketplace/docs/partners/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudcommerceprocurementService, err := cloudcommerceprocurement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudcommerceprocurementService, err := cloudcommerceprocurement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudcommerceprocurementService, err := cloudcommerceprocurement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudcommerceprocurement // import "google.golang.org/api/cloudcommerceprocurement/v1" import ( @@ -71,17 +84,19 @@ var _ = errors.New var _ = strings.Replace var _ = context.Canceled var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version const apiId = "cloudcommerceprocurement:v1" const apiName = "cloudcommerceprocurement" const apiVersion = "v1" const basePath = "https://cloudcommerceprocurement.googleapis.com/" +const basePathTemplate = "https://cloudcommerceprocurement.UNIVERSE_DOMAIN/" const mtlsBasePath = "https://cloudcommerceprocurement.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( - // See, edit, configure, and delete your Google Cloud data and see the - // email address for your Google Account. + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) @@ -93,7 +108,9 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) client, endpoint, err := htransport.NewClient(ctx, opts...) if err != nil { return nil, err @@ -170,88 +187,73 @@ type ProvidersEntitlementsService struct { s *Service } -// Account: Represents an account that was established by the customer -// on the service provider's system. +// Account: Represents an account that was established by the customer on the +// service provider's system. type Account struct { - // Approvals: Output only. The approvals for this account. These - // approvals are used to track actions that are permitted or have been - // completed by a customer within the context of the provider. This - // might include a sign up flow or a provisioning step, for example, - // that the provider can admit to having happened. + // Approvals: Output only. The approvals for this account. These approvals are + // used to track actions that are permitted or have been completed by a + // customer within the context of the provider. This might include a sign up + // flow or a provisioning step, for example, that the provider can admit to + // having happened. Approvals []*Approval `json:"approvals,omitempty"` - // CreateTime: Output only. The creation timestamp. CreateTime string `json:"createTime,omitempty"` - - // InputProperties: Output only. The custom properties that were - // collected from the user to create this account. + // InputProperties: Output only. The custom properties that were collected from + // the user to create this account. InputProperties googleapi.RawMessage `json:"inputProperties,omitempty"` - - // Name: Output only. The resource name of the account. Account names - // have the form `accounts/{account_id}`. + // Name: Output only. The resource name of the account. Account names have the + // form `accounts/{account_id}`. Name string `json:"name,omitempty"` - - // Provider: Output only. The identifier of the service provider that - // this account was created against. Each service provider is assigned a - // unique provider value when they onboard with Cloud Commerce platform. + // Provider: Output only. The identifier of the service provider that this + // account was created against. Each service provider is assigned a unique + // provider value when they onboard with Cloud Commerce platform. Provider string `json:"provider,omitempty"` - - // State: Output only. The state of the account. This is used to decide - // whether the customer is in good standing with the provider and is - // able to make purchases. An account might not be able to make a - // purchase if the billing account is suspended, for example. + // State: Output only. The state of the account. This is used to decide whether + // the customer is in good standing with the provider and is able to make + // purchases. An account might not be able to make a purchase if the billing + // account is suspended, for example. // // Possible values: - // "ACCOUNT_STATE_UNSPECIFIED" - Default state of the account. It's - // only set to this value when the account is first created and has not - // been initialized. - // "ACCOUNT_ACTIVATION_REQUESTED" - The customer has requested the - // creation of the account resource, and the provider notification - // message is dispatched. This state has been deprecated, as accounts - // now immediately transition to AccountState.ACCOUNT_ACTIVE. - // "ACCOUNT_ACTIVE" - The account is active and ready for use. The - // next possible states are: - Account getting deleted: After the user - // invokes delete from another API. + // "ACCOUNT_STATE_UNSPECIFIED" - Default state of the account. It's only set + // to this value when the account is first created and has not been + // initialized. + // "ACCOUNT_ACTIVATION_REQUESTED" - The customer has requested the creation + // of the account resource, and the provider notification message is + // dispatched. This state has been deprecated, as accounts now immediately + // transition to AccountState.ACCOUNT_ACTIVE. + // "ACCOUNT_ACTIVE" - The account is active and ready for use. The next + // possible states are: - Account getting deleted: After the user invokes + // delete from another API. State string `json:"state,omitempty"` - // UpdateTime: Output only. The last update timestamp. UpdateTime string `json:"updateTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Approvals") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // 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. "Approvals") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Approvals") 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 *Account) MarshalJSON() ([]byte, error) { type NoMethod Account - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Approval: An approval for some action on an account. type Approval struct { // Name: Output only. The name of the approval. Name string `json:"name,omitempty"` - // Reason: Output only. An explanation for the state of the approval. Reason string `json:"reason,omitempty"` - // State: Output only. The state of the approval. // // Possible values: @@ -260,378 +262,335 @@ type Approval struct { // approval state can transition to Account.Approval.State.APPROVED or // Account.Approval.State.REJECTED. // "APPROVED" - The approval has been granted by the provider. - // "REJECTED" - The approval has been rejected by the provider. A - // provider may choose to approve a previously rejected approval, so is - // it possible to transition to Account.Approval.State.APPROVED. + // "REJECTED" - The approval has been rejected by the provider. A provider + // may choose to approve a previously rejected approval, so is it possible to + // transition to Account.Approval.State.APPROVED. State string `json:"state,omitempty"` - // UpdateTime: Optional. The last update timestamp of the approval. UpdateTime string `json:"updateTime,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields 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 *Approval) MarshalJSON() ([]byte, error) { type NoMethod Approval - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ApproveAccountRequest: Request message for // PartnerProcurementService.ApproveAccount. type ApproveAccountRequest struct { - // ApprovalName: The name of the approval being approved. If absent and - // there is only one approval possible, that approval will be granted. - // If absent and there are many approvals possible, the request will - // fail with a 400 Bad Request. Optional. + // ApprovalName: The name of the approval being approved. If absent and there + // is only one approval possible, that approval will be granted. If absent and + // there are many approvals possible, the request will fail with a 400 Bad + // Request. Optional. ApprovalName string `json:"approvalName,omitempty"` - - // Properties: Set of properties that should be associated with the - // account. Optional. + // Properties: Set of properties that should be associated with the account. + // Optional. Properties map[string]string `json:"properties,omitempty"` - - // Reason: Free form text string explaining the approval reason. - // Optional. Max allowed length: 256 bytes. Longer strings will be - // truncated. + // Reason: Free form text string explaining the approval reason. Optional. Max + // allowed length: 256 bytes. Longer strings will be truncated. Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApprovalName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // 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. "ApprovalName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ApprovalName") 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 *ApproveAccountRequest) MarshalJSON() ([]byte, error) { type NoMethod ApproveAccountRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ApproveEntitlementPlanChangeRequest: Request message for // [PartnerProcurementService.ApproveEntitlementPlanChange[]. type ApproveEntitlementPlanChangeRequest struct { - // PendingPlanName: Name of the pending plan that is being approved. - // Required. + // PendingPlanName: Required. Name of the pending plan that's being approved. PendingPlanName string `json:"pendingPlanName,omitempty"` - // ForceSendFields is a list of field names (e.g. "PendingPlanName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // 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. "PendingPlanName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "PendingPlanName") 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 *ApproveEntitlementPlanChangeRequest) MarshalJSON() ([]byte, error) { type NoMethod ApproveEntitlementPlanChangeRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ApproveEntitlementRequest: Request message for // [PartnerProcurementService.ApproveEntitlement[]. type ApproveEntitlementRequest struct { - // EntitlementMigrated: Optional. The resource name of the entitlement - // that was migrated. Format: - // providers/{provider_id}/entitlements/{entitlement_id}. Should only be - // sent when resources have been migrated from entitlement_migrated to - // the new entitlement. Optional. + // EntitlementMigrated: Optional. The resource name of the entitlement that was + // migrated, with the format + // `providers/{provider_id}/entitlements/{entitlement_id}`. Should only be sent + // when resources have been migrated from entitlement_migrated to the new + // entitlement. Optional. EntitlementMigrated string `json:"entitlementMigrated,omitempty"` - // Properties: Set of properties that should be associated with the // entitlement. Optional. Properties map[string]string `json:"properties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EntitlementMigrated") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "EntitlementMigrated") 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. "EntitlementMigrated") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "EntitlementMigrated") 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 *ApproveEntitlementRequest) MarshalJSON() ([]byte, error) { type NoMethod ApproveEntitlementRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Consumer: A resource using (consuming) this entitlement. type Consumer struct { // Project: A project name with format `projects/`. Project string `json:"project,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Project") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Project") 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. "Project") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Project") 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 *Consumer) MarshalJSON() ([]byte, error) { type NoMethod Consumer - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use -// it as the request or the response type of an API method. For -// instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } type Empty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` } // Entitlement: Represents a procured product of a customer. type Entitlement struct { - // Account: Output only. The resource name of the account that this - // entitlement is based on, if any. + // Account: Output only. The resource name of the account that this entitlement + // is based on, if any. Account string `json:"account,omitempty"` - - // Consumers: Output only. The resources using this entitlement, if - // applicable. + // CancellationReason: Output only. The reason the entitlement was cancelled. + // If this entitlement wasn't cancelled, this field is empty. Possible values + // include "unknown", "expired", "user-cancelled", "account-closed", + // "billing-disabled" (if the customer has manually disabled billing to their + // resources), "user-aborted", and "migrated" (if the entitlement has migrated + // across products). Values of this field are subject to change, and we + // recommend that you don't build your technical integration to rely on these + // fields. + CancellationReason string `json:"cancellationReason,omitempty"` + // Consumers: Output only. The resources using this entitlement, if applicable. Consumers []*Consumer `json:"consumers,omitempty"` - // CreateTime: Output only. The creation timestamp. CreateTime string `json:"createTime,omitempty"` - - // InputProperties: Output only. The custom properties that were - // collected from the user to create this entitlement. + // EntitlementBenefitIds: Output only. The entitlement benefit IDs associated + // with the purchase. + EntitlementBenefitIds []string `json:"entitlementBenefitIds,omitempty"` + // InputProperties: Output only. The custom properties that were collected from + // the user to create this entitlement. InputProperties googleapi.RawMessage `json:"inputProperties,omitempty"` - - // MessageToUser: Provider-supplied message that is displayed to the end - // user. Currently this is used to communicate progress and ETA for - // provisioning. This field can be updated only when a user is waiting - // for an action from the provider, i.e. entitlement state is + // MessageToUser: Provider-supplied message that is displayed to the end user. + // Currently this is used to communicate progress and ETA for provisioning. + // This field can be updated only when a user is waiting for an action from the + // provider, i.e. entitlement state is // EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED or - // EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL. This field - // is cleared automatically when the entitlement state changes. + // EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL. This field is + // cleared automatically when the entitlement state changes. MessageToUser string `json:"messageToUser,omitempty"` - - // Name: Output only. The resource name of the entitlement. Entitlement - // names have the form - // `providers/{provider_id}/entitlements/{entitlement_id}`. + // Name: Output only. The resource name of the entitlement. Entitlement names + // have the form `providers/{provider_id}/entitlements/{entitlement_id}`. Name string `json:"name,omitempty"` - - // NewPendingOffer: Output only. The name of the offer the entitlement - // is switching to upon a pending plan change. Only exists if the - // pending plan change is moving to an offer. Format: + // NewOfferEndTime: Output only. The end time of the new offer. If the offer + // was created with a term instead of a specified end date, this field is + // empty. This field is populated even if the entitlement isn't active yet. If + // there's no upcoming offer, the field is be empty. + NewOfferEndTime string `json:"newOfferEndTime,omitempty"` + // NewOfferStartTime: Output only. The timestamp when the new offer becomes + // effective. This field is populated even if the entitlement isn't active yet. + // If there's no upcoming offer, the field is empty. + NewOfferStartTime string `json:"newOfferStartTime,omitempty"` + // NewPendingOffer: Output only. The name of the offer the entitlement is + // switching to upon a pending plan change. Only exists if the pending plan + // change is moving to an offer. This field isn't populated for entitlements + // which aren't active yet. Format: // 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR - // 'projects/{project}/services/{service}/standardOffers/{offer-id}', - // depending on whether the offer is private or public. + // 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending + // on whether the offer is private or public. The {service} in the name is the + // listing service of the offer. It could be either the product service that + // the offer is referencing, or a generic private offer parent service. We + // recommend that you don't build your integration to rely on the meaning of + // this {service} part. NewPendingOffer string `json:"newPendingOffer,omitempty"` - - // NewPendingOfferDuration: Output only. The offer duration of the new - // offer in ISO 8601 duration format. Field is empty if the pending plan - // change is not moving to an offer since the entitlement is not - // pending, only the plan change is pending. + // NewPendingOfferDuration: Output only. The duration of the new offer, in ISO + // 8601 duration format. This field isn't populated for entitlements which + // aren't active yet, only for pending offer changes. If the offer was created + // with a specified end date instead of a duration, this field is empty. NewPendingOfferDuration string `json:"newPendingOfferDuration,omitempty"` - // NewPendingPlan: Output only. The identifier of the pending new plan. - // Required if the product has plans and the entitlement has a pending - // plan change. + // Required if the product has plans and the entitlement has a pending plan + // change. NewPendingPlan string `json:"newPendingPlan,omitempty"` - - // Offer: Output only. The name of the offer that was procured. Field is - // empty if order was not made using an offer. Format: + // Offer: Output only. The name of the offer that was procured. Field is empty + // if order was not made using an offer. Format: // 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR - // 'projects/{project}/services/{service}/standardOffers/{offer-id}', - // depending on whether the offer is private or public. + // 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending + // on whether the offer is private or public. The {service} in the name is the + // listing service of the offer. It could be either the product service that + // the offer is referencing, or a generic private offer parent service. We + // recommend that you don't build your integration to rely on the meaning of + // this {service} part. Offer string `json:"offer,omitempty"` - - // OfferDuration: Output only. The offer duration of the current offer - // in ISO 8601 duration format. Field is empty if entitlement was not - // made using an offer. + // OfferDuration: Output only. The offer duration of the current offer in ISO + // 8601 duration format. Field is empty if entitlement was not made using an + // offer. If the offer was created with a specified end date instead of a + // duration, this field is empty. OfferDuration string `json:"offerDuration,omitempty"` - - // OfferEndTime: Output only. End time for the Offer association - // corresponding to this entitlement. The field is only populated if the - // entitlement is currently associated with an Offer. + // OfferEndTime: Output only. End time for the Offer association corresponding + // to this entitlement. The field is only populated if the entitlement is + // currently associated with an Offer. OfferEndTime string `json:"offerEndTime,omitempty"` - - // Plan: Output only. The identifier of the plan that was procured. - // Required if the product has plans. + // OrderId: Output only. The order ID of this entitlement, without any + // `orders/` resource name prefix. + OrderId string `json:"orderId,omitempty"` + // Plan: Output only. The identifier of the plan that was procured. Required if + // the product has plans. Plan string `json:"plan,omitempty"` - - // Product: Output only. The identifier of the entity that was - // purchased. This may actually represent a product, quote, or offer. It - // is highly recommended to use the more explicit fields - // productExternalName, quoteExternalName, or offer listed below based - // on your needs. + // Product: Output only. The identifier of the entity that was purchased. This + // may actually represent a product, quote, or offer. We strongly recommend + // that you use the following more explicit fields: productExternalName, + // quoteExternalName, or offer. Product string `json:"product,omitempty"` - - // ProductExternalName: Output only. The identifier of the product that - // was procured. + // ProductExternalName: Output only. The identifier of the product that was + // procured. ProductExternalName string `json:"productExternalName,omitempty"` - - // Provider: Output only. The identifier of the service provider that - // this entitlement was created against. Each service provider is - // assigned a unique provider value when they onboard with Cloud - // Commerce platform. + // Provider: Output only. The identifier of the service provider that this + // entitlement was created against. Each service provider is assigned a unique + // provider value when they onboard with Cloud Commerce platform. Provider string `json:"provider,omitempty"` - - // QuoteExternalName: Output only. The identifier of the quote that was - // used to procure. Empty if the order is not purchased using a quote. + // QuoteExternalName: Output only. The identifier of the quote that was used to + // procure. Empty if the order is not purchased using a quote. QuoteExternalName string `json:"quoteExternalName,omitempty"` - // State: Output only. The state of the entitlement. // // Possible values: - // "ENTITLEMENT_STATE_UNSPECIFIED" - Default state of the entitlement. - // It's only set to this value when the entitlement is first created and - // has not been initialized. - // "ENTITLEMENT_ACTIVATION_REQUESTED" - Indicates that the entitlement - // is being created and the backend has sent a notification to the - // provider for the activation approval. If the provider approves, then - // the entitlement will transition to the - // EntitlementState.ENTITLEMENT_ACTIVE state. Otherwise, the entitlement - // will be removed. Plan changes are not allowed in this state. Instead - // the entitlement is cancelled and re-created with a new plan name. - // "ENTITLEMENT_ACTIVE" - Indicates that the entitlement is active. - // The procured item is now usable and any associated billing events - // will start occurring. Entitlements in this state WILL renew. The - // analogous state for an unexpired but non-renewing entitlement is - // ENTITLEMENT_PENDING_CANCELLATION. In this state, the customer can - // decide to cancel the entitlement, which would change the state to - // EntitlementState.ENTITLEMENT_PENDING_CANCELLATION, and then - // EntitlementState.ENTITLEMENT_CANCELLED. The user can also request a + // "ENTITLEMENT_STATE_UNSPECIFIED" - Default state of the entitlement. It's + // only set to this value when the entitlement is first created and has not + // been initialized. + // "ENTITLEMENT_ACTIVATION_REQUESTED" - Indicates that the entitlement is + // being created and the backend has sent a notification to the provider for + // the activation approval. If the provider approves, then the entitlement will + // transition to the EntitlementState.ENTITLEMENT_ACTIVE state. Otherwise, the + // entitlement will be removed. Plan changes are not allowed in this state. + // Instead the entitlement is cancelled and re-created with a new plan name. + // "ENTITLEMENT_ACTIVE" - Indicates that the entitlement is active. The + // procured item is now usable and any associated billing events will start + // occurring. Entitlements in this state WILL renew. The analogous state for an + // unexpired but non-renewing entitlement is ENTITLEMENT_PENDING_CANCELLATION. + // In this state, the customer can decide to cancel the entitlement, which + // would change the state to EntitlementState.ENTITLEMENT_PENDING_CANCELLATION, + // and then EntitlementState.ENTITLEMENT_CANCELLED. The user can also request a // change of plan, which will transition the state to // EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE, and then back to // EntitlementState.ENTITLEMENT_ACTIVE. - // "ENTITLEMENT_PENDING_CANCELLATION" - Indicates that the entitlement - // will expire at the end of its term. This could mean the customer has - // elected not to renew this entitlement or the customer elected to - // cancel an entitlement that only expires at term end. The entitlement - // typically stays in this state if the entitlement/plan allows use of - // the underlying resource until the end of the current billing cycle. - // Once the billing cycle completes, the resource will transition to - // EntitlementState.ENTITLEMENT_CANCELLED state. The resource cannot be - // modified during this state. - // "ENTITLEMENT_CANCELLED" - Indicates that the entitlement was - // cancelled. The entitlement can now be deleted. - // "ENTITLEMENT_PENDING_PLAN_CHANGE" - Indicates that the entitlement - // is currently active, but there is a pending plan change that is - // requested by the customer. The entitlement typically stays in this - // state, if the entitlement/plan requires the completion of the current - // billing cycle before the plan can be changed. Once the billing cycle - // completes, the resource will transition to - // EntitlementState.ENTITLEMENT_ACTIVE, with its plan changed. + // "ENTITLEMENT_PENDING_CANCELLATION" - Indicates that the entitlement will + // expire at the end of its term. This could mean the customer has elected not + // to renew this entitlement or the customer elected to cancel an entitlement + // that only expires at term end. The entitlement typically stays in this state + // if the entitlement/plan allows use of the underlying resource until the end + // of the current billing cycle. Once the billing cycle completes, the resource + // will transition to EntitlementState.ENTITLEMENT_CANCELLED state. The + // resource cannot be modified during this state. + // "ENTITLEMENT_CANCELLED" - Indicates that the entitlement was cancelled. + // The entitlement can now be deleted. + // "ENTITLEMENT_PENDING_PLAN_CHANGE" - Indicates that the entitlement is + // currently active, but there is a pending plan change that is requested by + // the customer. The entitlement typically stays in this state, if the + // entitlement/plan requires the completion of the current billing cycle before + // the plan can be changed. Once the billing cycle completes, the resource will + // transition to EntitlementState.ENTITLEMENT_ACTIVE, with its plan changed. // "ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL" - Indicates that the - // entitlement is currently active, but there is a plan change request - // pending provider approval. If the provider approves the plan change, - // then the entitlement will transition either to - // EntitlementState.ENTITLEMENT_ACTIVE or + // entitlement is currently active, but there is a plan change request pending + // provider approval. If the provider approves the plan change, then the + // entitlement will transition either to EntitlementState.ENTITLEMENT_ACTIVE or // EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE depending on whether - // current plan requires that the billing cycle completes. If the - // provider rejects the plan change, then the pending plan change - // request is removed and the entitlement stays in - // EntitlementState.ENTITLEMENT_ACTIVE state with the old plan. - // "ENTITLEMENT_SUSPENDED" - Indicates that the entitlement is - // suspended either by Google or provider request. This can be triggered - // for various external reasons (e.g. expiration of credit card on the - // billing account, violation of terms-of-service of the provider etc.). - // As such, any remediating action needs to be taken externally, before - // the entitlement can be activated. This is not yet supported. + // current plan requires that the billing cycle completes. If the provider + // rejects the plan change, then the pending plan change request is removed and + // the entitlement stays in EntitlementState.ENTITLEMENT_ACTIVE state with the + // old plan. + // "ENTITLEMENT_SUSPENDED" - Indicates that the entitlement is suspended + // either by Google or provider request. This can be triggered for various + // external reasons (e.g. expiration of credit card on the billing account, + // violation of terms-of-service of the provider etc.). As such, any + // remediating action needs to be taken externally, before the entitlement can + // be activated. This is not yet supported. State string `json:"state,omitempty"` - // SubscriptionEndTime: Output only. End time for the subscription // corresponding to this entitlement. SubscriptionEndTime string `json:"subscriptionEndTime,omitempty"` - // UpdateTime: Output only. The last update timestamp. UpdateTime string `json:"updateTime,omitempty"` - - // UsageReportingId: Output only. The consumerId to use when reporting - // usage through the Service Control API. See the consumerId field at - // Reporting Metrics - // (https://cloud.google.com/service-control/reporting-metrics) for more - // details. This field is present only if the product has usage-based + // UsageReportingId: Output only. The consumerId to use when reporting usage + // through the Service Control API. See the consumerId field at Reporting + // Metrics (https://cloud.google.com/service-control/reporting-metrics) for + // more details. This field is present only if the product has usage-based // billing configured. UsageReportingId string `json:"usageReportingId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Account") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Account") 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. "Account") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Account") 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 *Entitlement) MarshalJSON() ([]byte, error) { type NoMethod Entitlement - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ListAccountsResponse: Response message for @@ -639,35 +598,27 @@ func (s *Entitlement) MarshalJSON() ([]byte, error) { type ListAccountsResponse struct { // Accounts: The list of accounts in this response. Accounts []*Account `json:"accounts,omitempty"` - // NextPageToken: The token for fetching the next page. NextPageToken string `json:"nextPageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accounts") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // 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. "Accounts") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Accounts") 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 *ListAccountsResponse) MarshalJSON() ([]byte, error) { type NoMethod ListAccountsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ListEntitlementsResponse: Response message for @@ -675,176 +626,137 @@ func (s *ListAccountsResponse) MarshalJSON() ([]byte, error) { type ListEntitlementsResponse struct { // Entitlements: The list of entitlements in this response. Entitlements []*Entitlement `json:"entitlements,omitempty"` - // NextPageToken: The token for fetching the next page. NextPageToken string `json:"nextPageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entitlements") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // 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. "Entitlements") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Entitlements") 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 *ListEntitlementsResponse) MarshalJSON() ([]byte, error) { type NoMethod ListEntitlementsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // RejectAccountRequest: Request message for // PartnerProcurementService.RejectAccount. type RejectAccountRequest struct { - // ApprovalName: The name of the approval being rejected. If absent and - // there is only one approval possible, that approval will be rejected. - // If absent and there are many approvals possible, the request will - // fail with a 400 Bad Request. Optional. + // ApprovalName: The name of the approval being rejected. If absent and there + // is only one approval possible, that approval will be rejected. If absent and + // there are many approvals possible, the request will fail with a 400 Bad + // Request. Optional. ApprovalName string `json:"approvalName,omitempty"` - - // Reason: Free form text string explaining the rejection reason. Max - // allowed length: 256 bytes. Longer strings will be truncated. + // Reason: Free form text string explaining the rejection reason. Max allowed + // length: 256 bytes. Longer strings will be truncated. Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApprovalName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // 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. "ApprovalName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ApprovalName") 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 *RejectAccountRequest) MarshalJSON() ([]byte, error) { type NoMethod RejectAccountRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // RejectEntitlementPlanChangeRequest: Request message for // PartnerProcurementService.RejectEntitlementPlanChange. type RejectEntitlementPlanChangeRequest struct { - // PendingPlanName: Name of the pending plan that is being rejected. - // Required. + // PendingPlanName: Required. Name of the pending plan that is being rejected. PendingPlanName string `json:"pendingPlanName,omitempty"` - - // Reason: Free form text string explaining the rejection reason. Max - // allowed length: 256 bytes. Longer strings will be truncated. + // Reason: Free form text string explaining the rejection reason. Max allowed + // length: 256 bytes. Longer strings will be truncated. Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "PendingPlanName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // 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. "PendingPlanName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "PendingPlanName") 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 *RejectEntitlementPlanChangeRequest) MarshalJSON() ([]byte, error) { type NoMethod RejectEntitlementPlanChangeRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // RejectEntitlementRequest: Request message for // PartnerProcurementService.RejectEntitlement. type RejectEntitlementRequest struct { - // Reason: Free form text string explaining the rejection reason. Max - // allowed length: 256 bytes. Longer strings will be truncated. + // Reason: Free form text string explaining the rejection reason. Max allowed + // length: 256 bytes. Longer strings will be truncated. Reason string `json:"reason,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Reason") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Reason") 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. "Reason") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // 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 *RejectEntitlementRequest) MarshalJSON() ([]byte, error) { type NoMethod RejectEntitlementRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ResetAccountRequest: Request message for for +// ResetAccountRequest: Request message for // PartnerProcurementService.ResetAccount. type ResetAccountRequest struct { } // SuspendEntitlementRequest: Request message for -// ParterProcurementService.SuspendEntitlement. This is not yet -// supported. +// ParterProcurementService.SuspendEntitlement. This is not yet supported. type SuspendEntitlementRequest struct { - // Reason: A free-form reason string, explaining the reason for - // suspension request. + // Reason: A free-form reason string, explaining the reason for suspension + // request. Reason string `json:"reason,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Reason") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Reason") 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. "Reason") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // 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 *SuspendEntitlementRequest) MarshalJSON() ([]byte, error) { type NoMethod SuspendEntitlementRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// method id "cloudcommerceprocurement.providers.accounts.approve": - type ProvidersAccountsApproveCall struct { s *Service name string @@ -856,7 +768,8 @@ type ProvidersAccountsApproveCall struct { // Approve: Grants an approval on an Account. // -// - name: The resource name of the account. +// - name: The resource name of the account, with the format +// `providers/{providerId}/accounts/{accountId}`. func (r *ProvidersAccountsService) Approve(name string, approveaccountrequest *ApproveAccountRequest) *ProvidersAccountsApproveCall { c := &ProvidersAccountsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -865,23 +778,21 @@ func (r *ProvidersAccountsService) Approve(name string, approveaccountrequest *A } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersAccountsApproveCall) Fields(s ...googleapi.Field) *ProvidersAccountsApproveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersAccountsApproveCall) Context(ctx context.Context) *ProvidersAccountsApproveCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersAccountsApproveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -890,18 +801,12 @@ func (c *ProvidersAccountsApproveCall) Header() http.Header { } func (c *ProvidersAccountsApproveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.approveaccountrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:approve") @@ -918,12 +823,10 @@ func (c *ProvidersAccountsApproveCall) doRequest(alt string) (*http.Response, er } // Do executes the "cloudcommerceprocurement.providers.accounts.approve" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersAccountsApproveCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -931,17 +834,17 @@ func (c *ProvidersAccountsApproveCall) Do(opts ...googleapi.CallOption) (*Empty, if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -954,38 +857,7 @@ func (c *ProvidersAccountsApproveCall) Do(opts ...googleapi.CallOption) (*Empty, return nil, err } return ret, nil - // { - // "description": "Grants an approval on an Account.", - // "flatPath": "v1/providers/{providersId}/accounts/{accountsId}:approve", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.accounts.approve", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the account. Required.", - // "location": "path", - // "pattern": "^providers/[^/]+/accounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:approve", - // "request": { - // "$ref": "ApproveAccountRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.accounts.get": +} type ProvidersAccountsGetCall struct { s *Service @@ -1006,33 +878,29 @@ func (r *ProvidersAccountsService) Get(name string) *ProvidersAccountsGetCall { } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersAccountsGetCall) Fields(s ...googleapi.Field) *ProvidersAccountsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// 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 *ProvidersAccountsGetCall) IfNoneMatch(entityTag string) *ProvidersAccountsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersAccountsGetCall) Context(ctx context.Context) *ProvidersAccountsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersAccountsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1041,12 +909,7 @@ func (c *ProvidersAccountsGetCall) Header() http.Header { } func (c *ProvidersAccountsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -1067,12 +930,10 @@ func (c *ProvidersAccountsGetCall) doRequest(alt string) (*http.Response, error) } // Do executes the "cloudcommerceprocurement.providers.accounts.get" call. -// Exactly one of *Account or error will be non-nil. 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. +// 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 *ProvidersAccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1080,17 +941,17 @@ func (c *ProvidersAccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, e if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Account{ ServerResponse: googleapi.ServerResponse{ @@ -1103,35 +964,7 @@ func (c *ProvidersAccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, e return nil, err } return ret, nil - // { - // "description": "Gets a requested Account resource.", - // "flatPath": "v1/providers/{providersId}/accounts/{accountsId}", - // "httpMethod": "GET", - // "id": "cloudcommerceprocurement.providers.accounts.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the account to retrieve.", - // "location": "path", - // "pattern": "^providers/[^/]+/accounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Account" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.accounts.list": +} type ProvidersAccountsListCall struct { s *Service @@ -1151,49 +984,45 @@ func (r *ProvidersAccountsService) List(parent string) *ProvidersAccountsListCal return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of entries that are requested The default page size is 25 and the -// maximum page size is 200. +// PageSize sets the optional parameter "pageSize": The maximum number of +// entries that are requested. The default page size is 25 and the maximum page +// size is 200. func (c *ProvidersAccountsListCall) PageSize(pageSize int64) *ProvidersAccountsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The token for -// fetching the next page. +// PageToken sets the optional parameter "pageToken": The token for fetching +// the next page. func (c *ProvidersAccountsListCall) PageToken(pageToken string) *ProvidersAccountsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersAccountsListCall) Fields(s ...googleapi.Field) *ProvidersAccountsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// 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 *ProvidersAccountsListCall) IfNoneMatch(entityTag string) *ProvidersAccountsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersAccountsListCall) Context(ctx context.Context) *ProvidersAccountsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersAccountsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1202,12 +1031,7 @@ func (c *ProvidersAccountsListCall) Header() http.Header { } func (c *ProvidersAccountsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -1228,12 +1052,11 @@ func (c *ProvidersAccountsListCall) doRequest(alt string) (*http.Response, error } // Do executes the "cloudcommerceprocurement.providers.accounts.list" call. -// Exactly one of *ListAccountsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListAccountsResponse.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. +// Any non-2xx status code is an error. Response headers are in either +// *ListAccountsResponse.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 *ProvidersAccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccountsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1241,17 +1064,17 @@ func (c *ProvidersAccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccou if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &ListAccountsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -1264,43 +1087,6 @@ func (c *ProvidersAccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccou return nil, err } return ret, nil - // { - // "description": "Lists Accounts that the provider has access to.", - // "flatPath": "v1/providers/{providersId}/accounts", - // "httpMethod": "GET", - // "id": "cloudcommerceprocurement.providers.accounts.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "The maximum number of entries that are requested The default page size is 25 and the maximum page size is 200.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The token for fetching the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name.", - // "location": "path", - // "pattern": "^providers/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/accounts", - // "response": { - // "$ref": "ListAccountsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - } // Pages invokes f for each page of results. @@ -1308,7 +1094,7 @@ func (c *ProvidersAccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccou // The provided context supersedes any context provided to the Context method. func (c *ProvidersAccountsListCall) Pages(ctx context.Context, f func(*ListAccountsResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -1324,8 +1110,6 @@ func (c *ProvidersAccountsListCall) Pages(ctx context.Context, f func(*ListAccou } } -// method id "cloudcommerceprocurement.providers.accounts.reject": - type ProvidersAccountsRejectCall struct { s *Service name string @@ -1346,23 +1130,21 @@ func (r *ProvidersAccountsService) Reject(name string, rejectaccountrequest *Rej } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersAccountsRejectCall) Fields(s ...googleapi.Field) *ProvidersAccountsRejectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersAccountsRejectCall) Context(ctx context.Context) *ProvidersAccountsRejectCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersAccountsRejectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1371,18 +1153,12 @@ func (c *ProvidersAccountsRejectCall) Header() http.Header { } func (c *ProvidersAccountsRejectCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.rejectaccountrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reject") @@ -1399,12 +1175,10 @@ func (c *ProvidersAccountsRejectCall) doRequest(alt string) (*http.Response, err } // Do executes the "cloudcommerceprocurement.providers.accounts.reject" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersAccountsRejectCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1412,17 +1186,17 @@ func (c *ProvidersAccountsRejectCall) Do(opts ...googleapi.CallOption) (*Empty, if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -1435,38 +1209,7 @@ func (c *ProvidersAccountsRejectCall) Do(opts ...googleapi.CallOption) (*Empty, return nil, err } return ret, nil - // { - // "description": "Rejects an approval on an Account.", - // "flatPath": "v1/providers/{providersId}/accounts/{accountsId}:reject", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.accounts.reject", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the account. Required.", - // "location": "path", - // "pattern": "^providers/[^/]+/accounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:reject", - // "request": { - // "$ref": "RejectAccountRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.accounts.reset": +} type ProvidersAccountsResetCall struct { s *Service @@ -1477,9 +1220,8 @@ type ProvidersAccountsResetCall struct { header_ http.Header } -// Reset: Resets an Account and cancel all associated Entitlements. -// Partner can only reset accounts they own rather than customer -// accounts. +// Reset: Resets an Account and cancels all associated Entitlements. Partner +// can only reset accounts they own rather than customer accounts. // // - name: The resource name of the account. func (r *ProvidersAccountsService) Reset(name string, resetaccountrequest *ResetAccountRequest) *ProvidersAccountsResetCall { @@ -1490,23 +1232,21 @@ func (r *ProvidersAccountsService) Reset(name string, resetaccountrequest *Reset } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersAccountsResetCall) Fields(s ...googleapi.Field) *ProvidersAccountsResetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersAccountsResetCall) Context(ctx context.Context) *ProvidersAccountsResetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersAccountsResetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1515,18 +1255,12 @@ func (c *ProvidersAccountsResetCall) Header() http.Header { } func (c *ProvidersAccountsResetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetaccountrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reset") @@ -1543,12 +1277,10 @@ func (c *ProvidersAccountsResetCall) doRequest(alt string) (*http.Response, erro } // Do executes the "cloudcommerceprocurement.providers.accounts.reset" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersAccountsResetCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1556,17 +1288,17 @@ func (c *ProvidersAccountsResetCall) Do(opts ...googleapi.CallOption) (*Empty, e if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -1579,38 +1311,7 @@ func (c *ProvidersAccountsResetCall) Do(opts ...googleapi.CallOption) (*Empty, e return nil, err } return ret, nil - // { - // "description": "Resets an Account and cancel all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.", - // "flatPath": "v1/providers/{providersId}/accounts/{accountsId}:reset", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.accounts.reset", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the account. Required.", - // "location": "path", - // "pattern": "^providers/[^/]+/accounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:reset", - // "request": { - // "$ref": "ResetAccountRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.entitlements.approve": +} type ProvidersEntitlementsApproveCall struct { s *Service @@ -1622,11 +1323,11 @@ type ProvidersEntitlementsApproveCall struct { } // Approve: Approves an entitlement that is in the -// EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method -// is invoked by the provider to approve the creation of the entitlement -// resource. +// EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is +// invoked by the provider to approve the creation of the entitlement resource. // -// - name: The resource name of the entitlement. +// - name: The resource name of the entitlement, with the format +// `providers/{providerId}/entitlements/{entitlementId}`. func (r *ProvidersEntitlementsService) Approve(name string, approveentitlementrequest *ApproveEntitlementRequest) *ProvidersEntitlementsApproveCall { c := &ProvidersEntitlementsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1635,23 +1336,21 @@ func (r *ProvidersEntitlementsService) Approve(name string, approveentitlementre } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsApproveCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsApproveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsApproveCall) Context(ctx context.Context) *ProvidersEntitlementsApproveCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsApproveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1660,18 +1359,12 @@ func (c *ProvidersEntitlementsApproveCall) Header() http.Header { } func (c *ProvidersEntitlementsApproveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.approveentitlementrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:approve") @@ -1688,12 +1381,10 @@ func (c *ProvidersEntitlementsApproveCall) doRequest(alt string) (*http.Response } // Do executes the "cloudcommerceprocurement.providers.entitlements.approve" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersEntitlementsApproveCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1701,17 +1392,17 @@ func (c *ProvidersEntitlementsApproveCall) Do(opts ...googleapi.CallOption) (*Em if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -1724,38 +1415,7 @@ func (c *ProvidersEntitlementsApproveCall) Do(opts ...googleapi.CallOption) (*Em return nil, err } return ret, nil - // { - // "description": "Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource.", - // "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:approve", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.entitlements.approve", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the entitlement. Required.", - // "location": "path", - // "pattern": "^providers/[^/]+/entitlements/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:approve", - // "request": { - // "$ref": "ApproveEntitlementRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.entitlements.approvePlanChange": +} type ProvidersEntitlementsApprovePlanChangeCall struct { s *Service @@ -1767,9 +1427,9 @@ type ProvidersEntitlementsApprovePlanChangeCall struct { } // ApprovePlanChange: Approves an entitlement plan change that is in the -// EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This -// method is invoked by the provider to approve the plan change on the -// entitlement resource. +// EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method +// is invoked by the provider to approve the plan change on the entitlement +// resource. // // - name: The resource name of the entitlement. func (r *ProvidersEntitlementsService) ApprovePlanChange(name string, approveentitlementplanchangerequest *ApproveEntitlementPlanChangeRequest) *ProvidersEntitlementsApprovePlanChangeCall { @@ -1780,23 +1440,21 @@ func (r *ProvidersEntitlementsService) ApprovePlanChange(name string, approveent } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsApprovePlanChangeCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsApprovePlanChangeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsApprovePlanChangeCall) Context(ctx context.Context) *ProvidersEntitlementsApprovePlanChangeCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsApprovePlanChangeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1805,18 +1463,12 @@ func (c *ProvidersEntitlementsApprovePlanChangeCall) Header() http.Header { } func (c *ProvidersEntitlementsApprovePlanChangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.approveentitlementplanchangerequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:approvePlanChange") @@ -1833,12 +1485,10 @@ func (c *ProvidersEntitlementsApprovePlanChangeCall) doRequest(alt string) (*htt } // Do executes the "cloudcommerceprocurement.providers.entitlements.approvePlanChange" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersEntitlementsApprovePlanChangeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1846,17 +1496,17 @@ func (c *ProvidersEntitlementsApprovePlanChangeCall) Do(opts ...googleapi.CallOp if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -1869,38 +1519,7 @@ func (c *ProvidersEntitlementsApprovePlanChangeCall) Do(opts ...googleapi.CallOp return nil, err } return ret, nil - // { - // "description": "Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource.", - // "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:approvePlanChange", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.entitlements.approvePlanChange", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the entitlement. Required.", - // "location": "path", - // "pattern": "^providers/[^/]+/entitlements/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:approvePlanChange", - // "request": { - // "$ref": "ApproveEntitlementPlanChangeRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.entitlements.get": +} type ProvidersEntitlementsGetCall struct { s *Service @@ -1921,33 +1540,29 @@ func (r *ProvidersEntitlementsService) Get(name string) *ProvidersEntitlementsGe } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsGetCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// 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 *ProvidersEntitlementsGetCall) IfNoneMatch(entityTag string) *ProvidersEntitlementsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsGetCall) Context(ctx context.Context) *ProvidersEntitlementsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1956,12 +1571,7 @@ func (c *ProvidersEntitlementsGetCall) Header() http.Header { } func (c *ProvidersEntitlementsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -1982,12 +1592,10 @@ func (c *ProvidersEntitlementsGetCall) doRequest(alt string) (*http.Response, er } // Do executes the "cloudcommerceprocurement.providers.entitlements.get" call. -// Exactly one of *Entitlement or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Entitlement.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. +// Any non-2xx status code is an error. Response headers are in either +// *Entitlement.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 *ProvidersEntitlementsGetCall) Do(opts ...googleapi.CallOption) (*Entitlement, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1995,17 +1603,17 @@ func (c *ProvidersEntitlementsGetCall) Do(opts ...googleapi.CallOption) (*Entitl if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Entitlement{ ServerResponse: googleapi.ServerResponse{ @@ -2018,35 +1626,7 @@ func (c *ProvidersEntitlementsGetCall) Do(opts ...googleapi.CallOption) (*Entitl return nil, err } return ret, nil - // { - // "description": "Gets a requested Entitlement resource.", - // "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}", - // "httpMethod": "GET", - // "id": "cloudcommerceprocurement.providers.entitlements.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the entitlement to retrieve.", - // "location": "path", - // "pattern": "^providers/[^/]+/entitlements/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Entitlement" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.entitlements.list": +} type ProvidersEntitlementsListCall struct { s *Service @@ -2066,80 +1646,77 @@ func (r *ProvidersEntitlementsService) List(parent string) *ProvidersEntitlement return c } -// Filter sets the optional parameter "filter": The filter that can be -// used to limit the list request. The filter is a query string that can -// match a selected set of attributes with string values. For example +// Filter sets the optional parameter "filter": The filter that can be used to +// limit the list request. The filter is a query string that can match a +// selected set of attributes with string values. For example // `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and // `plan!=foo-plan`. Supported query attributes are * `account` * // `customer_billing_account` with value in the format of: -// `billingAccounts/{id}` * `product_external_name` * -// `quote_external_name` * `offer` * `new_pending_offer` * `plan` * -// `newPendingPlan` or `new_pending_plan` * `state` * -// `consumers.project` Note that the consumers match works on repeated -// structures, so equality (`consumers.project=projects/123456789`) is -// not supported. Set membership can be expressed with the `:` operator. -// For example, `consumers.project:projects/123456789` finds -// entitlements with at least one consumer with project field equal to -// `projects/123456789`. Also note that the state name match is -// case-insensitive and query can omit the prefix "ENTITLEMENT_". For -// example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. -// If the query contains some special characters other than letters, -// underscore, or digits, the phrase must be quoted with double quotes. -// For example, `product="providerId:productId", where the product name -// needs to be quoted because it contains special character colon. -// Queries can be combined with `AND`, `OR`, and `NOT` to form more -// complex queries. They can also be grouped to force a desired -// evaluation order. For example, `state=active AND (account=E-1234 OR -// account=5678) AND NOT (product=foo-product)`. Connective `AND` can be -// omitted between two predicates. For example `account=E-1234 +// `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * +// `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or +// `new_pending_plan` * `state` * `consumers.project` * +// `change_history.new_offer` Note that the consumers and +// change_history.new_offer match works on repeated structures, so equality +// (`consumers.project=projects/123456789`) is not supported. Set membership +// can be expressed with the `:` operator. For example, +// `consumers.project:projects/123456789` finds entitlements with at least one +// consumer with project field equal to `projects/123456789`. +// `change_history.new_offer` retrieves all entitlements that were once +// associated or are currently active with the offer. Also note that the state +// name match is case-insensitive and query can omit the prefix "ENTITLEMENT_". +// For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If +// the query contains some special characters other than letters, underscore, +// or digits, the phrase must be quoted with double quotes. For example, +// `product="providerId:productId", where the product name needs to be quoted +// because it contains special character colon. Queries can be combined with +// `AND`, `OR`, and `NOT` to form more complex queries. They can also be +// grouped to force a desired evaluation order. For example, `state=active AND +// (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective +// `AND` can be omitted between two predicates. For example `account=E-1234 // state=active` is equivalent to `account=E-1234 AND state=active`. func (c *ProvidersEntitlementsListCall) Filter(filter string) *ProvidersEntitlementsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of entries that are requested. The default page size is 200. +// PageSize sets the optional parameter "pageSize": The maximum number of +// entries that are requested. The default page size is 200. func (c *ProvidersEntitlementsListCall) PageSize(pageSize int64) *ProvidersEntitlementsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The token for -// fetching the next page. +// PageToken sets the optional parameter "pageToken": The token for fetching +// the next page. func (c *ProvidersEntitlementsListCall) PageToken(pageToken string) *ProvidersEntitlementsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsListCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// 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 *ProvidersEntitlementsListCall) IfNoneMatch(entityTag string) *ProvidersEntitlementsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsListCall) Context(ctx context.Context) *ProvidersEntitlementsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -2148,12 +1725,7 @@ func (c *ProvidersEntitlementsListCall) Header() http.Header { } func (c *ProvidersEntitlementsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -2174,12 +1746,11 @@ func (c *ProvidersEntitlementsListCall) doRequest(alt string) (*http.Response, e } // Do executes the "cloudcommerceprocurement.providers.entitlements.list" call. -// Exactly one of *ListEntitlementsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *ListEntitlementsResponse.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. +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *ProvidersEntitlementsListCall) Do(opts ...googleapi.CallOption) (*ListEntitlementsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -2187,17 +1758,17 @@ func (c *ProvidersEntitlementsListCall) Do(opts ...googleapi.CallOption) (*ListE if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &ListEntitlementsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -2210,48 +1781,6 @@ func (c *ProvidersEntitlementsListCall) Do(opts ...googleapi.CallOption) (*ListE return nil, err } return ret, nil - // { - // "description": "Lists Entitlements for which the provider has read access.", - // "flatPath": "v1/providers/{providersId}/entitlements", - // "httpMethod": "GET", - // "id": "cloudcommerceprocurement.providers.entitlements.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and `plan!=foo-plan`. Supported query attributes are * `account` * `customer_billing_account` with value in the format of: `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or `new_pending_plan` * `state` * `consumers.project` Note that the consumers match works on repeated structures, so equality (`consumers.project=projects/123456789`) is not supported. Set membership can be expressed with the `:` operator. For example, `consumers.project:projects/123456789` finds entitlements with at least one consumer with project field equal to `projects/123456789`. Also note that the state name match is case-insensitive and query can omit the prefix \"ENTITLEMENT_\". For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, `product=\"providerId:productId\"`, where the product name needs to be quoted because it contains special character colon. Queries can be combined with `AND`, `OR`, and `NOT` to form more complex queries. They can also be grouped to force a desired evaluation order. For example, `state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective `AND` can be omitted between two predicates. For example `account=E-1234 state=active` is equivalent to `account=E-1234 AND state=active`.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of entries that are requested. The default page size is 200.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The token for fetching the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name.", - // "location": "path", - // "pattern": "^providers/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/entitlements", - // "response": { - // "$ref": "ListEntitlementsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - } // Pages invokes f for each page of results. @@ -2259,7 +1788,7 @@ func (c *ProvidersEntitlementsListCall) Do(opts ...googleapi.CallOption) (*ListE // The provided context supersedes any context provided to the Context method. func (c *ProvidersEntitlementsListCall) Pages(ctx context.Context, f func(*ListEntitlementsResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -2275,8 +1804,6 @@ func (c *ProvidersEntitlementsListCall) Pages(ctx context.Context, f func(*ListE } } -// method id "cloudcommerceprocurement.providers.entitlements.patch": - type ProvidersEntitlementsPatchCall struct { s *Service name string @@ -2296,8 +1823,8 @@ func (r *ProvidersEntitlementsService) Patch(name string, entitlement *Entitleme return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// that applies to the resource. See the [FieldMask definition] +// UpdateMask sets the optional parameter "updateMask": The update mask that +// applies to the resource. See the [FieldMask definition] // (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) // for more details. func (c *ProvidersEntitlementsPatchCall) UpdateMask(updateMask string) *ProvidersEntitlementsPatchCall { @@ -2306,23 +1833,21 @@ func (c *ProvidersEntitlementsPatchCall) UpdateMask(updateMask string) *Provider } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsPatchCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsPatchCall) Context(ctx context.Context) *ProvidersEntitlementsPatchCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -2331,18 +1856,12 @@ func (c *ProvidersEntitlementsPatchCall) Header() http.Header { } func (c *ProvidersEntitlementsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.entitlement) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") @@ -2359,12 +1878,10 @@ func (c *ProvidersEntitlementsPatchCall) doRequest(alt string) (*http.Response, } // Do executes the "cloudcommerceprocurement.providers.entitlements.patch" call. -// Exactly one of *Entitlement or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Entitlement.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. +// Any non-2xx status code is an error. Response headers are in either +// *Entitlement.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 *ProvidersEntitlementsPatchCall) Do(opts ...googleapi.CallOption) (*Entitlement, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -2372,17 +1889,17 @@ func (c *ProvidersEntitlementsPatchCall) Do(opts ...googleapi.CallOption) (*Enti if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Entitlement{ ServerResponse: googleapi.ServerResponse{ @@ -2395,44 +1912,7 @@ func (c *ProvidersEntitlementsPatchCall) Do(opts ...googleapi.CallOption) (*Enti return nil, err } return ret, nil - // { - // "description": "Updates an existing Entitlement.", - // "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}", - // "httpMethod": "PATCH", - // "id": "cloudcommerceprocurement.providers.entitlements.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the entitlement to update.", - // "location": "path", - // "pattern": "^providers/[^/]+/entitlements/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "The update mask that applies to the resource. See the [FieldMask definition] (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) for more details.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "Entitlement" - // }, - // "response": { - // "$ref": "Entitlement" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.entitlements.reject": +} type ProvidersEntitlementsRejectCall struct { s *Service @@ -2444,9 +1924,8 @@ type ProvidersEntitlementsRejectCall struct { } // Reject: Rejects an entitlement that is in the -// EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method -// is invoked by the provider to reject the creation of the entitlement -// resource. +// EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is +// invoked by the provider to reject the creation of the entitlement resource. // // - name: The resource name of the entitlement. func (r *ProvidersEntitlementsService) Reject(name string, rejectentitlementrequest *RejectEntitlementRequest) *ProvidersEntitlementsRejectCall { @@ -2457,23 +1936,21 @@ func (r *ProvidersEntitlementsService) Reject(name string, rejectentitlementrequ } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsRejectCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsRejectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsRejectCall) Context(ctx context.Context) *ProvidersEntitlementsRejectCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsRejectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -2482,18 +1959,12 @@ func (c *ProvidersEntitlementsRejectCall) Header() http.Header { } func (c *ProvidersEntitlementsRejectCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.rejectentitlementrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reject") @@ -2510,12 +1981,10 @@ func (c *ProvidersEntitlementsRejectCall) doRequest(alt string) (*http.Response, } // Do executes the "cloudcommerceprocurement.providers.entitlements.reject" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersEntitlementsRejectCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -2523,17 +1992,17 @@ func (c *ProvidersEntitlementsRejectCall) Do(opts ...googleapi.CallOption) (*Emp if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -2546,38 +2015,7 @@ func (c *ProvidersEntitlementsRejectCall) Do(opts ...googleapi.CallOption) (*Emp return nil, err } return ret, nil - // { - // "description": "Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource.", - // "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:reject", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.entitlements.reject", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the entitlement. Required.", - // "location": "path", - // "pattern": "^providers/[^/]+/entitlements/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:reject", - // "request": { - // "$ref": "RejectEntitlementRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.entitlements.rejectPlanChange": +} type ProvidersEntitlementsRejectPlanChangeCall struct { s *Service @@ -2589,9 +2027,9 @@ type ProvidersEntitlementsRejectPlanChangeCall struct { } // RejectPlanChange: Rejects an entitlement plan change that is in the -// EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This -// method is invoked by the provider to reject the plan change on the -// entitlement resource. +// EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method +// is invoked by the provider to reject the plan change on the entitlement +// resource. // // - name: The resource name of the entitlement. func (r *ProvidersEntitlementsService) RejectPlanChange(name string, rejectentitlementplanchangerequest *RejectEntitlementPlanChangeRequest) *ProvidersEntitlementsRejectPlanChangeCall { @@ -2602,23 +2040,21 @@ func (r *ProvidersEntitlementsService) RejectPlanChange(name string, rejectentit } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsRejectPlanChangeCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsRejectPlanChangeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsRejectPlanChangeCall) Context(ctx context.Context) *ProvidersEntitlementsRejectPlanChangeCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsRejectPlanChangeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -2627,18 +2063,12 @@ func (c *ProvidersEntitlementsRejectPlanChangeCall) Header() http.Header { } func (c *ProvidersEntitlementsRejectPlanChangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.rejectentitlementplanchangerequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rejectPlanChange") @@ -2655,12 +2085,10 @@ func (c *ProvidersEntitlementsRejectPlanChangeCall) doRequest(alt string) (*http } // Do executes the "cloudcommerceprocurement.providers.entitlements.rejectPlanChange" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersEntitlementsRejectPlanChangeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -2668,17 +2096,17 @@ func (c *ProvidersEntitlementsRejectPlanChangeCall) Do(opts ...googleapi.CallOpt if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -2691,38 +2119,7 @@ func (c *ProvidersEntitlementsRejectPlanChangeCall) Do(opts ...googleapi.CallOpt return nil, err } return ret, nil - // { - // "description": "Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource.", - // "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:rejectPlanChange", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.entitlements.rejectPlanChange", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the entitlement. Required.", - // "location": "path", - // "pattern": "^providers/[^/]+/entitlements/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:rejectPlanChange", - // "request": { - // "$ref": "RejectEntitlementPlanChangeRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudcommerceprocurement.providers.entitlements.suspend": +} type ProvidersEntitlementsSuspendCall struct { s *Service @@ -2733,8 +2130,8 @@ type ProvidersEntitlementsSuspendCall struct { header_ http.Header } -// Suspend: Requests suspension of an active Entitlement. This is not -// yet supported. +// Suspend: Requests suspension of an active Entitlement. This is not yet +// supported. // // - name: The name of the entitlement to suspend. func (r *ProvidersEntitlementsService) Suspend(name string, suspendentitlementrequest *SuspendEntitlementRequest) *ProvidersEntitlementsSuspendCall { @@ -2745,23 +2142,21 @@ func (r *ProvidersEntitlementsService) Suspend(name string, suspendentitlementre } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProvidersEntitlementsSuspendCall) Fields(s ...googleapi.Field) *ProvidersEntitlementsSuspendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProvidersEntitlementsSuspendCall) Context(ctx context.Context) *ProvidersEntitlementsSuspendCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProvidersEntitlementsSuspendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -2770,18 +2165,12 @@ func (c *ProvidersEntitlementsSuspendCall) Header() http.Header { } func (c *ProvidersEntitlementsSuspendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.suspendentitlementrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:suspend") @@ -2798,12 +2187,10 @@ func (c *ProvidersEntitlementsSuspendCall) doRequest(alt string) (*http.Response } // Do executes the "cloudcommerceprocurement.providers.entitlements.suspend" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.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. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProvidersEntitlementsSuspendCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -2811,17 +2198,17 @@ func (c *ProvidersEntitlementsSuspendCall) Do(opts ...googleapi.CallOption) (*Em if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &Empty{ ServerResponse: googleapi.ServerResponse{ @@ -2834,33 +2221,4 @@ func (c *ProvidersEntitlementsSuspendCall) Do(opts ...googleapi.CallOption) (*Em return nil, err } return ret, nil - // { - // "description": "Requests suspension of an active Entitlement. This is not yet supported.", - // "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:suspend", - // "httpMethod": "POST", - // "id": "cloudcommerceprocurement.providers.entitlements.suspend", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the entitlement to suspend.", - // "location": "path", - // "pattern": "^providers/[^/]+/entitlements/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:suspend", - // "request": { - // "$ref": "SuspendEntitlementRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - } diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 816046cf377..3250009e590 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -2065,7 +2065,7 @@ } } }, - "revision": "20240511", + "revision": "20240529", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -2348,7 +2348,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -2359,7 +2358,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -2370,7 +2368,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -2404,11 +2401,6 @@ "readOnly": true, "type": "array" }, - "currentRepairAutomationRun": { - "description": "Output only. The current AutomationRun repairing the rollout.", - "readOnly": true, - "type": "string" - }, "promoteAutomationRun": { "description": "Output only. The name of the AutomationRun initiated by a promote release rule.", "readOnly": true, @@ -2602,7 +2594,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -2613,7 +2604,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -2624,7 +2614,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -3157,7 +3146,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -3168,7 +3156,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -3179,7 +3166,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -3461,6 +3447,10 @@ "internalIp": { "description": "Optional. If true, `cluster` is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).", "type": "boolean" + }, + "proxyUrl": { + "description": "Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) to the Kubernetes server.", + "type": "string" } }, "type": "object" @@ -3711,7 +3701,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -3722,7 +3711,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -3733,7 +3721,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -4711,7 +4698,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -4722,7 +4708,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -4733,7 +4718,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -4794,7 +4778,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -4805,7 +4788,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -4816,7 +4798,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -4841,23 +4822,8 @@ }, "type": "object" }, - "RepairMode": { - "description": "Configuration of the repair action.", - "id": "RepairMode", - "properties": { - "retry": { - "$ref": "Retry", - "description": "Optional. Retries a failed job." - }, - "rollback": { - "$ref": "Rollback", - "description": "Optional. Rolls back a `Rollout`." - } - }, - "type": "object" - }, "RepairPhase": { - "description": "RepairPhase tracks the repair attempts that have been made for each `RepairMode` specified in the `Automation` resource.", + "description": "RepairPhase tracks the repair attempts that have been made for each `RepairPhaseConfig` specified in the `Automation` resource.", "id": "RepairPhase", "properties": { "retry": { @@ -4877,12 +4843,6 @@ "description": "Contains the information for an automated `repair rollout` operation.", "id": "RepairRolloutOperation", "properties": { - "currentRepairModeIndex": { - "description": "Output only. The index of the current repair action in the repair sequence.", - "format": "int64", - "readOnly": true, - "type": "string" - }, "jobId": { "description": "Output only. The job ID for the Job to repair.", "readOnly": true, @@ -4928,51 +4888,6 @@ "type": "string" }, "type": "array" - }, - "repairModes": { - "description": "Required. Defines the types of automatic repair actions for failed jobs.", - "items": { - "$ref": "RepairMode" - }, - "type": "array" - }, - "sourcePhases": { - "description": "Optional. Phases within which jobs are subject to automatic repair actions on failure. Proceeds only after phase name matched any one in the list, or for all phases if unspecified. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Retry": { - "description": "Retries the failed job.", - "id": "Retry", - "properties": { - "attempts": { - "description": "Required. Total number of retries. Retry is skipped if set to 0; The minimum value is 1, and the maximum value is 10.", - "format": "int64", - "type": "string" - }, - "backoffMode": { - "description": "Optional. The pattern of how wait time will be increased. Default is linear. Backoff mode will be ignored if `wait` is 0.", - "enum": [ - "BACKOFF_MODE_UNSPECIFIED", - "BACKOFF_MODE_LINEAR", - "BACKOFF_MODE_EXPONENTIAL" - ], - "enumDescriptions": [ - "No WaitMode is specified.", - "Increases the wait time linearly.", - "Increases the wait time exponentially." - ], - "type": "string" - }, - "wait": { - "description": "Optional. How long to wait for the first retry. Default is 0, and the maximum value is 14d.", - "format": "google-duration", - "type": "string" } }, "type": "object" @@ -4996,7 +4911,6 @@ "REPAIR_STATE_FAILED", "REPAIR_STATE_IN_PROGRESS", "REPAIR_STATE_PENDING", - "REPAIR_STATE_SKIPPED", "REPAIR_STATE_ABORTED" ], "enumDescriptions": [ @@ -5006,7 +4920,6 @@ "The `repair` action has failed.", "The `repair` action is in progress.", "The `repair` action is pending.", - "The `repair` action was skipped.", "The `repair` action was aborted." ], "readOnly": true, @@ -5074,18 +4987,6 @@ "readOnly": true, "type": "string" }, - "jobId": { - "deprecated": true, - "description": "Output only. The job ID for the Job to retry.", - "readOnly": true, - "type": "string" - }, - "phaseId": { - "deprecated": true, - "description": "Output only. The phase ID of the phase that includes the job being retried.", - "readOnly": true, - "type": "string" - }, "totalAttempts": { "description": "Output only. The number of attempts that have been made.", "format": "int64", @@ -5095,17 +4996,6 @@ }, "type": "object" }, - "Rollback": { - "description": "Rolls back a `Rollout`.", - "id": "Rollback", - "properties": { - "destinationPhase": { - "description": "Optional. The starting phase ID for the `Rollout`. If unspecified, the `Rollout` will start in the stable phase.", - "type": "string" - } - }, - "type": "object" - }, "RollbackAttempt": { "description": "RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'.", "id": "RollbackAttempt", @@ -5129,7 +5019,6 @@ "REPAIR_STATE_FAILED", "REPAIR_STATE_IN_PROGRESS", "REPAIR_STATE_PENDING", - "REPAIR_STATE_SKIPPED", "REPAIR_STATE_ABORTED" ], "enumDescriptions": [ @@ -5139,7 +5028,6 @@ "The `repair` action has failed.", "The `repair` action is in progress.", "The `repair` action is pending.", - "The `repair` action was skipped.", "The `repair` action was aborted." ], "readOnly": true, @@ -5442,7 +5330,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -5453,7 +5340,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -5464,7 +5350,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -5546,7 +5431,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -5557,7 +5441,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -5568,7 +5451,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -6034,7 +5916,6 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", - "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -6045,7 +5926,6 @@ false, false, false, - false, true ], "enumDescriptions": [ @@ -6056,7 +5936,6 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", - "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index 4a03ef23736..7ad2f61a16b 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -649,7 +649,6 @@ type AutomationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -701,9 +700,6 @@ type AutomationRolloutMetadata struct { // AdvanceAutomationRuns: Output only. The names of the AutomationRuns // initiated by an advance rollout rule. AdvanceAutomationRuns []string `json:"advanceAutomationRuns,omitempty"` - // CurrentRepairAutomationRun: Output only. The current AutomationRun repairing - // the rollout. - CurrentRepairAutomationRun string `json:"currentRepairAutomationRun,omitempty"` // PromoteAutomationRun: Output only. The name of the AutomationRun initiated // by a promote release rule. PromoteAutomationRun string `json:"promoteAutomationRun,omitempty"` @@ -890,7 +886,6 @@ type AutomationRunEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -1673,7 +1668,6 @@ type DeliveryPipelineNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -2030,6 +2024,10 @@ type GkeCluster struct { // cluster // (https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept). InternalIp bool `json:"internalIp,omitempty"` + // ProxyUrl: Optional. If set, used to configure a proxy + // (https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) + // to the Kubernetes server. + ProxyUrl string `json:"proxyUrl,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 @@ -2232,7 +2230,6 @@ type JobRunNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -3450,7 +3447,6 @@ type ReleaseNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -3533,7 +3529,6 @@ type ReleaseRenderEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -3581,32 +3576,8 @@ func (s *RenderMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// RepairMode: Configuration of the repair action. -type RepairMode struct { - // Retry: Optional. Retries a failed job. - Retry *Retry `json:"retry,omitempty"` - // Rollback: Optional. Rolls back a `Rollout`. - Rollback *Rollback `json:"rollback,omitempty"` - // ForceSendFields is a list of field names (e.g. "Retry") 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. "Retry") 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 *RepairMode) MarshalJSON() ([]byte, error) { - type NoMethod RepairMode - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // RepairPhase: RepairPhase tracks the repair attempts that have been made for -// each `RepairMode` specified in the `Automation` resource. +// each `RepairPhaseConfig` specified in the `Automation` resource. type RepairPhase struct { // Retry: Output only. Records of the retry attempts for retry repair mode. Retry *RetryPhase `json:"retry,omitempty"` @@ -3633,9 +3604,6 @@ func (s *RepairPhase) MarshalJSON() ([]byte, error) { // RepairRolloutOperation: Contains the information for an automated `repair // rollout` operation. type RepairRolloutOperation struct { - // CurrentRepairModeIndex: Output only. The index of the current repair action - // in the repair sequence. - CurrentRepairModeIndex int64 `json:"currentRepairModeIndex,omitempty,string"` // JobId: Output only. The job ID for the Job to repair. JobId string `json:"jobId,omitempty"` // PhaseId: Output only. The phase ID of the phase that includes the job being @@ -3647,15 +3615,15 @@ type RepairRolloutOperation struct { // Rollout: Output only. The name of the rollout that initiates the // `AutomationRun`. Rollout string `json:"rollout,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentRepairModeIndex") 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. "JobId") 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. "CurrentRepairModeIndex") 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. "JobId") 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:"-"` } @@ -3683,16 +3651,6 @@ type RepairRolloutRule struct { // characters. In other words, it must match the following regex: `^a-z // ([a-z0-9-]{0,61}[a-z0-9])?$`. Jobs []string `json:"jobs,omitempty"` - // RepairModes: Required. Defines the types of automatic repair actions for - // failed jobs. - RepairModes []*RepairMode `json:"repairModes,omitempty"` - // SourcePhases: Optional. Phases within which jobs are subject to automatic - // repair actions on failure. Proceeds only after phase name matched any one in - // the list, or for all phases if unspecified. This value must consist of - // lower-case letters, numbers, and hyphens, start with a letter and end with a - // letter or a number, and have a max length of 63 characters. In other words, - // it must match the following regex: `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. - SourcePhases []string `json:"sourcePhases,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 @@ -3711,40 +3669,6 @@ func (s *RepairRolloutRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Retry: Retries the failed job. -type Retry struct { - // Attempts: Required. Total number of retries. Retry is skipped if set to 0; - // The minimum value is 1, and the maximum value is 10. - Attempts int64 `json:"attempts,omitempty,string"` - // BackoffMode: Optional. The pattern of how wait time will be increased. - // Default is linear. Backoff mode will be ignored if `wait` is 0. - // - // Possible values: - // "BACKOFF_MODE_UNSPECIFIED" - No WaitMode is specified. - // "BACKOFF_MODE_LINEAR" - Increases the wait time linearly. - // "BACKOFF_MODE_EXPONENTIAL" - Increases the wait time exponentially. - BackoffMode string `json:"backoffMode,omitempty"` - // Wait: Optional. How long to wait for the first retry. Default is 0, and the - // maximum value is 14d. - Wait string `json:"wait,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attempts") 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. "Attempts") 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 *Retry) MarshalJSON() ([]byte, error) { - type NoMethod Retry - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // RetryAttempt: RetryAttempt represents an action of retrying the failed Cloud // Deploy job. type RetryAttempt struct { @@ -3759,7 +3683,6 @@ type RetryAttempt struct { // "REPAIR_STATE_FAILED" - The `repair` action has failed. // "REPAIR_STATE_IN_PROGRESS" - The `repair` action is in progress. // "REPAIR_STATE_PENDING" - The `repair` action is pending. - // "REPAIR_STATE_SKIPPED" - The `repair` action was skipped. // "REPAIR_STATE_ABORTED" - The `repair` action was aborted. State string `json:"state,omitempty"` // StateDesc: Output only. Description of the state of the Retry. @@ -3827,11 +3750,6 @@ type RetryPhase struct { // "BACKOFF_MODE_LINEAR" - Increases the wait time linearly. // "BACKOFF_MODE_EXPONENTIAL" - Increases the wait time exponentially. BackoffMode string `json:"backoffMode,omitempty"` - // JobId: Output only. The job ID for the Job to retry. - JobId string `json:"jobId,omitempty"` - // PhaseId: Output only. The phase ID of the phase that includes the job being - // retried. - PhaseId string `json:"phaseId,omitempty"` // TotalAttempts: Output only. The number of attempts that have been made. TotalAttempts int64 `json:"totalAttempts,omitempty,string"` // ForceSendFields is a list of field names (e.g. "Attempts") to @@ -3852,29 +3770,6 @@ func (s *RetryPhase) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Rollback: Rolls back a `Rollout`. -type Rollback struct { - // DestinationPhase: Optional. The starting phase ID for the `Rollout`. If - // unspecified, the `Rollout` will start in the stable phase. - DestinationPhase string `json:"destinationPhase,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestinationPhase") 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. "DestinationPhase") 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 *Rollback) MarshalJSON() ([]byte, error) { - type NoMethod Rollback - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // RollbackAttempt: RollbackAttempt represents an action of rolling back a // Cloud Deploy 'Target'. type RollbackAttempt struct { @@ -3892,7 +3787,6 @@ type RollbackAttempt struct { // "REPAIR_STATE_FAILED" - The `repair` action has failed. // "REPAIR_STATE_IN_PROGRESS" - The `repair` action is in progress. // "REPAIR_STATE_PENDING" - The `repair` action is pending. - // "REPAIR_STATE_SKIPPED" - The `repair` action was skipped. // "REPAIR_STATE_ABORTED" - The `repair` action was aborted. State string `json:"state,omitempty"` // StateDesc: Output only. Description of the state of the Rollback. @@ -4166,7 +4060,6 @@ type RolloutNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -4235,7 +4128,6 @@ type RolloutUpdateEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` @@ -4833,7 +4725,6 @@ type TargetNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. - // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never used. Use // release_render log type instead. Type string `json:"type,omitempty"` diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index e85699e6005..248632d04ed 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -1596,7 +1596,7 @@ "inboundSamlSsoProfiles": { "methods": { "create": { - "description": "Creates an InboundSamlSsoProfile for a customer.", + "description": "Creates an InboundSamlSsoProfile for a customer. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `\"done\": false`, it will not have a response, and the metadata will have `\"state\": \"awaiting-multi-party-approval\"`.", "flatPath": "v1/inboundSamlSsoProfiles", "httpMethod": "POST", "id": "cloudidentity.inboundSamlSsoProfiles.create", @@ -1696,7 +1696,7 @@ ] }, "patch": { - "description": "Updates an InboundSamlSsoProfile.", + "description": "Updates an InboundSamlSsoProfile. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `\"done\": false`, it will not have a response, and the metadata will have `\"state\": \"awaiting-multi-party-approval\"`.", "flatPath": "v1/inboundSamlSsoProfiles/{inboundSamlSsoProfilesId}", "httpMethod": "PATCH", "id": "cloudidentity.inboundSamlSsoProfiles.patch", @@ -1734,7 +1734,7 @@ "idpCredentials": { "methods": { "add": { - "description": "Adds an IdpCredential. Up to 2 credentials are allowed.", + "description": "Adds an IdpCredential. Up to 2 credentials are allowed. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `\"done\": false`, it will not have a response, and the metadata will have `\"state\": \"awaiting-multi-party-approval\"`.", "flatPath": "v1/inboundSamlSsoProfiles/{inboundSamlSsoProfilesId}/idpCredentials:add", "httpMethod": "POST", "id": "cloudidentity.inboundSamlSsoProfiles.idpCredentials.add", @@ -1990,13 +1990,18 @@ } } }, - "revision": "20240507", + "revision": "20240611", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { "description": "LRO response metadata for InboundSamlSsoProfilesService.AddIdpCredential.", "id": "AddIdpCredentialOperationMetadata", - "properties": {}, + "properties": { + "state": { + "description": "State of this Operation Will be \"awaiting-multi-party-approval\" when the operation is deferred due to the target customer having enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448).", + "type": "string" + } + }, "type": "object" }, "AddIdpCredentialRequest": { @@ -2036,7 +2041,12 @@ "CreateInboundSamlSsoProfileOperationMetadata": { "description": "LRO response metadata for InboundSamlSsoProfilesService.CreateInboundSamlSsoProfile.", "id": "CreateInboundSamlSsoProfileOperationMetadata", - "properties": {}, + "properties": { + "state": { + "description": "State of this Operation Will be \"awaiting-multi-party-approval\" when the operation is deferred due to the target customer having enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448).", + "type": "string" + } + }, "type": "object" }, "CreateInboundSsoAssignmentOperationMetadata": { @@ -4182,7 +4192,12 @@ "UpdateInboundSamlSsoProfileOperationMetadata": { "description": "LRO response metadata for InboundSamlSsoProfilesService.UpdateInboundSamlSsoProfile.", "id": "UpdateInboundSamlSsoProfileOperationMetadata", - "properties": {}, + "properties": { + "state": { + "description": "State of this Operation Will be \"awaiting-multi-party-approval\" when the operation is deferred due to the target customer having enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448).", + "type": "string" + } + }, "type": "object" }, "UpdateInboundSsoAssignmentOperationMetadata": { diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index dc0b05350aa..79b0376202c 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -302,6 +302,27 @@ type InboundSsoAssignmentsService struct { // AddIdpCredentialOperationMetadata: LRO response metadata for // InboundSamlSsoProfilesService.AddIdpCredential. type AddIdpCredentialOperationMetadata struct { + // State: State of this Operation Will be "awaiting-multi-party-approval" when + // the operation is deferred due to the target customer having enabled + // Multi-party approval for sensitive actions + // (https://support.google.com/a/answer/13790448). + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 *AddIdpCredentialOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod AddIdpCredentialOperationMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // AddIdpCredentialRequest: The request for creating an IdpCredential with its @@ -369,6 +390,27 @@ type CreateGroupMetadata struct { // CreateInboundSamlSsoProfileOperationMetadata: LRO response metadata for // InboundSamlSsoProfilesService.CreateInboundSamlSsoProfile. type CreateInboundSamlSsoProfileOperationMetadata struct { + // State: State of this Operation Will be "awaiting-multi-party-approval" when + // the operation is deferred due to the target customer having enabled + // Multi-party approval for sensitive actions + // (https://support.google.com/a/answer/13790448). + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 *CreateInboundSamlSsoProfileOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CreateInboundSamlSsoProfileOperationMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // CreateInboundSsoAssignmentOperationMetadata: LRO response metadata for @@ -3036,6 +3078,27 @@ type UpdateGroupMetadata struct { // UpdateInboundSamlSsoProfileOperationMetadata: LRO response metadata for // InboundSamlSsoProfilesService.UpdateInboundSamlSsoProfile. type UpdateInboundSamlSsoProfileOperationMetadata struct { + // State: State of this Operation Will be "awaiting-multi-party-approval" when + // the operation is deferred due to the target customer having enabled + // Multi-party approval for sensitive actions + // (https://support.google.com/a/answer/13790448). + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 *UpdateInboundSamlSsoProfileOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod UpdateInboundSamlSsoProfileOperationMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // UpdateInboundSsoAssignmentOperationMetadata: LRO response metadata for @@ -8517,7 +8580,11 @@ type InboundSamlSsoProfilesCreateCall struct { header_ http.Header } -// Create: Creates an InboundSamlSsoProfile for a customer. +// Create: Creates an InboundSamlSsoProfile for a customer. When the target +// customer has enabled Multi-party approval for sensitive actions +// (https://support.google.com/a/answer/13790448), the `Operation` in the +// response will have "done": false`, it will not have a response, and the +// metadata will have "state": "awaiting-multi-party-approval". func (r *InboundSamlSsoProfilesService) Create(inboundsamlssoprofile *InboundSamlSsoProfile) *InboundSamlSsoProfilesCreateCall { c := &InboundSamlSsoProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.inboundsamlssoprofile = inboundsamlssoprofile @@ -8975,7 +9042,11 @@ type InboundSamlSsoProfilesPatchCall struct { header_ http.Header } -// Patch: Updates an InboundSamlSsoProfile. +// Patch: Updates an InboundSamlSsoProfile. When the target customer has +// enabled Multi-party approval for sensitive actions +// (https://support.google.com/a/answer/13790448), the `Operation` in the +// response will have "done": false`, it will not have a response, and the +// metadata will have "state": "awaiting-multi-party-approval". // // - name: Output only. Resource name // (https://cloud.google.com/apis/design/resource_names) of the SAML SSO @@ -9085,7 +9156,11 @@ type InboundSamlSsoProfilesIdpCredentialsAddCall struct { header_ http.Header } -// Add: Adds an IdpCredential. Up to 2 credentials are allowed. +// Add: Adds an IdpCredential. Up to 2 credentials are allowed. When the target +// customer has enabled Multi-party approval for sensitive actions +// (https://support.google.com/a/answer/13790448), the `Operation` in the +// response will have "done": false`, it will not have a response, and the +// metadata will have "state": "awaiting-multi-party-approval". // // - parent: The InboundSamlSsoProfile that owns the IdpCredential. Format: // `inboundSamlSsoProfiles/{sso_profile_id}`. diff --git a/cloudidentity/v1beta1/cloudidentity-api.json b/cloudidentity/v1beta1/cloudidentity-api.json index 453d1779204..cf90398fc28 100644 --- a/cloudidentity/v1beta1/cloudidentity-api.json +++ b/cloudidentity/v1beta1/cloudidentity-api.json @@ -1545,7 +1545,7 @@ "inboundSamlSsoProfiles": { "methods": { "create": { - "description": "Creates an InboundSamlSsoProfile for a customer.", + "description": "Creates an InboundSamlSsoProfile for a customer. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `\"done\": false`, it will not have a response, and the metadata will have `\"state\": \"awaiting-multi-party-approval\"`.", "flatPath": "v1beta1/inboundSamlSsoProfiles", "httpMethod": "POST", "id": "cloudidentity.inboundSamlSsoProfiles.create", @@ -1645,7 +1645,7 @@ ] }, "patch": { - "description": "Updates an InboundSamlSsoProfile.", + "description": "Updates an InboundSamlSsoProfile. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `\"done\": false`, it will not have a response, and the metadata will have `\"state\": \"awaiting-multi-party-approval\"`.", "flatPath": "v1beta1/inboundSamlSsoProfiles/{inboundSamlSsoProfilesId}", "httpMethod": "PATCH", "id": "cloudidentity.inboundSamlSsoProfiles.patch", @@ -1683,7 +1683,7 @@ "idpCredentials": { "methods": { "add": { - "description": "Adds an IdpCredential. Up to 2 credentials are allowed.", + "description": "Adds an IdpCredential. Up to 2 credentials are allowed. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `\"done\": false`, it will not have a response, and the metadata will have `\"state\": \"awaiting-multi-party-approval\"`.", "flatPath": "v1beta1/inboundSamlSsoProfiles/{inboundSamlSsoProfilesId}/idpCredentials:add", "httpMethod": "POST", "id": "cloudidentity.inboundSamlSsoProfiles.idpCredentials.add", @@ -2015,13 +2015,18 @@ } } }, - "revision": "20240507", + "revision": "20240611", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { "description": "LRO response metadata for InboundSamlSsoProfilesService.AddIdpCredential.", "id": "AddIdpCredentialOperationMetadata", - "properties": {}, + "properties": { + "state": { + "description": "State of this Operation Will be \"awaiting-multi-party-approval\" when the operation is deferred due to the target customer having enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448).", + "type": "string" + } + }, "type": "object" }, "AddIdpCredentialRequest": { @@ -2520,7 +2525,12 @@ "CreateInboundSamlSsoProfileOperationMetadata": { "description": "LRO response metadata for InboundSamlSsoProfilesService.CreateInboundSamlSsoProfile.", "id": "CreateInboundSamlSsoProfileOperationMetadata", - "properties": {}, + "properties": { + "state": { + "description": "State of this Operation Will be \"awaiting-multi-party-approval\" when the operation is deferred due to the target customer having enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448).", + "type": "string" + } + }, "type": "object" }, "CreateInboundSsoAssignmentOperationMetadata": { @@ -5067,7 +5077,12 @@ "UpdateInboundSamlSsoProfileOperationMetadata": { "description": "LRO response metadata for InboundSamlSsoProfilesService.UpdateInboundSamlSsoProfile.", "id": "UpdateInboundSamlSsoProfileOperationMetadata", - "properties": {}, + "properties": { + "state": { + "description": "State of this Operation Will be \"awaiting-multi-party-approval\" when the operation is deferred due to the target customer having enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448).", + "type": "string" + } + }, "type": "object" }, "UpdateInboundSsoAssignmentOperationMetadata": { diff --git a/cloudidentity/v1beta1/cloudidentity-gen.go b/cloudidentity/v1beta1/cloudidentity-gen.go index e766a17f8b4..7a858637543 100644 --- a/cloudidentity/v1beta1/cloudidentity-gen.go +++ b/cloudidentity/v1beta1/cloudidentity-gen.go @@ -326,6 +326,27 @@ type OrgUnitsMembershipsService struct { // AddIdpCredentialOperationMetadata: LRO response metadata for // InboundSamlSsoProfilesService.AddIdpCredential. type AddIdpCredentialOperationMetadata struct { + // State: State of this Operation Will be "awaiting-multi-party-approval" when + // the operation is deferred due to the target customer having enabled + // Multi-party approval for sensitive actions + // (https://support.google.com/a/answer/13790448). + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 *AddIdpCredentialOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod AddIdpCredentialOperationMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // AddIdpCredentialRequest: The request for creating an IdpCredential with its @@ -961,6 +982,27 @@ func (s *CreateDeviceRequest) MarshalJSON() ([]byte, error) { // CreateInboundSamlSsoProfileOperationMetadata: LRO response metadata for // InboundSamlSsoProfilesService.CreateInboundSamlSsoProfile. type CreateInboundSamlSsoProfileOperationMetadata struct { + // State: State of this Operation Will be "awaiting-multi-party-approval" when + // the operation is deferred due to the target customer having enabled + // Multi-party approval for sensitive actions + // (https://support.google.com/a/answer/13790448). + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 *CreateInboundSamlSsoProfileOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CreateInboundSamlSsoProfileOperationMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // CreateInboundSsoAssignmentOperationMetadata: LRO response metadata for @@ -3865,6 +3907,27 @@ func (s *TransitiveMembershipRole) MarshalJSON() ([]byte, error) { // UpdateInboundSamlSsoProfileOperationMetadata: LRO response metadata for // InboundSamlSsoProfilesService.UpdateInboundSamlSsoProfile. type UpdateInboundSamlSsoProfileOperationMetadata struct { + // State: State of this Operation Will be "awaiting-multi-party-approval" when + // the operation is deferred due to the target customer having enabled + // Multi-party approval for sensitive actions + // (https://support.google.com/a/answer/13790448). + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 *UpdateInboundSamlSsoProfileOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod UpdateInboundSamlSsoProfileOperationMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // UpdateInboundSsoAssignmentOperationMetadata: LRO response metadata for @@ -9253,7 +9316,11 @@ type InboundSamlSsoProfilesCreateCall struct { header_ http.Header } -// Create: Creates an InboundSamlSsoProfile for a customer. +// Create: Creates an InboundSamlSsoProfile for a customer. When the target +// customer has enabled Multi-party approval for sensitive actions +// (https://support.google.com/a/answer/13790448), the `Operation` in the +// response will have "done": false`, it will not have a response, and the +// metadata will have "state": "awaiting-multi-party-approval". func (r *InboundSamlSsoProfilesService) Create(inboundsamlssoprofile *InboundSamlSsoProfile) *InboundSamlSsoProfilesCreateCall { c := &InboundSamlSsoProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.inboundsamlssoprofile = inboundsamlssoprofile @@ -9711,7 +9778,11 @@ type InboundSamlSsoProfilesPatchCall struct { header_ http.Header } -// Patch: Updates an InboundSamlSsoProfile. +// Patch: Updates an InboundSamlSsoProfile. When the target customer has +// enabled Multi-party approval for sensitive actions +// (https://support.google.com/a/answer/13790448), the `Operation` in the +// response will have "done": false`, it will not have a response, and the +// metadata will have "state": "awaiting-multi-party-approval". // // - name: Output only. Resource name // (https://cloud.google.com/apis/design/resource_names) of the SAML SSO @@ -9821,7 +9892,11 @@ type InboundSamlSsoProfilesIdpCredentialsAddCall struct { header_ http.Header } -// Add: Adds an IdpCredential. Up to 2 credentials are allowed. +// Add: Adds an IdpCredential. Up to 2 credentials are allowed. When the target +// customer has enabled Multi-party approval for sensitive actions +// (https://support.google.com/a/answer/13790448), the `Operation` in the +// response will have "done": false`, it will not have a response, and the +// metadata will have "state": "awaiting-multi-party-approval". // // - parent: The InboundSamlSsoProfile that owns the IdpCredential. Format: // `inboundSamlSsoProfiles/{sso_profile_id}`. diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index b4b3e56b28a..e617ad15787 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -18864,6 +18864,100 @@ } } }, + "networkProfiles": { + "methods": { + "get": { + "description": "Returns the specified network profile.", + "flatPath": "projects/{project}/global/networkProfiles/{networkProfile}", + "httpMethod": "GET", + "id": "compute.networkProfiles.get", + "parameterOrder": [ + "project", + "networkProfile" + ], + "parameters": { + "networkProfile": { + "description": "Name of the network profile to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/networkProfiles/{networkProfile}", + "response": { + "$ref": "NetworkProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Retrieves a list of network profiles available to the specified project.", + "flatPath": "projects/{project}/global/networkProfiles", + "httpMethod": "GET", + "id": "compute.networkProfiles.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/networkProfiles", + "response": { + "$ref": "NetworkProfilesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "networks": { "methods": { "addPeering": { @@ -44423,7 +44517,7 @@ } } }, - "revision": "20240526", + "revision": "20240604", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -45708,6 +45802,10 @@ "format": "int32", "type": "integer" }, + "turboMode": { + "description": "Turbo mode to use for the instance. Supported modes include: * ALL_CORE_MAX Using empty string or not setting this field will use the default turbo mode.", + "type": "string" + }, "visibleCoreCount": { "description": "The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance's nominal CPU count and the underlying platform's SMT width.", "format": "int32", @@ -47299,6 +47397,16 @@ "description": "Type of the resource.", "type": "string" }, + "loadBalancingScheme": { + "description": "The value can only be INTERNAL_MANAGED for cross-region internal layer 7 load balancer. If loadBalancingScheme is not specified, the backend bucket can be used by classic global external load balancers, or global application external load balancers, or both.", + "enum": [ + "INTERNAL_MANAGED" + ], + "enumDescriptions": [ + "Signifies that this will be used for internal Application Load Balancers." + ], + "type": "string" + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -53593,6 +53701,7 @@ "description": "Network scope of the traffic destination.", "enum": [ "INTERNET", + "INTRA_VPC", "NON_INTERNET", "UNSPECIFIED", "VPC_NETWORKS" @@ -53601,6 +53710,7 @@ "", "", "", + "", "" ], "type": "string" @@ -53651,6 +53761,7 @@ "description": "Network scope of the traffic source.", "enum": [ "INTERNET", + "INTRA_VPC", "NON_INTERNET", "UNSPECIFIED", "VPC_NETWORKS" @@ -53659,6 +53770,7 @@ "", "", "", + "", "" ], "type": "string" @@ -67923,6 +68035,11 @@ "$ref": "ManagedInstancePropertiesFromFlexibilityPolicy", "description": "[Output Only] Instance properties selected for this instance resulting from InstanceFlexibilityPolicy." }, + "sizeInUnit": { + "description": "[Output only] The size of the VM represented by this Managed Instance. This is how much this Managed Instance contributes to the size of the group.", + "format": "float", + "type": "number" + }, "tag": { "deprecated": true, "description": "[Output Only] Tag describing the version.", @@ -71314,6 +71431,526 @@ }, "type": "object" }, + "NetworkProfile": { + "description": "NetworkProfile represents a Google managed network profile resource.", + "id": "NetworkProfile", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "[Output Only] An optional description of this resource.", + "type": "string" + }, + "features": { + "$ref": "NetworkProfileNetworkFeatures", + "description": "[Output Only] Features supported by the network." + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#networkProfile", + "description": "[Output Only] Type of the resource. Always compute#networkProfile for network profiles.", + "type": "string" + }, + "name": { + "description": "[Output Only] Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + }, + "zone": { + "description": "[Output Only] Zone to which the network is restricted.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkProfileNetworkFeatures": { + "id": "NetworkProfileNetworkFeatures", + "properties": { + "addressPurposes": { + "description": "Specifies what address purposes are supported. If empty, all address purposes are supported.", + "items": { + "enum": [ + "DNS_RESOLVER", + "GCE_ENDPOINT", + "IPSEC_INTERCONNECT", + "NAT_AUTO", + "PRIVATE_SERVICE_CONNECT", + "SERVERLESS", + "SHARED_LOADBALANCER_VIP", + "VPC_PEERING" + ], + "enumDescriptions": [ + "DNS resolver address in the subnetwork.", + "VM internal/alias IP, Internal LB service IP, etc.", + "A regional internal IP address range reserved for the VLAN attachment that is used in HA VPN over Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment’s IP address range.", + "External IP automatically reserved for Cloud NAT.", + "A private network IP address that can be used to configure Private Service Connect. This purpose can be specified only for GLOBAL addresses of Type INTERNAL", + "A regional internal IP address range reserved for Serverless.", + "A private network IP address that can be shared by multiple Internal Load Balancer forwarding rules.", + "IP range for peer networks." + ], + "type": "string" + }, + "type": "array" + }, + "allowAliasIpRanges": { + "description": "Specifies whether alias IP ranges (and secondary address ranges) are allowed.", + "enum": [ + "ALIAS_IP_RANGES_ALLOWED", + "ALIAS_IP_RANGES_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowAutoModeSubnet": { + "description": "Specifies whether auto mode subnet creation is allowed.", + "enum": [ + "AUTO_MODE_SUBNET_ALLOWED", + "AUTO_MODE_SUBNET_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowClassDFirewalls": { + "description": "Specifies whether firewalls for Class D address ranges are supported.", + "enum": [ + "CLASS_D_FIREWALLS_ALLOWED", + "CLASS_D_FIREWALLS_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowCloudNat": { + "description": "Specifies whether cloud NAT creation is allowed.", + "enum": [ + "CLOUD_NAT_ALLOWED", + "CLOUD_NAT_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowCloudRouter": { + "description": "Specifies whether cloud router creation is allowed.", + "enum": [ + "CLOUD_ROUTER_ALLOWED", + "CLOUD_ROUTER_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowExternalIpAccess": { + "description": "Specifies whether VMs are allowed to have external IP access on network interfaces connected to this VPC.", + "enum": [ + "EXTERNAL_IP_ACCESS_ALLOWED", + "EXTERNAL_IP_ACCESS_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowInterconnect": { + "description": "Specifies whether Cloud Interconnect creation is allowed.", + "enum": [ + "INTERCONNECT_ALLOWED", + "INTERCONNECT_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowLoadBalancing": { + "description": "Specifies whether cloud load balancing is allowed.", + "enum": [ + "LOAD_BALANCING_ALLOWED", + "LOAD_BALANCING_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowMultiNicInSameNetwork": { + "description": "Specifies whether multi-nic in the same network is allowed.", + "enum": [ + "MULTI_NIC_IN_SAME_NETWORK_ALLOWED", + "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowPacketMirroring": { + "description": "Specifies whether Packet Mirroring 1.0 is supported.", + "enum": [ + "PACKET_MIRRORING_ALLOWED", + "PACKET_MIRRORING_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowPrivateGoogleAccess": { + "description": "Specifies whether private Google access is allowed.", + "enum": [ + "PRIVATE_GOOGLE_ACCESS_ALLOWED", + "PRIVATE_GOOGLE_ACCESS_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowPsc": { + "description": "Specifies whether PSC creation is allowed.", + "enum": [ + "PSC_ALLOWED", + "PSC_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowSameNetworkUnicast": { + "description": "Specifies whether unicast within the same network is allowed.", + "enum": [ + "SAME_NETWORK_UNICAST_ALLOWED", + "SAME_NETWORK_UNICAST_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowStaticRoutes": { + "description": "Specifies whether static route creation is allowed.", + "enum": [ + "STATIC_ROUTES_ALLOWED", + "STATIC_ROUTES_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowSubInterfaces": { + "description": "Specifies whether sub interfaces are allowed.", + "enum": [ + "SUBINTERFACES_ALLOWED", + "SUBINTERFACES_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowVpcPeering": { + "description": "Specifies whether VPC peering is allowed.", + "enum": [ + "VPC_PEERING_ALLOWED", + "VPC_PEERING_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowVpn": { + "description": "Specifies whether VPN creation is allowed.", + "enum": [ + "VPN_ALLOWED", + "VPN_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowedSubnetPurposes": { + "description": "Specifies which subnetwork purposes are supported.", + "items": { + "enum": [ + "SUBNET_PURPOSE_CUSTOM_HARDWARE", + "SUBNET_PURPOSE_PRIVATE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "type": "array" + }, + "allowedSubnetStackTypes": { + "description": "Specifies which subnetwork stack types are supported.", + "items": { + "enum": [ + "SUBNET_STACK_TYPE_IPV4_IPV6", + "SUBNET_STACK_TYPE_IPV4_ONLY", + "SUBNET_STACK_TYPE_IPV6_ONLY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "type": "array" + }, + "interfaceTypes": { + "description": "If set, limits the interface types that the network supports. If empty, all interface types are supported.", + "items": { + "enum": [ + "GVNIC", + "IDPF", + "UNSPECIFIED_NIC_TYPE", + "VIRTIO_NET" + ], + "enumDescriptions": [ + "GVNIC", + "IDPF", + "No type specified.", + "VIRTIO" + ], + "type": "string" + }, + "type": "array" + }, + "multicast": { + "description": "Specifies which type of multicast is supported.", + "enum": [ + "MULTICAST_SDN", + "MULTICAST_ULL" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "unicast": { + "description": "Specifies which type of unicast is supported.", + "enum": [ + "UNICAST_SDN", + "UNICAST_ULL" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "NetworkProfilesListResponse": { + "description": "Contains a list of network profiles.", + "id": "NetworkProfilesListResponse", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of NetworkProfile resources.", + "items": { + "$ref": "NetworkProfile" + }, + "type": "array" + }, + "kind": { + "default": "compute#networkProfileList", + "description": "[Output Only] Type of resource. Always compute#networkProfileList for network profiles.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "NetworkRoutingConfig": { "description": "A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.", "id": "NetworkRoutingConfig", @@ -98998,7 +99635,7 @@ "description": "Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true." }, "weight": { - "description": "Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000.", + "description": "Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. Don't configure session affinity if you're using weighted traffic splitting. If you do, the weighted traffic splitting configuration takes precedence. The value must be from 0 to 1000.", "format": "uint32", "type": "integer" } diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index de1ce7870ce..01a4f11f998 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -205,6 +205,7 @@ func New(client *http.Client) (*Service, error) { s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) s.NetworkFirewallPolicies = NewNetworkFirewallPoliciesService(s) s.NetworkPlacements = NewNetworkPlacementsService(s) + s.NetworkProfiles = NewNetworkProfilesService(s) s.Networks = NewNetworksService(s) s.NodeGroups = NewNodeGroupsService(s) s.NodeTemplates = NewNodeTemplatesService(s) @@ -365,6 +366,8 @@ type Service struct { NetworkPlacements *NetworkPlacementsService + NetworkProfiles *NetworkProfilesService + Networks *NetworksService NodeGroups *NodeGroupsService @@ -897,6 +900,15 @@ type NetworkPlacementsService struct { s *Service } +func NewNetworkProfilesService(s *Service) *NetworkProfilesService { + rs := &NetworkProfilesService{s: s} + return rs +} + +type NetworkProfilesService struct { + s *Service +} + func NewNetworksService(s *Service) *NetworksService { rs := &NetworksService{s: s} return rs @@ -2786,6 +2798,10 @@ type AdvancedMachineFeatures struct { // simultaneous multithreading (SMT) set this to 1. If unset, the maximum // number of threads supported per core by the underlying processor is assumed. ThreadsPerCore int64 `json:"threadsPerCore,omitempty"` + // TurboMode: Turbo mode to use for the instance. Supported modes include: * + // ALL_CORE_MAX Using empty string or not setting this field will use the + // default turbo mode. + TurboMode string `json:"turboMode,omitempty"` // VisibleCoreCount: The number of physical cores to expose to an instance. // Multiply by the number of threads per core to compute the total number of // virtual CPUs to expose to the instance. If unset, the number of cores is @@ -4759,6 +4775,15 @@ type BackendBucket struct { Id uint64 `json:"id,omitempty,string"` // Kind: Type of the resource. Kind string `json:"kind,omitempty"` + // LoadBalancingScheme: The value can only be INTERNAL_MANAGED for cross-region + // internal layer 7 load balancer. If loadBalancingScheme is not specified, the + // backend bucket can be used by classic global external load balancers, or + // global application external load balancers, or both. + // + // Possible values: + // "INTERNAL_MANAGED" - Signifies that this will be used for internal + // Application Load Balancers. + LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` // Name: Name of the resource. Provided by the client when the resource is // created. The name must be 1-63 characters long, and comply with RFC1035. // Specifically, the name must be 1-63 characters long and match the regular @@ -12288,6 +12313,7 @@ type FirewallPolicyRuleMatcher struct { // // Possible values: // "INTERNET" + // "INTRA_VPC" // "NON_INTERNET" // "UNSPECIFIED" // "VPC_NETWORKS" @@ -12315,6 +12341,7 @@ type FirewallPolicyRuleMatcher struct { // // Possible values: // "INTERNET" + // "INTRA_VPC" // "NON_INTERNET" // "UNSPECIFIED" // "VPC_NETWORKS" @@ -28527,6 +28554,10 @@ type ManagedInstance struct { // PropertiesFromFlexibilityPolicy: [Output Only] Instance properties selected // for this instance resulting from InstanceFlexibilityPolicy. PropertiesFromFlexibilityPolicy *ManagedInstancePropertiesFromFlexibilityPolicy `json:"propertiesFromFlexibilityPolicy,omitempty"` + // SizeInUnit: [Output only] The size of the VM represented by this Managed + // Instance. This is how much this Managed Instance contributes to the size of + // the group. + SizeInUnit float64 `json:"sizeInUnit,omitempty"` // Tag: [Output Only] Tag describing the version. Tag string `json:"tag,omitempty"` // TargetStatus: [Output Only] The eventual status of the instance. The @@ -28561,6 +28592,20 @@ func (s *ManagedInstance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +func (s *ManagedInstance) UnmarshalJSON(data []byte) error { + type NoMethod ManagedInstance + var s1 struct { + SizeInUnit gensupport.JSONFloat64 `json:"sizeInUnit"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SizeInUnit = float64(s1.SizeInUnit) + return nil +} + type ManagedInstanceAllInstancesConfig struct { // Revision: [Output Only] Current all-instances configuration revision. This // value is in RFC3339 text format. @@ -32191,6 +32236,395 @@ func (s *NetworkPlacementsListResponseWarningData) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// NetworkProfile: NetworkProfile represents a Google managed network profile +// resource. +type NetworkProfile struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Description: [Output Only] An optional description of this resource. + Description string `json:"description,omitempty"` + // Features: [Output Only] Features supported by the network. + Features *NetworkProfileNetworkFeatures `json:"features,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This identifier is + // defined by the server. + Id uint64 `json:"id,omitempty,string"` + // Kind: [Output Only] Type of the resource. Always compute#networkProfile for + // network profiles. + Kind string `json:"kind,omitempty"` + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // Zone: [Output Only] Zone to which the network is restricted. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") 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. "CreationTimestamp") 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 *NetworkProfile) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfile + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type NetworkProfileNetworkFeatures struct { + // AddressPurposes: Specifies what address purposes are supported. If empty, + // all address purposes are supported. + // + // Possible values: + // "DNS_RESOLVER" - DNS resolver address in the subnetwork. + // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. + // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for + // the VLAN attachment that is used in HA VPN over Cloud Interconnect. This + // regional internal IP address range must not overlap with any IP address + // range of subnet/route in the VPC network and its peering networks. After the + // VLAN attachment is created with the reserved IP address range, when creating + // a new VPN gateway, its interface IP address is allocated from the associated + // VLAN attachment’s IP address range. + // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. + // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used + // to configure Private Service Connect. This purpose can be specified only for + // GLOBAL addresses of Type INTERNAL + // "SERVERLESS" - A regional internal IP address range reserved for + // Serverless. + // "SHARED_LOADBALANCER_VIP" - A private network IP address that can be + // shared by multiple Internal Load Balancer forwarding rules. + // "VPC_PEERING" - IP range for peer networks. + AddressPurposes []string `json:"addressPurposes,omitempty"` + // AllowAliasIpRanges: Specifies whether alias IP ranges (and secondary address + // ranges) are allowed. + // + // Possible values: + // "ALIAS_IP_RANGES_ALLOWED" + // "ALIAS_IP_RANGES_BLOCKED" + AllowAliasIpRanges string `json:"allowAliasIpRanges,omitempty"` + // AllowAutoModeSubnet: Specifies whether auto mode subnet creation is allowed. + // + // Possible values: + // "AUTO_MODE_SUBNET_ALLOWED" + // "AUTO_MODE_SUBNET_BLOCKED" + AllowAutoModeSubnet string `json:"allowAutoModeSubnet,omitempty"` + // AllowClassDFirewalls: Specifies whether firewalls for Class D address ranges + // are supported. + // + // Possible values: + // "CLASS_D_FIREWALLS_ALLOWED" + // "CLASS_D_FIREWALLS_BLOCKED" + AllowClassDFirewalls string `json:"allowClassDFirewalls,omitempty"` + // AllowCloudNat: Specifies whether cloud NAT creation is allowed. + // + // Possible values: + // "CLOUD_NAT_ALLOWED" + // "CLOUD_NAT_BLOCKED" + AllowCloudNat string `json:"allowCloudNat,omitempty"` + // AllowCloudRouter: Specifies whether cloud router creation is allowed. + // + // Possible values: + // "CLOUD_ROUTER_ALLOWED" + // "CLOUD_ROUTER_BLOCKED" + AllowCloudRouter string `json:"allowCloudRouter,omitempty"` + // AllowExternalIpAccess: Specifies whether VMs are allowed to have external IP + // access on network interfaces connected to this VPC. + // + // Possible values: + // "EXTERNAL_IP_ACCESS_ALLOWED" + // "EXTERNAL_IP_ACCESS_BLOCKED" + AllowExternalIpAccess string `json:"allowExternalIpAccess,omitempty"` + // AllowInterconnect: Specifies whether Cloud Interconnect creation is allowed. + // + // Possible values: + // "INTERCONNECT_ALLOWED" + // "INTERCONNECT_BLOCKED" + AllowInterconnect string `json:"allowInterconnect,omitempty"` + // AllowLoadBalancing: Specifies whether cloud load balancing is allowed. + // + // Possible values: + // "LOAD_BALANCING_ALLOWED" + // "LOAD_BALANCING_BLOCKED" + AllowLoadBalancing string `json:"allowLoadBalancing,omitempty"` + // AllowMultiNicInSameNetwork: Specifies whether multi-nic in the same network + // is allowed. + // + // Possible values: + // "MULTI_NIC_IN_SAME_NETWORK_ALLOWED" + // "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" + AllowMultiNicInSameNetwork string `json:"allowMultiNicInSameNetwork,omitempty"` + // AllowPacketMirroring: Specifies whether Packet Mirroring 1.0 is supported. + // + // Possible values: + // "PACKET_MIRRORING_ALLOWED" + // "PACKET_MIRRORING_BLOCKED" + AllowPacketMirroring string `json:"allowPacketMirroring,omitempty"` + // AllowPrivateGoogleAccess: Specifies whether private Google access is + // allowed. + // + // Possible values: + // "PRIVATE_GOOGLE_ACCESS_ALLOWED" + // "PRIVATE_GOOGLE_ACCESS_BLOCKED" + AllowPrivateGoogleAccess string `json:"allowPrivateGoogleAccess,omitempty"` + // AllowPsc: Specifies whether PSC creation is allowed. + // + // Possible values: + // "PSC_ALLOWED" + // "PSC_BLOCKED" + AllowPsc string `json:"allowPsc,omitempty"` + // AllowSameNetworkUnicast: Specifies whether unicast within the same network + // is allowed. + // + // Possible values: + // "SAME_NETWORK_UNICAST_ALLOWED" + // "SAME_NETWORK_UNICAST_BLOCKED" + AllowSameNetworkUnicast string `json:"allowSameNetworkUnicast,omitempty"` + // AllowStaticRoutes: Specifies whether static route creation is allowed. + // + // Possible values: + // "STATIC_ROUTES_ALLOWED" + // "STATIC_ROUTES_BLOCKED" + AllowStaticRoutes string `json:"allowStaticRoutes,omitempty"` + // AllowSubInterfaces: Specifies whether sub interfaces are allowed. + // + // Possible values: + // "SUBINTERFACES_ALLOWED" + // "SUBINTERFACES_BLOCKED" + AllowSubInterfaces string `json:"allowSubInterfaces,omitempty"` + // AllowVpcPeering: Specifies whether VPC peering is allowed. + // + // Possible values: + // "VPC_PEERING_ALLOWED" + // "VPC_PEERING_BLOCKED" + AllowVpcPeering string `json:"allowVpcPeering,omitempty"` + // AllowVpn: Specifies whether VPN creation is allowed. + // + // Possible values: + // "VPN_ALLOWED" + // "VPN_BLOCKED" + AllowVpn string `json:"allowVpn,omitempty"` + // AllowedSubnetPurposes: Specifies which subnetwork purposes are supported. + // + // Possible values: + // "SUBNET_PURPOSE_CUSTOM_HARDWARE" + // "SUBNET_PURPOSE_PRIVATE" + AllowedSubnetPurposes []string `json:"allowedSubnetPurposes,omitempty"` + // AllowedSubnetStackTypes: Specifies which subnetwork stack types are + // supported. + // + // Possible values: + // "SUBNET_STACK_TYPE_IPV4_IPV6" + // "SUBNET_STACK_TYPE_IPV4_ONLY" + // "SUBNET_STACK_TYPE_IPV6_ONLY" + AllowedSubnetStackTypes []string `json:"allowedSubnetStackTypes,omitempty"` + // InterfaceTypes: If set, limits the interface types that the network + // supports. If empty, all interface types are supported. + // + // Possible values: + // "GVNIC" - GVNIC + // "IDPF" - IDPF + // "UNSPECIFIED_NIC_TYPE" - No type specified. + // "VIRTIO_NET" - VIRTIO + InterfaceTypes []string `json:"interfaceTypes,omitempty"` + // Multicast: Specifies which type of multicast is supported. + // + // Possible values: + // "MULTICAST_SDN" + // "MULTICAST_ULL" + Multicast string `json:"multicast,omitempty"` + // Unicast: Specifies which type of unicast is supported. + // + // Possible values: + // "UNICAST_SDN" + // "UNICAST_ULL" + Unicast string `json:"unicast,omitempty"` + // ForceSendFields is a list of field names (e.g. "AddressPurposes") 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. "AddressPurposes") 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 *NetworkProfileNetworkFeatures) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfileNetworkFeatures + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// NetworkProfilesListResponse: Contains a list of network profiles. +type NetworkProfilesListResponse struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of NetworkProfile resources. + Items []*NetworkProfile `json:"items,omitempty"` + // Kind: [Output Only] Type of resource. Always compute#networkProfileList for + // network profiles. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. end_interface: + // MixerListResponseWithEtagBuilder + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *NetworkProfilesListResponseWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 *NetworkProfilesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfilesListResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// NetworkProfilesListResponseWarning: [Output Only] Informational warning +// message. +type NetworkProfilesListResponseWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*NetworkProfilesListResponseWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *NetworkProfilesListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfilesListResponseWarning + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type NetworkProfilesListResponseWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *NetworkProfilesListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfilesListResponseWarningData + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // NetworkRoutingConfig: A routing configuration attached to a network // resource. The message includes the list of routers associated with the // network, and a flag indicating the type of routing behavior to enforce @@ -62189,8 +62623,10 @@ type WeightedBackendService struct { // routeAction) . The selection of a backend service is determined only for new // traffic. Once a user's request has been directed to a backend service, // subsequent requests are sent to the same backend service as determined by - // the backend service's session affinity policy. The value must be from 0 to - // 1000. + // the backend service's session affinity policy. Don't configure session + // affinity if you're using weighted traffic splitting. If you do, the weighted + // traffic splitting configuration takes precedence. The value must be from 0 + // to 1000. Weight int64 `json:"weight,omitempty"` // ForceSendFields is a list of field names (e.g. "BackendService") to // unconditionally include in API requests. By default, fields with empty or diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index ba72997bd8e..6e707e65173 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -54445,95 +54445,86 @@ func (c *NetworkPlacementsListCall) Pages(ctx context.Context, f func(*NetworkPl } } -type NetworksAddPeeringCall struct { - s *Service - project string - network string - networksaddpeeringrequest *NetworksAddPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkProfilesGetCall struct { + s *Service + project string + networkProfile string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AddPeering: Adds a peering to the specified network. +// Get: Returns the specified network profile. // -// - network: Name of the network resource to add peering to. +// - networkProfile: Name of the network profile to return. // - project: Project ID for this request. -func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { - c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkProfilesService) Get(project string, networkProfile string) *NetworkProfilesGetCall { + c := &NetworkProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network - c.networksaddpeeringrequest = networksaddpeeringrequest - 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. 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 *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { - c.urlParams_.Set("requestId", requestId) + c.networkProfile = networkProfile 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 *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { +func (c *NetworkProfilesGetCall) Fields(s ...googleapi.Field) *NetworkProfilesGetCall { 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 *NetworkProfilesGetCall) IfNoneMatch(entityTag string) *NetworkProfilesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { +func (c *NetworkProfilesGetCall) Context(ctx context.Context) *NetworkProfilesGetCall { 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 *NetworksAddPeeringCall) Header() http.Header { +func (c *NetworkProfilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest) - if err != nil { - return nil, err +func (c *NetworkProfilesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/addPeering") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles/{networkProfile}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, + "project": c.project, + "networkProfile": c.networkProfile, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.addPeering" call. +// Do executes the "compute.networkProfiles.get" 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 +// *NetworkProfile.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 *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkProfilesGetCall) Do(opts ...googleapi.CallOption) (*NetworkProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54552,7 +54543,7 @@ func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54565,89 +54556,162 @@ func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, e return ret, nil } -type NetworksDeleteCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkProfilesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified network. +// List: Retrieves a list of network profiles available to the specified +// project. // -// - network: Name of the network to delete. // - project: Project ID for this request. -func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { - c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkProfilesService) List(project string) *NetworkProfilesListCall { + c := &NetworkProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network 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. 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 *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NetworkProfilesListCall) Filter(filter string) *NetworkProfilesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NetworkProfilesListCall) MaxResults(maxResults int64) *NetworkProfilesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NetworkProfilesListCall) OrderBy(orderBy string) *NetworkProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NetworkProfilesListCall) PageToken(pageToken string) *NetworkProfilesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NetworkProfilesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkProfilesListCall { + 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. -func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { +func (c *NetworkProfilesListCall) Fields(s ...googleapi.Field) *NetworkProfilesListCall { 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 *NetworkProfilesListCall) IfNoneMatch(entityTag string) *NetworkProfilesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { +func (c *NetworkProfilesListCall) Context(ctx context.Context) *NetworkProfilesListCall { 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 *NetworksDeleteCall) Header() http.Header { +func (c *NetworkProfilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkProfilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.delete" call. +// Do executes the "compute.networkProfiles.list" 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 *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *NetworkProfilesListResponse.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 *NetworkProfilesListCall) Do(opts ...googleapi.CallOption) (*NetworkProfilesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54666,7 +54730,7 @@ func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkProfilesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54679,31 +54743,286 @@ func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error return ret, nil } -type NetworksGetCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - 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 *NetworkProfilesListCall) Pages(ctx context.Context, f func(*NetworkProfilesListResponse) 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) + } } -// Get: Returns the specified network. +type NetworksAddPeeringCall struct { + s *Service + project string + network string + networksaddpeeringrequest *NetworksAddPeeringRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddPeering: Adds a peering to the specified network. // -// - network: Name of the network to return. +// - network: Name of the network resource to add peering to. // - project: Project ID for this request. -func (r *NetworksService) Get(project string, network string) *NetworksGetCall { - c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { + c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.network = network + c.networksaddpeeringrequest = networksaddpeeringrequest + 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. 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 *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { + 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 *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { +func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { + 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 *NetworksAddPeeringCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/addPeering") + 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, + "network": c.network, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networks.addPeering" 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 *NetworksAddPeeringCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type NetworksDeleteCall struct { + s *Service + project string + network string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified network. +// +// - network: Name of the network to delete. +// - project: Project ID for this request. +func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { + c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.network = network + 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. 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 *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { + 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 *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { + 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 *NetworksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "network": c.network, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networks.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 *NetworksDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type NetworksGetCall struct { + s *Service + project string + network string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified network. +// +// - network: Name of the network to return. +// - project: Project ID for this request. +func (r *NetworksService) Get(project string, network string) *NetworksGetCall { + c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.network = network + 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 *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -65922,744 +66241,42 @@ func (c *PublicAdvertisedPrefixesPatchCall) Context(ctx context.Context) *Public // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") - 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{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.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 *PublicAdvertisedPrefixesPatchCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type PublicAdvertisedPrefixesWithdrawCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Withdraw: Withdraws the specified PublicAdvertisedPrefix -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: The name of the public advertised prefix. It -// should comply with RFC1035. -func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesWithdrawCall { - c := &PublicAdvertisedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - 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. 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 *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *PublicAdvertisedPrefixesWithdrawCall { - 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 *PublicAdvertisedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesWithdrawCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesWithdrawCall) Context(ctx context.Context) *PublicAdvertisedPrefixesWithdrawCall { - 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 *PublicAdvertisedPrefixesWithdrawCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw") - 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, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.withdraw" 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 *PublicAdvertisedPrefixesWithdrawCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type PublicDelegatedPrefixesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Lists all PublicDelegatedPrefix resources owned by the -// specific project across all scopes. To prevent failure, Google recommends -// that you set the `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *PublicDelegatedPrefixesService) AggregatedList(project string) *PublicDelegatedPrefixesAggregatedListCall { - c := &PublicDelegatedPrefixesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *PublicDelegatedPrefixesAggregatedListCall) Filter(filter string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *PublicDelegatedPrefixesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesAggregatedListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesAggregatedListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *PublicDelegatedPrefixesAggregatedListCall) PageToken(pageToken string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *PublicDelegatedPrefixesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *PublicDelegatedPrefixesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - 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 *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAggregatedListCall { - 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 *PublicDelegatedPrefixesAggregatedListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAggregatedListCall) Context(ctx context.Context) *PublicDelegatedPrefixesAggregatedListCall { - 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 *PublicDelegatedPrefixesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixAggregatedList.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 *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixAggregatedList, 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 := &PublicDelegatedPrefixAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// 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 *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixAggregatedList) 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 PublicDelegatedPrefixesAnnounceCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Announce: Announces the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: The name of the public delegated prefix. It should -// comply with RFC1035. -// - region: The name of the region where the public delegated prefix is -// located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Announce(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesAnnounceCall { - c := &PublicDelegatedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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. 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 *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *PublicDelegatedPrefixesAnnounceCall { - 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 *PublicDelegatedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAnnounceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAnnounceCall) Context(ctx context.Context) *PublicDelegatedPrefixesAnnounceCall { - 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 *PublicDelegatedPrefixesAnnounceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce") - 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, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.announce" 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 *PublicDelegatedPrefixesAnnounceCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type PublicDelegatedPrefixesDeleteCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// delete. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Delete(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesDeleteCall { - c := &PublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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. 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 *PublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *PublicDelegatedPrefixesDeleteCall { - 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 *PublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *PublicDelegatedPrefixesDeleteCall { - 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 *PublicDelegatedPrefixesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.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 *PublicDelegatedPrefixesDeleteCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type PublicDelegatedPrefixesGetCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified PublicDelegatedPrefix resource in the given -// region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// return. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Get(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesGetCall { - c := &PublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 *PublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesGetCall { - 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 *PublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesGetCall) Context(ctx context.Context) *PublicDelegatedPrefixesGetCall { - 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 *PublicDelegatedPrefixesGetCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesGetCall) 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 *PublicAdvertisedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.get" call. +// Do executes the "compute.publicAdvertisedPrefixes.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefix.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 *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { +// *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 *PublicAdvertisedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66678,7 +66295,7 @@ func (c *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*Publ if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicDelegatedPrefix{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66691,26 +66308,24 @@ func (c *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*Publ return ret, nil } -type PublicDelegatedPrefixesInsertCall struct { - s *Service - project string - region string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicAdvertisedPrefixesWithdrawCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a PublicDelegatedPrefix in the specified project in the -// given region using the parameters that are included in the request. +// Withdraw: Withdraws the specified PublicAdvertisedPrefix // -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Insert(project string, region string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesInsertCall { - c := &PublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicAdvertisedPrefix: The name of the public advertised prefix. It +// should comply with RFC1035. +func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesWithdrawCall { + c := &PublicAdvertisedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.publicdelegatedprefix = publicdelegatedprefix + c.publicAdvertisedPrefix = publicAdvertisedPrefix return c } @@ -66724,7 +66339,7 @@ func (r *PublicDelegatedPrefixesService) Insert(project string, region string, p // 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 *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicDelegatedPrefixesInsertCall { +func (c *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *PublicAdvertisedPrefixesWithdrawCall { c.urlParams_.Set("requestId", requestId) return c } @@ -66732,36 +66347,32 @@ func (c *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicD // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesInsertCall { +func (c *PublicAdvertisedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesWithdrawCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *PublicDelegatedPrefixesInsertCall { +func (c *PublicAdvertisedPrefixesWithdrawCall) Context(ctx context.Context) *PublicAdvertisedPrefixesWithdrawCall { 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 *PublicDelegatedPrefixesInsertCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesWithdrawCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *PublicAdvertisedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66769,18 +66380,18 @@ func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.insert" call. +// Do executes the "compute.publicAdvertisedPrefixes.withdraw" 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 *PublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicAdvertisedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66812,24 +66423,23 @@ func (c *PublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type PublicDelegatedPrefixesListCall struct { +type PublicDelegatedPrefixesAggregatedListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the PublicDelegatedPrefixes for a project in the given region. +// AggregatedList: Lists all PublicDelegatedPrefix resources owned by the +// specific project across all scopes. To prevent failure, Google recommends +// that you set the `returnPartialSuccess` parameter to `true`. // -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) List(project string, region string) *PublicDelegatedPrefixesListCall { - c := &PublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *PublicDelegatedPrefixesService) AggregatedList(project string) *PublicDelegatedPrefixesAggregatedListCall { + c := &PublicDelegatedPrefixesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -66865,17 +66475,30 @@ func (r *PublicDelegatedPrefixesService) List(project string, region string) *Pu // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *PublicDelegatedPrefixesListCall) Filter(filter string) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) Filter(filter string) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *PublicDelegatedPrefixesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -66888,237 +66511,96 @@ func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDe // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *PublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesListCall { - 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. -func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesListCall { - 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 *PublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesListCall) Context(ctx context.Context) *PublicDelegatedPrefixesListCall { - 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 *PublicDelegatedPrefixesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixList.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 *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, 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 := &PublicDelegatedPrefixList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// 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 *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) 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) - } + return c } -type PublicDelegatedPrefixesPatchCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *PublicDelegatedPrefixesAggregatedListCall) PageToken(pageToken string) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// Patch: Patches the specified PublicDelegatedPrefix resource with the data -// included in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// patch. -// - region: Name of the region for this request. -func (r *PublicDelegatedPrefixesService) Patch(project string, region string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesPatchCall { - c := &PublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - c.publicdelegatedprefix = publicdelegatedprefix +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *PublicDelegatedPrefixesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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. 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 *PublicDelegatedPrefixesPatchCall) RequestId(requestId string) *PublicDelegatedPrefixesPatchCall { - c.urlParams_.Set("requestId", requestId) +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *PublicDelegatedPrefixesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) 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 *PublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesPatchCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAggregatedListCall { 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 *PublicDelegatedPrefixesAggregatedListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *PublicDelegatedPrefixesPatchCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) Context(ctx context.Context) *PublicDelegatedPrefixesAggregatedListCall { 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 *PublicDelegatedPrefixesPatchCall) Header() http.Header { +func (c *PublicDelegatedPrefixesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) - if err != nil { - return nil, err +func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.patch" call. +// Do executes the "compute.publicDelegatedPrefixes.aggregatedList" 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 *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *PublicDelegatedPrefixAggregatedList.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 *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67137,7 +66619,7 @@ func (c *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &PublicDelegatedPrefixAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67150,7 +66632,28 @@ func (c *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type PublicDelegatedPrefixesWithdrawCall 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 *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixAggregatedList) 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 PublicDelegatedPrefixesAnnounceCall struct { s *Service project string region string @@ -67160,15 +66663,15 @@ type PublicDelegatedPrefixesWithdrawCall struct { header_ http.Header } -// Withdraw: Withdraws the specified PublicDelegatedPrefix in the given region. +// Announce: Announces the specified PublicDelegatedPrefix in the given region. // // - project: Project ID for this request. // - publicDelegatedPrefix: The name of the public delegated prefix. It should // comply with RFC1035. // - region: The name of the region where the public delegated prefix is // located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesWithdrawCall { - c := &PublicDelegatedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *PublicDelegatedPrefixesService) Announce(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesAnnounceCall { + c := &PublicDelegatedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.publicDelegatedPrefix = publicDelegatedPrefix @@ -67185,7 +66688,7 @@ func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, // 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 *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *PublicDelegatedPrefixesWithdrawCall { +func (c *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *PublicDelegatedPrefixesAnnounceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -67193,32 +66696,32 @@ func (c *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *Publi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesWithdrawCall { +func (c *PublicDelegatedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAnnounceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesWithdrawCall) Context(ctx context.Context) *PublicDelegatedPrefixesWithdrawCall { +func (c *PublicDelegatedPrefixesAnnounceCall) Context(ctx context.Context) *PublicDelegatedPrefixesAnnounceCall { 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 *PublicDelegatedPrefixesWithdrawCall) Header() http.Header { +func (c *PublicDelegatedPrefixesAnnounceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -67233,12 +66736,12 @@ func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.withdraw" call. +// Do executes the "compute.publicDelegatedPrefixes.announce" 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 *PublicDelegatedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesAnnounceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67270,26 +66773,27 @@ func (c *PublicDelegatedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type RegionAutoscalersDeleteCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesDeleteCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified PublicDelegatedPrefix in the given region. // -// - autoscaler: Name of the autoscaler to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { - c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to +// delete. +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) Delete(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesDeleteCall { + c := &PublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler + c.publicDelegatedPrefix = publicDelegatedPrefix return c } @@ -67303,7 +66807,7 @@ func (r *RegionAutoscalersService) Delete(project string, region string, autosca // 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 *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { +func (c *PublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *PublicDelegatedPrefixesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -67311,32 +66815,32 @@ func (c *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutosca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { +func (c *PublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { +func (c *PublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *PublicDelegatedPrefixesDeleteCall { 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 *RegionAutoscalersDeleteCall) Header() http.Header { +func (c *PublicDelegatedPrefixesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -67344,19 +66848,19 @@ func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.delete" call. +// Do executes the "compute.publicDelegatedPrefixes.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 *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67388,34 +66892,36 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type RegionAutoscalersGetCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesGetCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified autoscaler. +// Get: Returns the specified PublicDelegatedPrefix resource in the given +// region. // -// - autoscaler: Name of the autoscaler to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { - c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to +// return. +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) Get(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesGetCall { + c := &PublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler + c.publicDelegatedPrefix = publicDelegatedPrefix 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 *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { +func (c *PublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67423,27 +66929,27 @@ func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscale // 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 *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { +func (c *PublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { +func (c *PublicDelegatedPrefixesGetCall) Context(ctx context.Context) *PublicDelegatedPrefixesGetCall { 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 *RegionAutoscalersGetCall) Header() http.Header { +func (c *PublicDelegatedPrefixesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67451,7 +66957,7 @@ func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -67459,19 +66965,20 @@ func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.get" call. +// Do executes the "compute.publicDelegatedPrefixes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Autoscaler.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 *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { +// *PublicDelegatedPrefix.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 *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67490,7 +66997,7 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Autoscaler{ + ret := &PublicDelegatedPrefix{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67503,26 +67010,26 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler return ret, nil } -type RegionAutoscalersInsertCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesInsertCall struct { + s *Service + project string + region string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// Insert: Creates a PublicDelegatedPrefix in the specified project in the +// given region using the parameters that are included in the request. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { - c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) Insert(project string, region string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesInsertCall { + c := &PublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler + c.publicdelegatedprefix = publicdelegatedprefix return c } @@ -67536,7 +67043,7 @@ func (r *RegionAutoscalersService) Insert(project string, region string, autosca // 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 *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { +func (c *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicDelegatedPrefixesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -67544,36 +67051,36 @@ func (c *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutosca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { +func (c *PublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { +func (c *PublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *PublicDelegatedPrefixesInsertCall { 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 *RegionAutoscalersInsertCall) Header() http.Header { +func (c *PublicDelegatedPrefixesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -67587,12 +67094,12 @@ func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.insert" call. +// Do executes the "compute.publicDelegatedPrefixes.insert" 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 *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67624,7 +67131,7 @@ func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type RegionAutoscalersListCall struct { +type PublicDelegatedPrefixesListCall struct { s *Service project string region string @@ -67634,12 +67141,12 @@ type RegionAutoscalersListCall struct { header_ http.Header } -// List: Retrieves a list of autoscalers contained within the specified region. +// List: Lists the PublicDelegatedPrefixes for a project in the given region. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { - c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) List(project string, region string) *PublicDelegatedPrefixesListCall { + c := &PublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -67677,7 +67184,7 @@ func (r *RegionAutoscalersService) List(project string, region string) *RegionAu // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) Filter(filter string) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("filter", filter) return c } @@ -67687,7 +67194,7 @@ func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersList // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -67700,7 +67207,7 @@ func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscal // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -67708,7 +67215,7 @@ func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersLi // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -67718,7 +67225,7 @@ func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscale // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -67726,7 +67233,7 @@ func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67734,27 +67241,27 @@ func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscal // 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 *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) Context(ctx context.Context) *PublicDelegatedPrefixesListCall { 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 *RegionAutoscalersListCall) Header() http.Header { +func (c *PublicDelegatedPrefixesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67762,7 +67269,7 @@ func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -67776,13 +67283,13 @@ func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.list" call. +// Do executes the "compute.publicDelegatedPrefixes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionAutoscalerList.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 *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, error) { +// *PublicDelegatedPrefixList.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 *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67801,7 +67308,7 @@ func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAut if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionAutoscalerList{ + ret := &PublicDelegatedPrefixList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67817,7 +67324,7 @@ func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAut // 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 *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { +func (c *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -67835,34 +67342,31 @@ func (c *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAut } } -type RegionAutoscalersPatchCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesPatchCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// Patch: Patches the specified PublicDelegatedPrefix resource with the data +// included in the request. This method supports PATCH semantics and uses JSON +// merge patch format and processing rules. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { - c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to +// patch. +// - region: Name of the region for this request. +func (r *PublicDelegatedPrefixesService) Patch(project string, region string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesPatchCall { + c := &PublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to patch. -func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) + c.publicDelegatedPrefix = publicDelegatedPrefix + c.publicdelegatedprefix = publicdelegatedprefix return c } @@ -67876,7 +67380,7 @@ func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutosc // 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 *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { +func (c *PublicDelegatedPrefixesPatchCall) RequestId(requestId string) *PublicDelegatedPrefixesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -67884,36 +67388,36 @@ func (c *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { +func (c *PublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { +func (c *PublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *PublicDelegatedPrefixesPatchCall { 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 *RegionAutoscalersPatchCall) Header() http.Header { +func (c *PublicDelegatedPrefixesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -67921,18 +67425,19 @@ func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.patch" call. +// Do executes the "compute.publicDelegatedPrefixes.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 *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67964,144 +67469,28 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type RegionAutoscalersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { - c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - 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 *RegionAutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionAutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersTestIamPermissionsCall) Context(ctx context.Context) *RegionAutoscalersTestIamPermissionsCall { - 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 *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{resource}/testIamPermissions") - 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, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type RegionAutoscalersUpdateCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesWithdrawCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates an autoscaler in the specified project using the data -// included in the request. +// Withdraw: Withdraws the specified PublicDelegatedPrefix in the given region. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { - c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: The name of the public delegated prefix. It should +// comply with RFC1035. +// - region: The name of the region where the public delegated prefix is +// located. It should comply with RFC1035. +func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesWithdrawCall { + c := &PublicDelegatedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to update. -func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) + c.publicDelegatedPrefix = publicDelegatedPrefix return c } @@ -68115,7 +67504,7 @@ func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutos // 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 *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { +func (c *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *PublicDelegatedPrefixesWithdrawCall { c.urlParams_.Set("requestId", requestId) return c } @@ -68123,55 +67512,52 @@ func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutosca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { +func (c *PublicDelegatedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesWithdrawCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { +func (c *PublicDelegatedPrefixesWithdrawCall) Context(ctx context.Context) *PublicDelegatedPrefixesWithdrawCall { 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 *RegionAutoscalersUpdateCall) Header() http.Header { +func (c *PublicDelegatedPrefixesWithdrawCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw") 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.update" call. +// Do executes the "compute.publicDelegatedPrefixes.withdraw" 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 *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index 7c91f4311e7..e16b2fe10ba 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -16,6 +16,939 @@ import ( gensupport "google.golang.org/api/internal/gensupport" ) +type RegionAutoscalersDeleteCall struct { + s *Service + project string + region string + autoscaler string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified autoscaler. +// +// - autoscaler: Name of the autoscaler to delete. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { + c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.autoscaler = autoscaler + 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. 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 *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { + 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 *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { + 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 *RegionAutoscalersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "autoscaler": c.autoscaler, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionAutoscalers.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 *RegionAutoscalersDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionAutoscalersGetCall struct { + s *Service + project string + region string + autoscaler string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified autoscaler. +// +// - autoscaler: Name of the autoscaler to return. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { + c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.autoscaler = autoscaler + 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 *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { + 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 *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { + 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 *RegionAutoscalersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "autoscaler": c.autoscaler, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionAutoscalers.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Autoscaler.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 *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, 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 := &Autoscaler{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionAutoscalersInsertCall struct { + s *Service + project string + region string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates an autoscaler in the specified project using the data +// included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { + c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.autoscaler = autoscaler + 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. 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 *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { + 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 *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { + 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 *RegionAutoscalersInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + 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, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionAutoscalers.insert" 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 *RegionAutoscalersInsertCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionAutoscalersListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of autoscalers contained within the specified region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { + c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionAutoscalersListCall { + 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. +func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { + 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 *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { + 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 *RegionAutoscalersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionAutoscalers.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *RegionAutoscalerList.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 *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, 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 := &RegionAutoscalerList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) 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 RegionAutoscalersPatchCall struct { + s *Service + project string + region string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an autoscaler in the specified project using the data +// included in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { + c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.autoscaler = autoscaler + return c +} + +// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler +// to patch. +func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { + c.urlParams_.Set("autoscaler", autoscaler) + 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. 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 *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { + 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 *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { + 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 *RegionAutoscalersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionAutoscalers.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 *RegionAutoscalersPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionAutoscalersTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { + c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + 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 *RegionAutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionAutoscalersTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionAutoscalersTestIamPermissionsCall) Context(ctx context.Context) *RegionAutoscalersTestIamPermissionsCall { + 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 *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{resource}/testIamPermissions") + 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, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionAutoscalers.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionAutoscalersUpdateCall struct { + s *Service + project string + region string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates an autoscaler in the specified project using the data +// included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { + c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.autoscaler = autoscaler + return c +} + +// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler +// to update. +func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { + c.urlParams_.Set("autoscaler", autoscaler) + 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. 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 *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { + 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 *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { + 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 *RegionAutoscalersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionAutoscalers.update" 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 *RegionAutoscalersUpdateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type RegionBackendServicesDeleteCall struct { s *Service project string diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index eecc2788dc7..61ccfc4f168 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -37421,7 +37421,7 @@ } } }, - "revision": "20240526", + "revision": "20240604", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -38654,6 +38654,22 @@ "description": "Whether to enable UEFI networking for instance creation.", "type": "boolean" }, + "performanceMonitoringUnit": { + "description": "Type of Performance Monitoring Unit requested on instance.", + "enum": [ + "ARCHITECTURAL", + "ENHANCED", + "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED", + "STANDARD" + ], + "enumDescriptions": [ + "Architecturally defined non-LLC events.", + "Most documented core/L2 and LLC events.", + "", + "Most documented core/L2 events." + ], + "type": "string" + }, "threadsPerCore": { "description": "The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.", "format": "int32", @@ -42792,6 +42808,20 @@ "description": "A set of Confidential Instance options.", "id": "ConfidentialInstanceConfig", "properties": { + "confidentialInstanceType": { + "description": "Defines the type of technology used by the confidential instance.", + "enum": [ + "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED", + "SEV", + "SEV_SNP" + ], + "enumDescriptions": [ + "No type specified. Do not use this value.", + "AMD Secure Encrypted Virtualization.", + "AMD Secure Encrypted Virtualization - Secure Nested Paging." + ], + "type": "string" + }, "enableConfidentialCompute": { "description": "Defines whether the instance should have confidential compute enabled.", "type": "boolean" @@ -71161,6 +71191,10 @@ "description": "An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.", "type": "string" }, + "maxRunDuration": { + "$ref": "Duration", + "description": "Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration." + }, "minNodeCpus": { "description": "The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.", "format": "int32", @@ -71185,6 +71219,9 @@ ], "type": "string" }, + "onInstanceStopAction": { + "$ref": "SchedulingOnInstanceStopAction" + }, "preemptible": { "description": "Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.", "type": "boolean" @@ -71200,6 +71237,10 @@ "Standard provisioning with user controlled runtime, no discounts." ], "type": "string" + }, + "terminationTime": { + "description": "Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.", + "type": "string" } }, "type": "object" @@ -71236,6 +71277,17 @@ }, "type": "object" }, + "SchedulingOnInstanceStopAction": { + "description": "Defines the behaviour for instances with the instance_termination_action STOP.", + "id": "SchedulingOnInstanceStopAction", + "properties": { + "discardLocalSsd": { + "description": "If true, the contents of any attached Local SSD disks will be discarded else, the Local SSD data will be preserved when the instance is stopped at the end of the run duration/termination time.", + "type": "boolean" + } + }, + "type": "object" + }, "Screenshot": { "description": "An instance's screenshot.", "id": "Screenshot", @@ -83763,7 +83815,7 @@ "description": "Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true." }, "weight": { - "description": "Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000.", + "description": "Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. Don't configure session affinity if you're using weighted traffic splitting. If you do, the weighted traffic splitting configuration takes precedence. The value must be from 0 to 1000.", "format": "uint32", "type": "integer" } diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 2274778b3af..3998ee08ee4 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -2657,6 +2657,15 @@ type AdvancedMachineFeatures struct { // EnableUefiNetworking: Whether to enable UEFI networking for instance // creation. EnableUefiNetworking bool `json:"enableUefiNetworking,omitempty"` + // PerformanceMonitoringUnit: Type of Performance Monitoring Unit requested on + // instance. + // + // Possible values: + // "ARCHITECTURAL" - Architecturally defined non-LLC events. + // "ENHANCED" - Most documented core/L2 and LLC events. + // "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" + // "STANDARD" - Most documented core/L2 events. + PerformanceMonitoringUnit string `json:"performanceMonitoringUnit,omitempty"` // ThreadsPerCore: The number of threads per physical core. To disable // simultaneous multithreading (SMT) set this to 1. If unset, the maximum // number of threads supported per core by the underlying processor is assumed. @@ -7639,16 +7648,25 @@ func (s *Condition) MarshalJSON() ([]byte, error) { // ConfidentialInstanceConfig: A set of Confidential Instance options. type ConfidentialInstanceConfig struct { + // ConfidentialInstanceType: Defines the type of technology used by the + // confidential instance. + // + // Possible values: + // "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" - No type specified. Do not use + // this value. + // "SEV" - AMD Secure Encrypted Virtualization. + // "SEV_SNP" - AMD Secure Encrypted Virtualization - Secure Nested Paging. + ConfidentialInstanceType string `json:"confidentialInstanceType,omitempty"` // EnableConfidentialCompute: Defines whether the instance should have // confidential compute enabled. EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableConfidentialCompute") + // ForceSendFields is a list of field names (e.g. "ConfidentialInstanceType") // 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. "EnableConfidentialCompute") to + // NullFields is a list of field names (e.g. "ConfidentialInstanceType") 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. @@ -39156,6 +39174,10 @@ type Scheduling struct { // other resources. This field is for use by internal tools that use the public // API. LocationHint string `json:"locationHint,omitempty"` + // MaxRunDuration: Specifies the max run duration for the given instance. If + // specified, the instance termination action will be performed at the end of + // the run duration. + MaxRunDuration *Duration `json:"maxRunDuration,omitempty"` // MinNodeCpus: The minimum number of virtual CPUs this instance will consume // when running on a sole-tenant node. MinNodeCpus int64 `json:"minNodeCpus,omitempty"` @@ -39176,7 +39198,8 @@ type Scheduling struct { // instance to be restarted, set the automaticRestart flag to true. Your // instance may be restarted more than once, and it may be restarted outside // the window of maintenance events. - OnHostMaintenance string `json:"onHostMaintenance,omitempty"` + OnHostMaintenance string `json:"onHostMaintenance,omitempty"` + OnInstanceStopAction *SchedulingOnInstanceStopAction `json:"onInstanceStopAction,omitempty"` // Preemptible: Defines whether the instance is preemptible. This can only be // set during instance creation or while the instance is stopped and therefore, // in a `TERMINATED` state. See Instance Life Cycle for more information on the @@ -39189,6 +39212,10 @@ type Scheduling struct { // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. ProvisioningModel string `json:"provisioningModel,omitempty"` + // TerminationTime: Specifies the timestamp, when the instance will be + // terminated, in RFC3339 text format. If specified, the instance termination + // action will be performed at the termination time. + TerminationTime string `json:"terminationTime,omitempty"` // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -39240,6 +39267,31 @@ func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SchedulingOnInstanceStopAction: Defines the behaviour for instances with the +// instance_termination_action STOP. +type SchedulingOnInstanceStopAction struct { + // DiscardLocalSsd: If true, the contents of any attached Local SSD disks will + // be discarded else, the Local SSD data will be preserved when the instance is + // stopped at the end of the run duration/termination time. + DiscardLocalSsd bool `json:"discardLocalSsd,omitempty"` + // ForceSendFields is a list of field names (e.g. "DiscardLocalSsd") 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. "DiscardLocalSsd") 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 *SchedulingOnInstanceStopAction) MarshalJSON() ([]byte, error) { + type NoMethod SchedulingOnInstanceStopAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Screenshot: An instance's screenshot. type Screenshot struct { // Contents: [Output Only] The Base64-encoded screenshot data. @@ -53006,8 +53058,10 @@ type WeightedBackendService struct { // routeAction) . The selection of a backend service is determined only for new // traffic. Once a user's request has been directed to a backend service, // subsequent requests are sent to the same backend service as determined by - // the backend service's session affinity policy. The value must be from 0 to - // 1000. + // the backend service's session affinity policy. Don't configure session + // affinity if you're using weighted traffic splitting. If you do, the weighted + // traffic splitting configuration takes precedence. The value must be from 0 + // to 1000. Weight int64 `json:"weight,omitempty"` // ForceSendFields is a list of field names (e.g. "BackendService") to // unconditionally include in API requests. By default, fields with empty or diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 64d2cc04ca0..127d3843dad 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -2427,7 +2427,7 @@ } } }, - "revision": "20240529", + "revision": "20240606", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2755,6 +2755,10 @@ ], "type": "string" }, + "multipleSelectConfig": { + "$ref": "MultipleSelectConfig", + "description": "Optional. MultipleSelectConfig represents the multiple options for a config variable." + }, "required": { "description": "Flag represents that this `ConfigVariable` must be provided for a connection.", "type": "boolean" @@ -2795,7 +2799,8 @@ "SECRET", "ENUM", "AUTHORIZATION_CODE", - "ENCRYPTION_KEY" + "ENCRYPTION_KEY", + "MULTIPLE_SELECT" ], "enumDescriptions": [ "Value type is not specified.", @@ -2805,7 +2810,8 @@ "Value type is secret.", "Value type is enum.", "Value type is authorization code.", - "Encryption Key." + "Encryption Key.", + "Value type is multiple select." ], "type": "string" } @@ -5849,6 +5855,51 @@ }, "type": "object" }, + "MultipleSelectConfig": { + "description": "MultipleSelectConfig represents the multiple options for a config variable.", + "id": "MultipleSelectConfig", + "properties": { + "allowCustomValues": { + "description": "Optional. Allow custom values.", + "type": "boolean" + }, + "multipleSelectOptions": { + "description": "Required. Multiple select options.", + "items": { + "$ref": "MultipleSelectOption" + }, + "type": "array" + }, + "valueSeparator": { + "description": "Required. Value separator.", + "type": "string" + } + }, + "type": "object" + }, + "MultipleSelectOption": { + "description": "MultiplSelecteOption represents the single option for a config variable.", + "id": "MultipleSelectOption", + "properties": { + "description": { + "description": "Optional. Value of the option.", + "type": "string" + }, + "displayName": { + "description": "Required. Display name of the option.", + "type": "string" + }, + "key": { + "description": "Required. Key of the option.", + "type": "string" + }, + "preselected": { + "description": "Optional. Indicates if the option is preselected.", + "type": "boolean" + } + }, + "type": "object" + }, "NetworkConfig": { "description": "Regional Network Config.", "id": "NetworkConfig", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 4aa83961790..de232571579 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -773,6 +773,9 @@ type ConfigVariableTemplate struct { // "QUERY_PARAM" - Request query param. // "PATH_PARAM" - Request path param. LocationType string `json:"locationType,omitempty"` + // MultipleSelectConfig: Optional. MultipleSelectConfig represents the multiple + // options for a config variable. + MultipleSelectConfig *MultipleSelectConfig `json:"multipleSelectConfig,omitempty"` // Required: Flag represents that this `ConfigVariable` must be provided for a // connection. Required bool `json:"required,omitempty"` @@ -803,6 +806,7 @@ type ConfigVariableTemplate struct { // "ENUM" - Value type is enum. // "AUTHORIZATION_CODE" - Value type is authorization code. // "ENCRYPTION_KEY" - Encryption Key. + // "MULTIPLE_SELECT" - Value type is multiple select. ValueType string `json:"valueType,omitempty"` // ForceSendFields is a list of field names (e.g. "AuthorizationCodeLink") to // unconditionally include in API requests. By default, fields with empty or @@ -3611,6 +3615,62 @@ func (s *ManagedZone) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// MultipleSelectConfig: MultipleSelectConfig represents the multiple options +// for a config variable. +type MultipleSelectConfig struct { + // AllowCustomValues: Optional. Allow custom values. + AllowCustomValues bool `json:"allowCustomValues,omitempty"` + // MultipleSelectOptions: Required. Multiple select options. + MultipleSelectOptions []*MultipleSelectOption `json:"multipleSelectOptions,omitempty"` + // ValueSeparator: Required. Value separator. + ValueSeparator string `json:"valueSeparator,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowCustomValues") 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. "AllowCustomValues") 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 *MultipleSelectConfig) MarshalJSON() ([]byte, error) { + type NoMethod MultipleSelectConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// MultipleSelectOption: MultiplSelecteOption represents the single option for +// a config variable. +type MultipleSelectOption struct { + // Description: Optional. Value of the option. + Description string `json:"description,omitempty"` + // DisplayName: Required. Display name of the option. + DisplayName string `json:"displayName,omitempty"` + // Key: Required. Key of the option. + Key string `json:"key,omitempty"` + // Preselected: Optional. Indicates if the option is preselected. + Preselected bool `json:"preselected,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *MultipleSelectOption) MarshalJSON() ([]byte, error) { + type NoMethod MultipleSelectOption + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // NetworkConfig: Regional Network Config. type NetworkConfig struct { // EgressIps: Output only. Egress IPs diff --git a/connectors/v2/connectors-api.json b/connectors/v2/connectors-api.json index d345a311bfb..abfc5629dd9 100644 --- a/connectors/v2/connectors-api.json +++ b/connectors/v2/connectors-api.json @@ -672,34 +672,17 @@ "location": "query", "type": "string" }, - "pageSize": { - "description": "Number of entity rows to return. Defaults page size = 25. Max page size = 200.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Page token value if available from a previous request.", - "location": "query", - "type": "string" - }, "parent": { "description": "Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/entityTypes/[^/]+$", "required": true, "type": "string" - }, - "sortBy": { - "description": "List of 'sort_by' columns to use when returning the results.", - "location": "query", - "repeated": true, - "type": "string" } }, "path": "v2/{+parent}/entitieswithacls", "response": { - "$ref": "ListEntitiesWithACLsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -716,7 +699,7 @@ } } }, - "revision": "20240529", + "revision": "20240606", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AccessCredentials": { @@ -739,20 +722,6 @@ }, "type": "object" }, - "AclInfo": { - "description": "AclInfo has a list of readers for a resource. This is defined as per the below docs https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches.documents#aclinfo", - "id": "AclInfo", - "properties": { - "readers": { - "description": "A list of readers for a resource.", - "items": { - "$ref": "Readers" - }, - "type": "array" - } - }, - "type": "object" - }, "Action": { "description": "Action message contains metadata information about a single action present in the external system.", "id": "Action", @@ -957,25 +926,6 @@ }, "type": "object" }, - "EntityWithACL": { - "description": "EntityWithACL refers to a single row of an entity type with ACL information.", - "id": "EntityWithACL", - "properties": { - "acl_info": { - "$ref": "AclInfo", - "description": "ACL information of the entity." - }, - "id": { - "readOnly": true, - "type": "string" - }, - "jsonData": { - "description": "Entity data in JSON format.", - "type": "string" - } - }, - "type": "object" - }, "ExchangeAuthCodeRequest": { "description": "ExchangeAuthCodeRequest currently includes no fields.", "id": "ExchangeAuthCodeRequest", @@ -1792,24 +1742,6 @@ }, "type": "object" }, - "ListEntitiesWithACLsResponse": { - "description": "Response message for EntityService.ListEntitiesWithACLs", - "id": "ListEntitiesWithACLsResponse", - "properties": { - "entitiesWithAcl": { - "description": "List containing entity rows.", - "items": { - "$ref": "EntityWithACL" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Next page token if more records are available.", - "type": "string" - } - }, - "type": "object" - }, "ListEntityTypesResponse": { "description": "Response message for EntityService.ListEntityTypes", "id": "ListEntityTypesResponse", @@ -1986,6 +1918,41 @@ }, "type": "object" }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, "PerSliSloEligibility": { "description": "PerSliSloEligibility is a mapping from an SLI name to eligibility.", "id": "PerSliSloEligibility", @@ -2000,21 +1967,6 @@ }, "type": "object" }, - "Principal": { - "description": "Principal is a user or group that has access to a resource.", - "id": "Principal", - "properties": { - "group_id": { - "description": "The group that has access to a resource.", - "type": "string" - }, - "user_id": { - "description": "The user that has access to a resource.", - "type": "string" - } - }, - "type": "object" - }, "ProvisionedResource": { "description": "Describes provisioned dataplane resources.", "id": "ProvisionedResource", @@ -2212,20 +2164,6 @@ }, "type": "object" }, - "Readers": { - "description": "Readers is a list of principals that have read access to a resource.", - "id": "Readers", - "properties": { - "principals": { - "description": "A list of principals that have read access to a resource.", - "items": { - "$ref": "Principal" - }, - "type": "array" - } - }, - "type": "object" - }, "Reference": { "id": "Reference", "properties": { @@ -2497,6 +2435,33 @@ }, "type": "object" }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, "TimeOfDay": { "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", "id": "TimeOfDay", diff --git a/connectors/v2/connectors-gen.go b/connectors/v2/connectors-gen.go index 063556e3d86..8ca2eea8fd8 100644 --- a/connectors/v2/connectors-gen.go +++ b/connectors/v2/connectors-gen.go @@ -262,30 +262,6 @@ func (s *AccessCredentials) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// AclInfo: AclInfo has a list of readers for a resource. This is defined as -// per the below docs -// https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches.documents#aclinfo -type AclInfo struct { - // Readers: A list of readers for a resource. - Readers []*Readers `json:"readers,omitempty"` - // ForceSendFields is a list of field names (e.g. "Readers") 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. "Readers") 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 *AclInfo) MarshalJSON() ([]byte, error) { - type NoMethod AclInfo - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // Action: Action message contains metadata information about a single action // present in the external system. type Action struct { @@ -565,32 +541,6 @@ func (s *EntityType) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// EntityWithACL: EntityWithACL refers to a single row of an entity type with -// ACL information. -type EntityWithACL struct { - // AclInfo: ACL information of the entity. - AclInfo *AclInfo `json:"acl_info,omitempty"` - Id string `json:"id,omitempty"` - // JsonData: Entity data in JSON format. - JsonData string `json:"jsonData,omitempty"` - // ForceSendFields is a list of field names (e.g. "AclInfo") 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. "AclInfo") 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 *EntityWithACL) MarshalJSON() ([]byte, error) { - type NoMethod EntityWithACL - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // ExchangeAuthCodeRequest: ExchangeAuthCodeRequest currently includes no // fields. type ExchangeAuthCodeRequest struct { @@ -1176,34 +1126,6 @@ func (s *ListEntitiesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ListEntitiesWithACLsResponse: Response message for -// EntityService.ListEntitiesWithACLs -type ListEntitiesWithACLsResponse struct { - // EntitiesWithAcl: List containing entity rows. - EntitiesWithAcl []*EntityWithACL `json:"entitiesWithAcl,omitempty"` - // NextPageToken: Next page token if more records are available. - 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. "EntitiesWithAcl") 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. "EntitiesWithAcl") 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 *ListEntitiesWithACLsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListEntitiesWithACLsResponse - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // ListEntityTypesResponse: Response message for EntityService.ListEntityTypes type ListEntityTypesResponse struct { // NextPageToken: Next page token if more entity types available. @@ -1435,6 +1357,53 @@ func (s *NotificationParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *Status `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // PerSliSloEligibility: PerSliSloEligibility is a mapping from an SLI name to // eligibility. type PerSliSloEligibility struct { @@ -1469,30 +1438,6 @@ func (s *PerSliSloEligibility) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Principal: Principal is a user or group that has access to a resource. -type Principal struct { - // GroupId: The group that has access to a resource. - GroupId string `json:"group_id,omitempty"` - // UserId: The user that has access to a resource. - UserId string `json:"user_id,omitempty"` - // ForceSendFields is a list of field names (e.g. "GroupId") 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. "GroupId") 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 *Principal) MarshalJSON() ([]byte, error) { - type NoMethod Principal - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // ProvisionedResource: Describes provisioned dataplane resources. type ProvisionedResource struct { // ResourceType: Type of the resource. This can be either a GCP resource or a @@ -1624,29 +1569,6 @@ func (s *QueryParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Readers: Readers is a list of principals that have read access to a -// resource. -type Readers struct { - // Principals: A list of principals that have read access to a resource. - Principals []*Principal `json:"principals,omitempty"` - // ForceSendFields is a list of field names (e.g. "Principals") 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. "Principals") 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 *Readers) MarshalJSON() ([]byte, error) { - type NoMethod Readers - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - type Reference struct { // Name: Name of the reference field. Name string `json:"name,omitempty"` @@ -1874,6 +1796,40 @@ func (s *SloMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// Status: The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by gRPC (https://github.com/grpc). Each `Status` message contains three +// pieces of data: error code, error message, and error details. You can find +// out more about this error model and how to work with it in the API Design +// Guide (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // TimeOfDay: Represents a time of day. The date and time zone are either not // significant or are specified elsewhere. An API may choose to allow leap // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. @@ -4048,27 +4004,6 @@ func (c *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) Gsutil return c } -// PageSize sets the optional parameter "pageSize": Number of entity rows to -// return. Defaults page size = 25. Max page size = 200. -func (c *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token value if -// available from a previous request. -func (c *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// SortBy sets the optional parameter "sortBy": List of 'sort_by' columns to -// use when returning the results. -func (c *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) SortBy(sortBy ...string) *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall { - c.urlParams_.SetMulti("sortBy", append([]string{}, sortBy...)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -4123,11 +4058,10 @@ func (c *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) doRequ // Do executes the "connectors.projects.locations.connections.entityTypes.entitieswithacls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListEntitiesWithACLsResponse.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 *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) Do(opts ...googleapi.CallOption) (*ListEntitiesWithACLsResponse, error) { +// *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 *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4146,7 +4080,7 @@ func (c *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListEntitiesWithACLsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4158,24 +4092,3 @@ func (c *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) Do(opt } 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 *ProjectsLocationsConnectionsEntityTypesEntitieswithaclsListCall) Pages(ctx context.Context, f func(*ListEntitiesWithACLsResponse) 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) - } -} diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json index 6043ee9513e..5fe536cea2b 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json @@ -512,7 +512,7 @@ } } }, - "revision": "20240528", + "revision": "20240607", "rootUrl": "https://contactcenteraiplatform.googleapis.com/", "schemas": { "AdminUser": { @@ -544,10 +544,10 @@ "description": "Name of the component.", "type": "string" }, - "serviceAttachments": { - "description": "Associated service attachments.", + "serviceAttachmentNames": { + "description": "Associated service attachments. The service attachment names that will be used for sending private traffic to the CCAIP tenant project. Example service attachment name: \"projects/${TENANT_PROJECT_ID}/regions/${REGION}/serviceAttachments/ingress-default\".", "items": { - "$ref": "ServiceAttachment" + "type": "string" }, "type": "array" } @@ -1016,6 +1016,24 @@ "$ref": "Component" }, "type": "array" + }, + "pscSetting": { + "$ref": "PscSetting", + "description": "Private service connect settings." + } + }, + "type": "object" + }, + "PscSetting": { + "description": "Private service connect settings.", + "id": "PscSetting", + "properties": { + "allowedConsumerProjectIds": { + "description": "The list of project ids that are allowed to send traffic to the service attachment. This field should be filled only for the ingress components.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -1162,24 +1180,6 @@ }, "type": "object" }, - "ServiceAttachment": { - "description": "Container for the VPC-SC networking configurations.", - "id": "ServiceAttachment", - "properties": { - "allowedProjectIds": { - "description": "The list of project ids that are allowed to send traffic to the service attachment. This field should be filled only for the ingress service attachments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The service attachment name that will be used for sending private traffic to the CCAIP tenant project. Example: \"projects/${TENANT_PROJECT_ID}/regions/${REGION}/serviceAttachments/ingress-default\".", - "type": "string" - } - }, - "type": "object" - }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go index ba8b3734e2b..cb3fd6391e6 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go @@ -233,8 +233,12 @@ type CancelOperationRequest struct { type Component struct { // Name: Name of the component. Name string `json:"name,omitempty"` - // ServiceAttachments: Associated service attachments. - ServiceAttachments []*ServiceAttachment `json:"serviceAttachments,omitempty"` + // ServiceAttachmentNames: Associated service attachments. The service + // attachment names that will be used for sending private traffic to the CCAIP + // tenant project. Example service attachment name: + // "projects/${TENANT_PROJECT_ID}/regions/${REGION}/serviceAttachments/ingress-d + // efault". + ServiceAttachmentNames []string `json:"serviceAttachmentNames,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 @@ -716,6 +720,8 @@ type PrivateAccess struct { // IngressSettings: List of ingress components that should not be accessed via // the Internet. For more information see go/ccaip-private-path-v2. IngressSettings []*Component `json:"ingressSettings,omitempty"` + // PscSetting: Private service connect settings. + PscSetting *PscSetting `json:"pscSetting,omitempty"` // ForceSendFields is a list of field names (e.g. "EgressSettings") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -734,6 +740,30 @@ func (s *PrivateAccess) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// PscSetting: Private service connect settings. +type PscSetting struct { + // AllowedConsumerProjectIds: The list of project ids that are allowed to send + // traffic to the service attachment. This field should be filled only for the + // ingress components. + AllowedConsumerProjectIds []string `json:"allowedConsumerProjectIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedConsumerProjectIds") + // 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. "AllowedConsumerProjectIds") 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 *PscSetting) MarshalJSON() ([]byte, error) { + type NoMethod PscSetting + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Quota: Quota details. type Quota struct { // ContactCenterCountLimit: Reflects the count limit of contact centers on a @@ -897,35 +927,6 @@ func (s *SAMLParams) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ServiceAttachment: Container for the VPC-SC networking configurations. -type ServiceAttachment struct { - // AllowedProjectIds: The list of project ids that are allowed to send traffic - // to the service attachment. This field should be filled only for the ingress - // service attachments. - AllowedProjectIds []string `json:"allowedProjectIds,omitempty"` - // Name: The service attachment name that will be used for sending private - // traffic to the CCAIP tenant project. Example: - // "projects/${TENANT_PROJECT_ID}/regions/${REGION}/serviceAttachments/ingress-d - // efault". - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedProjectIds") 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. "AllowedProjectIds") 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 *ServiceAttachment) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachment - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // Status: The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is // used by gRPC (https://github.com/grpc). Each `Status` message contains three diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 26d7b798d7e..09e488c1392 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -1474,131 +1474,9 @@ } } }, - "revision": "20240520", + "revision": "20240610", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { - "GoogleCloudContactcenterinsightsV1AgentCoachingInstruction": { - "description": "Agent Coaching instructions that customer can configure.", - "id": "GoogleCloudContactcenterinsightsV1AgentCoachingInstruction", - "properties": { - "agentAction": { - "description": "Optional. The action that human agent should take. For example, \"apologize for the slow shipping\". If the users only want to use agent coaching for intent detection, agent_action can be empty", - "type": "string" - }, - "condition": { - "description": "Optional. The condition of the instruction. For example, \"the customer wants to cancel an order\". If the users want the instruction to be triggered unconditionally, the condition can be empty.", - "type": "string" - }, - "description": { - "description": "Optional. The detailed description of this instruction.", - "type": "string" - }, - "displayName": { - "description": "Optional. Display name for the instruction.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Additional information attached to this instruction.", - "type": "object" - }, - "systemAction": { - "description": "Optional. The action that system should take. For example, \"call GetOrderTime with order_number={order number provided by the customer}\". If the users don't have plugins or don't want to trigger plugins, the system_action can be empty", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion": { - "description": "Suggestion for coaching agents.", - "id": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion", - "properties": { - "agentActionSuggestions": { - "description": "Optional. Suggested actions for the agent to take.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestion" - }, - "type": "array" - }, - "applicableInstructions": { - "description": "Optional. Instructions applicable based on the current context.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1AgentCoachingInstruction" - }, - "type": "array" - }, - "sampleResponses": { - "description": "Optional. Sample response for the Agent.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse" - }, - "type": "array" - }, - "suggestionEval": { - "$ref": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionEval", - "description": "Self evaluation of the suggestion." - }, - "suggestionReasoning": { - "$ref": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionReasoning", - "description": "Reasoning for the suggestion." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestion": { - "description": "Actions suggested for the agent. This is based on applicable instructions.", - "id": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestion", - "properties": { - "agentAction": { - "description": "Optional. The suggested action for the agent.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionEval": { - "description": "Self evaluations of the suggestion.", - "id": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionEval", - "properties": { - "actionActionSuggestionEval": { - "description": "Optional. Eval for Agent action suggestion.", - "type": "string" - }, - "sampleResponseEval": { - "description": "Optional. Eval for sample response.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionReasoning": { - "description": "Reasoning for the suggestion.", - "id": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionReasoning", - "properties": { - "agentActionTaken": { - "description": "Optional. The actions that the agent has taken already.", - "type": "string" - }, - "issueSummary": { - "description": "Optional. Summary of the issue.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse": { - "description": "Sample response that the agent can use. This could be based on applicable instructions and ingested data from other systems.", - "id": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse", - "properties": { - "responseText": { - "description": "Optional. Sample response for Agent in text.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1Analysis": { "description": "The analysis resource.", "id": "GoogleCloudContactcenterinsightsV1Analysis", @@ -3049,24 +2927,6 @@ }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1FreeFormSuggestion": { - "description": "Suggestion generated using free form generator.", - "id": "GoogleCloudContactcenterinsightsV1FreeFormSuggestion", - "properties": { - "labels": { - "description": "Optional. Labels for the generator.", - "items": { - "type": "string" - }, - "type": "array" - }, - "response": { - "description": "Required. Free form suggestion.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1GcsSource": { "description": "A Cloud Storage source of conversation data.", "id": "GoogleCloudContactcenterinsightsV1GcsSource", @@ -3082,162 +2942,6 @@ }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1GeneratorSuggestion": { - "description": "Suggestion generated using a Generator.", - "id": "GoogleCloudContactcenterinsightsV1GeneratorSuggestion", - "properties": { - "agentCoachingSuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion", - "description": "Optional. Suggestion to coach the agent." - }, - "freeFormSuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1FreeFormSuggestion", - "description": "Optional. Free form suggestion." - }, - "summarySuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1SummarySuggestion", - "description": "Optional. Suggested summary." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse": { - "description": "Represents response from generators.", - "id": "GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse", - "properties": { - "generatorSuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1GeneratorSuggestion", - "description": "The suggestion generated from the Generator." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse": { - "description": "Response for Knowledge Assist. Contains suggested query and optionally includes an answer for the query.", - "id": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse", - "properties": { - "suggestedQuery": { - "$ref": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery", - "description": "The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion." - }, - "suggestedQueryAnswer": { - "$ref": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer", - "description": "The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer": { - "description": "Represents an answer from Knowledge. Cuurently supports FAQ and Generative answers.", - "id": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer", - "properties": { - "answerText": { - "description": "The piece of text from the `source` that answers this suggested query.", - "type": "string" - }, - "faqSource": { - "$ref": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource", - "description": "Populated if the prediction came from FAQ." - }, - "generativeSource": { - "$ref": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource", - "description": "Populated if the prediction was Generative." - }, - "intentMatchingSource": { - "$ref": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource", - "description": "Populated if the prediction was from intent matching." - }, - "matchConfidence": { - "description": "The system's confidence score that this answer is a good match for this conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource": { - "description": "Details about source of FAQ answer.", - "id": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource", - "properties": { - "document": { - "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//knowledgeBases//documents/`.", - "type": "string" - }, - "question": { - "description": "The corresponding FAQ question.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource": { - "description": "Details about source of Generative answer.", - "id": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource", - "properties": { - "snippets": { - "description": "All snippets used for this Generative Prediction, with their source URI and data.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet": { - "description": "Snippet Source for a Generative Prediction.", - "id": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet", - "properties": { - "document": { - "description": "Indicates which Knowledge Document this snippet was extracted from. Format: `projects//knowledgeBases//documents/`.", - "type": "string" - }, - "text": { - "description": "text taken from that URI.", - "type": "string" - }, - "title": { - "description": "Title of the document.", - "type": "string" - }, - "uri": { - "description": "URI the data is sourced from.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource": { - "description": "Details about source of Intent Matching answer.", - "id": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource", - "properties": { - "title": { - "description": "Title of the document.", - "type": "string" - }, - "uri": { - "description": "URI the data is sourced from.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery": { - "description": "Represents a suggested query.", - "id": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery", - "properties": { - "queryText": { - "description": "Suggested query text.", - "type": "string" - }, - "score": { - "description": "Suggested query score.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1HoldData": { "description": "The data for a hold annotation.", "id": "GoogleCloudContactcenterinsightsV1HoldData", @@ -4072,18 +3776,6 @@ "$ref": "GoogleCloudContactcenterinsightsV1FaqAnswerData", "description": "Agent Assist FAQ answer data." }, - "generatorSuggestionResult": { - "$ref": "GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse", - "description": "The generator suggestion result." - }, - "knowledgeAssistResult": { - "$ref": "GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse", - "description": "The Knowledge Assist result." - }, - "knowledgeSearchResult": { - "$ref": "GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer", - "description": "The Knowledge Search result." - }, "smartComposeSuggestion": { "$ref": "GoogleCloudContactcenterinsightsV1SmartComposeSuggestionData", "description": "Agent Assist Smart Compose suggestion data." @@ -4095,71 +3787,24 @@ "startBoundary": { "$ref": "GoogleCloudContactcenterinsightsV1AnnotationBoundary", "description": "The boundary in the conversation where the annotation starts, inclusive." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer": { - "description": "Represents a SearchKnowledge answer.", - "id": "GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer", - "properties": { - "answer": { - "description": "The piece of text from the knowledge base documents that answers the search query", - "type": "string" - }, - "answerRecord": { - "description": "The name of the answer record. Format: `projects//locations//answer Records/`", - "type": "string" - }, - "answerSources": { - "description": "All sources used to generate the answer.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource" - }, - "type": "array" - }, - "answerType": { - "description": "The type of the answer.", - "enum": [ - "ANSWER_TYPE_UNSPECIFIED", - "FAQ", - "GENERATIVE", - "INTENT" - ], - "enumDescriptions": [ - "The answer has a unspecified type.", - "The answer is from FAQ documents.", - "The answer is from generative model.", - "The answer is from intent matching." - ], - "type": "string" }, - "confidenceScore": { - "description": "The confidence score in [0.0, 1.0] range.", - "format": "float", - "type": "number" + "userInput": { + "$ref": "GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput", + "description": "Explicit input used for generating the answer" } }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource": { - "description": "The sources of the answers.", - "id": "GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource", + "GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput": { + "description": "Explicit input used for generating the answer", + "id": "GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput", "properties": { - "document": { - "description": "The document from which the snippet was extracted. Format: `projects//knowledgeBases//documents/`", + "generatorName": { + "description": "The resource name of associated generator. Format: `projects//locations//generators/`", "type": "string" }, - "snippet": { - "description": "The relevant snippet of the article.", - "type": "string" - }, - "title": { - "description": "The title of the article.", - "type": "string" - }, - "uri": { - "description": "The URI of the article.", + "query": { + "description": "Query text. Article Search uses this to store the input query used to generate the search results.", "type": "string" } }, @@ -4325,35 +3970,6 @@ }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1SummarySuggestion": { - "description": "Suggested summary of the conversation.", - "id": "GoogleCloudContactcenterinsightsV1SummarySuggestion", - "properties": { - "summarySections": { - "description": "Required. All the parts of generated summary.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection": { - "description": "A component of the generated summary.", - "id": "GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection", - "properties": { - "section": { - "description": "Required. Name of the section.", - "type": "string" - }, - "summary": { - "description": "Required. Summary text for the section.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata": { "description": "Metadata for undeploying an issue model.", "id": "GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata", @@ -4486,128 +4102,6 @@ }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction": { - "description": "Agent Coaching instructions that customer can configure.", - "id": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction", - "properties": { - "agentAction": { - "description": "Optional. The action that human agent should take. For example, \"apologize for the slow shipping\". If the users only want to use agent coaching for intent detection, agent_action can be empty", - "type": "string" - }, - "condition": { - "description": "Optional. The condition of the instruction. For example, \"the customer wants to cancel an order\". If the users want the instruction to be triggered unconditionally, the condition can be empty.", - "type": "string" - }, - "description": { - "description": "Optional. The detailed description of this instruction.", - "type": "string" - }, - "displayName": { - "description": "Optional. Display name for the instruction.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Additional information attached to this instruction.", - "type": "object" - }, - "systemAction": { - "description": "Optional. The action that system should take. For example, \"call GetOrderTime with order_number={order number provided by the customer}\". If the users don't have plugins or don't want to trigger plugins, the system_action can be empty", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion": { - "description": "Suggestion for coaching agents.", - "id": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion", - "properties": { - "agentActionSuggestions": { - "description": "Optional. Suggested actions for the agent to take.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSuggestion" - }, - "type": "array" - }, - "applicableInstructions": { - "description": "Optional. Instructions applicable based on the current context.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction" - }, - "type": "array" - }, - "sampleResponses": { - "description": "Optional. Sample response for the Agent.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse" - }, - "type": "array" - }, - "suggestionEval": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionEval", - "description": "Self evaluation of the suggestion." - }, - "suggestionReasoning": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionReasoning", - "description": "Reasoning for the suggestion." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSuggestion": { - "description": "Actions suggested for the agent. This is based on applicable instructions.", - "id": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSuggestion", - "properties": { - "agentAction": { - "description": "Optional. The suggested action for the agent.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionEval": { - "description": "Self evaluations of the suggestion.", - "id": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionEval", - "properties": { - "actionActionSuggestionEval": { - "description": "Optional. Eval for Agent action suggestion.", - "type": "string" - }, - "sampleResponseEval": { - "description": "Optional. Eval for sample response.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionReasoning": { - "description": "Reasoning for the suggestion.", - "id": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionReasoning", - "properties": { - "agentActionTaken": { - "description": "Optional. The actions that the agent has taken already.", - "type": "string" - }, - "issueSummary": { - "description": "Optional. Summary of the issue.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse": { - "description": "Sample response that the agent can use. This could be based on applicable instructions and ingested data from other systems.", - "id": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse", - "properties": { - "responseText": { - "description": "Optional. Sample response for Agent in text.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1alpha1Analysis": { "description": "The analysis resource.", "id": "GoogleCloudContactcenterinsightsV1alpha1Analysis", @@ -5942,24 +5436,6 @@ }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion": { - "description": "Suggestion generated using free form generator.", - "id": "GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion", - "properties": { - "labels": { - "description": "Optional. Labels for the generator.", - "items": { - "type": "string" - }, - "type": "array" - }, - "response": { - "description": "Required. Free form suggestion.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1alpha1GcsSource": { "description": "A Cloud Storage source of conversation data.", "id": "GoogleCloudContactcenterinsightsV1alpha1GcsSource", @@ -5975,162 +5451,6 @@ }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion": { - "description": "Suggestion generated using a Generator.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion", - "properties": { - "agentCoachingSuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion", - "description": "Optional. Suggestion to coach the agent." - }, - "freeFormSuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion", - "description": "Optional. Free form suggestion." - }, - "summarySuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion", - "description": "Optional. Suggested summary." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse": { - "description": "Represents response from generators.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse", - "properties": { - "generatorSuggestion": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion", - "description": "The suggestion generated from the Generator." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse": { - "description": "Response for Knowledge Assist. Contains suggested query and optionally includes an answer for the query.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse", - "properties": { - "suggestedQuery": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery", - "description": "The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion." - }, - "suggestedQueryAnswer": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer", - "description": "The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer": { - "description": "Represents an answer from Knowledge. Cuurently supports FAQ and Generative answers.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer", - "properties": { - "answerText": { - "description": "The piece of text from the `source` that answers this suggested query.", - "type": "string" - }, - "faqSource": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource", - "description": "Populated if the prediction came from FAQ." - }, - "generativeSource": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource", - "description": "Populated if the prediction was Generative." - }, - "intentMatchingSource": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource", - "description": "Populated if the prediction was from intent matching." - }, - "matchConfidence": { - "description": "The system's confidence score that this answer is a good match for this conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource": { - "description": "Details about source of FAQ answer.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource", - "properties": { - "document": { - "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//knowledgeBases//documents/`.", - "type": "string" - }, - "question": { - "description": "The corresponding FAQ question.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource": { - "description": "Details about source of Generative answer.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource", - "properties": { - "snippets": { - "description": "All snippets used for this Generative Prediction, with their source URI and data.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet": { - "description": "Snippet Source for a Generative Prediction.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet", - "properties": { - "document": { - "description": "Indicates which Knowledge Document this snippet was extracted from. Format: `projects//knowledgeBases//documents/`.", - "type": "string" - }, - "text": { - "description": "text taken from that URI.", - "type": "string" - }, - "title": { - "description": "Title of the document.", - "type": "string" - }, - "uri": { - "description": "URI the data is sourced from.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource": { - "description": "Details about source of Intent Matching answer.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource", - "properties": { - "title": { - "description": "Title of the document.", - "type": "string" - }, - "uri": { - "description": "URI the data is sourced from.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery": { - "description": "Represents a suggested query.", - "id": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery", - "properties": { - "queryText": { - "description": "Suggested query text.", - "type": "string" - }, - "score": { - "description": "Suggested query score.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1alpha1HoldData": { "description": "The data for a hold annotation.", "id": "GoogleCloudContactcenterinsightsV1alpha1HoldData", @@ -6687,18 +6007,6 @@ "$ref": "GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData", "description": "Agent Assist FAQ answer data." }, - "generatorSuggestionResult": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse", - "description": "The generator suggestion result." - }, - "knowledgeAssistResult": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse", - "description": "The Knowledge Assist result." - }, - "knowledgeSearchResult": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer", - "description": "The Knowledge Search result." - }, "smartComposeSuggestion": { "$ref": "GoogleCloudContactcenterinsightsV1alpha1SmartComposeSuggestionData", "description": "Agent Assist Smart Compose suggestion data." @@ -6710,71 +6018,24 @@ "startBoundary": { "$ref": "GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary", "description": "The boundary in the conversation where the annotation starts, inclusive." - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer": { - "description": "Represents a SearchKnowledge answer.", - "id": "GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer", - "properties": { - "answer": { - "description": "The piece of text from the knowledge base documents that answers the search query", - "type": "string" - }, - "answerRecord": { - "description": "The name of the answer record. Format: `projects//locations//answer Records/`", - "type": "string" - }, - "answerSources": { - "description": "All sources used to generate the answer.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource" - }, - "type": "array" - }, - "answerType": { - "description": "The type of the answer.", - "enum": [ - "ANSWER_TYPE_UNSPECIFIED", - "FAQ", - "GENERATIVE", - "INTENT" - ], - "enumDescriptions": [ - "The answer has a unspecified type.", - "The answer is from FAQ documents.", - "The answer is from generative model.", - "The answer is from intent matching." - ], - "type": "string" }, - "confidenceScore": { - "description": "The confidence score in [0.0, 1.0] range.", - "format": "float", - "type": "number" + "userInput": { + "$ref": "GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput", + "description": "Explicit input used for generating the answer" } }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource": { - "description": "The sources of the answers.", - "id": "GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource", + "GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput": { + "description": "Explicit input used for generating the answer", + "id": "GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput", "properties": { - "document": { - "description": "The document from which the snippet was extracted. Format: `projects//knowledgeBases//documents/`", + "generatorName": { + "description": "The resource name of associated generator. Format: `projects//locations//generators/`", "type": "string" }, - "snippet": { - "description": "The relevant snippet of the article.", - "type": "string" - }, - "title": { - "description": "The title of the article.", - "type": "string" - }, - "uri": { - "description": "The URI of the article.", + "query": { + "description": "Query text. Article Search uses this to store the input query used to generate the search results.", "type": "string" } }, @@ -6868,35 +6129,6 @@ }, "type": "object" }, - "GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion": { - "description": "Suggested summary of the conversation.", - "id": "GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion", - "properties": { - "summarySections": { - "description": "Required. All the parts of generated summary.", - "items": { - "$ref": "GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection": { - "description": "A component of the generated summary.", - "id": "GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection", - "properties": { - "section": { - "description": "Required. Name of the section.", - "type": "string" - }, - "summary": { - "description": "Required. Summary text for the section.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata": { "description": "Metadata for undeploying an issue model.", "id": "GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata", diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 8f1e4b2240e..cfe6cd14ef5 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -271,176 +271,6 @@ type ProjectsLocationsViewsService struct { s *Service } -// GoogleCloudContactcenterinsightsV1AgentCoachingInstruction: Agent Coaching -// instructions that customer can configure. -type GoogleCloudContactcenterinsightsV1AgentCoachingInstruction struct { - // AgentAction: Optional. The action that human agent should take. For example, - // "apologize for the slow shipping". If the users only want to use agent - // coaching for intent detection, agent_action can be empty - AgentAction string `json:"agentAction,omitempty"` - // Condition: Optional. The condition of the instruction. For example, "the - // customer wants to cancel an order". If the users want the instruction to be - // triggered unconditionally, the condition can be empty. - Condition string `json:"condition,omitempty"` - // Description: Optional. The detailed description of this instruction. - Description string `json:"description,omitempty"` - // DisplayName: Optional. Display name for the instruction. - DisplayName string `json:"displayName,omitempty"` - // Metadata: Optional. Additional information attached to this instruction. - Metadata map[string]string `json:"metadata,omitempty"` - // SystemAction: Optional. The action that system should take. For example, - // "call GetOrderTime with order_number={order number provided by the - // customer}". If the users don't have plugins or don't want to trigger - // plugins, the system_action can be empty - SystemAction string `json:"systemAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentAction") 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. "AgentAction") 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 *GoogleCloudContactcenterinsightsV1AgentCoachingInstruction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1AgentCoachingInstruction - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion: Suggestion for -// coaching agents. -type GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion struct { - // AgentActionSuggestions: Optional. Suggested actions for the agent to take. - AgentActionSuggestions []*GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestion `json:"agentActionSuggestions,omitempty"` - // ApplicableInstructions: Optional. Instructions applicable based on the - // current context. - ApplicableInstructions []*GoogleCloudContactcenterinsightsV1AgentCoachingInstruction `json:"applicableInstructions,omitempty"` - // SampleResponses: Optional. Sample response for the Agent. - SampleResponses []*GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse `json:"sampleResponses,omitempty"` - // SuggestionEval: Self evaluation of the suggestion. - SuggestionEval *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionEval `json:"suggestionEval,omitempty"` - // SuggestionReasoning: Reasoning for the suggestion. - SuggestionReasoning *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionReasoning `json:"suggestionReasoning,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentActionSuggestions") 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. "AgentActionSuggestions") 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 *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestio -// n: Actions suggested for the agent. This is based on applicable -// instructions. -type GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestion struct { - // AgentAction: Optional. The suggested action for the agent. - AgentAction string `json:"agentAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentAction") 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. "AgentAction") 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 *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentActionSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggest -// ionEval: Self evaluations of the suggestion. -type GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionEval struct { - // ActionActionSuggestionEval: Optional. Eval for Agent action suggestion. - ActionActionSuggestionEval string `json:"actionActionSuggestionEval,omitempty"` - // SampleResponseEval: Optional. Eval for sample response. - SampleResponseEval string `json:"sampleResponseEval,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionActionSuggestionEval") - // 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. "ActionActionSuggestionEval") 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 *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionEval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionEval - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggest -// ionReasoning: Reasoning for the suggestion. -type GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionReasoning struct { - // AgentActionTaken: Optional. The actions that the agent has taken already. - AgentActionTaken string `json:"agentActionTaken,omitempty"` - // IssueSummary: Optional. Summary of the issue. - IssueSummary string `json:"issueSummary,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentActionTaken") 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. "AgentActionTaken") 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 *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionReasoning) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionAgentCoachingSuggestionReasoning - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse: -// Sample response that the agent can use. This could be based on applicable -// instructions and ingested data from other systems. -type GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse struct { - // ResponseText: Optional. Sample response for Agent in text. - ResponseText string `json:"responseText,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResponseText") 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. "ResponseText") 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 *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1AgentCoachingSuggestionSampleResponse - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudContactcenterinsightsV1Analysis: The analysis resource. type GoogleCloudContactcenterinsightsV1Analysis struct { // AnalysisResult: Output only. The result of the analysis, which is populated @@ -2270,31 +2100,6 @@ func (s *GoogleCloudContactcenterinsightsV1FaqAnswerData) UnmarshalJSON(data []b return nil } -// GoogleCloudContactcenterinsightsV1FreeFormSuggestion: Suggestion generated -// using free form generator. -type GoogleCloudContactcenterinsightsV1FreeFormSuggestion struct { - // Labels: Optional. Labels for the generator. - Labels []string `json:"labels,omitempty"` - // Response: Required. Free form suggestion. - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Labels") 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. "Labels") 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 *GoogleCloudContactcenterinsightsV1FreeFormSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1FreeFormSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudContactcenterinsightsV1GcsSource: A Cloud Storage source of // conversation data. type GoogleCloudContactcenterinsightsV1GcsSource struct { @@ -2322,278 +2127,6 @@ func (s *GoogleCloudContactcenterinsightsV1GcsSource) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudContactcenterinsightsV1GeneratorSuggestion: Suggestion generated -// using a Generator. -type GoogleCloudContactcenterinsightsV1GeneratorSuggestion struct { - // AgentCoachingSuggestion: Optional. Suggestion to coach the agent. - AgentCoachingSuggestion *GoogleCloudContactcenterinsightsV1AgentCoachingSuggestion `json:"agentCoachingSuggestion,omitempty"` - // FreeFormSuggestion: Optional. Free form suggestion. - FreeFormSuggestion *GoogleCloudContactcenterinsightsV1FreeFormSuggestion `json:"freeFormSuggestion,omitempty"` - // SummarySuggestion: Optional. Suggested summary. - SummarySuggestion *GoogleCloudContactcenterinsightsV1SummarySuggestion `json:"summarySuggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentCoachingSuggestion") 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. "AgentCoachingSuggestion") 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 *GoogleCloudContactcenterinsightsV1GeneratorSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GeneratorSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse: Represents -// response from generators. -type GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse struct { - // GeneratorSuggestion: The suggestion generated from the Generator. - GeneratorSuggestion *GoogleCloudContactcenterinsightsV1GeneratorSuggestion `json:"generatorSuggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "GeneratorSuggestion") 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. "GeneratorSuggestion") 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 *GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse: Response for -// Knowledge Assist. Contains suggested query and optionally includes an answer -// for the query. -type GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse struct { - // SuggestedQuery: The query suggested based on the context. Suggestion is made - // only if it is different from the previous suggestion. - SuggestedQuery *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery `json:"suggestedQuery,omitempty"` - // SuggestedQueryAnswer: The answer generated for the suggested query. Whether - // or not an answer is generated depends on how confident we are about the - // generated query. - SuggestedQueryAnswer *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer `json:"suggestedQueryAnswer,omitempty"` - // ForceSendFields is a list of field names (e.g. "SuggestedQuery") 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. "SuggestedQuery") 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 *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer: -// Represents an answer from Knowledge. Cuurently supports FAQ and Generative -// answers. -type GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer struct { - // AnswerText: The piece of text from the `source` that answers this suggested - // query. - AnswerText string `json:"answerText,omitempty"` - // FaqSource: Populated if the prediction came from FAQ. - FaqSource *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource `json:"faqSource,omitempty"` - // GenerativeSource: Populated if the prediction was Generative. - GenerativeSource *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource `json:"generativeSource,omitempty"` - // IntentMatchingSource: Populated if the prediction was from intent matching. - IntentMatchingSource *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource `json:"intentMatchingSource,omitempty"` - // MatchConfidence: The system's confidence score that this answer is a good - // match for this conversational query. The range is from 0.0 (completely - // uncertain) to 1.0 (completely certain). - MatchConfidence float64 `json:"matchConfidence,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnswerText") 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. "AnswerText") 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 *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswer - var s1 struct { - MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MatchConfidence = float64(s1.MatchConfidence) - return nil -} - -// GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFa -// qSource: Details about source of FAQ answer. -type GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource struct { - // Document: Indicates which Knowledge Document this answer was extracted from. - // Format: `projects//knowledgeBases//documents/`. - Document string `json:"document,omitempty"` - // Question: The corresponding FAQ question. - Question string `json:"question,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") 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 *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGe -// nerativeSource: Details about source of Generative answer. -type GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource struct { - // Snippets: All snippets used for this Generative Prediction, with their - // source URI and data. - Snippets []*GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet `json:"snippets,omitempty"` - // ForceSendFields is a list of field names (e.g. "Snippets") 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. "Snippets") 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 *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGe -// nerativeSourceSnippet: Snippet Source for a Generative Prediction. -type GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet struct { - // Document: Indicates which Knowledge Document this snippet was extracted - // from. Format: `projects//knowledgeBases//documents/`. - Document string `json:"document,omitempty"` - // Text: text taken from that URI. - Text string `json:"text,omitempty"` - // Title: Title of the document. - Title string `json:"title,omitempty"` - // Uri: URI the data is sourced from. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") 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 *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIn -// tentMatchingSource: Details about source of Intent Matching answer. -type GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource struct { - // Title: Title of the document. - Title string `json:"title,omitempty"` - // Uri: URI the data is sourced from. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Title") 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. "Title") 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 *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery: -// Represents a suggested query. -type GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery struct { - // QueryText: Suggested query text. - QueryText string `json:"queryText,omitempty"` - // Score: Suggested query score. - Score float64 `json:"score,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueryText") 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. "QueryText") 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 *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponseSuggestedQuery - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Score = float64(s1.Score) - return nil -} - // GoogleCloudContactcenterinsightsV1HoldData: The data for a hold annotation. type GoogleCloudContactcenterinsightsV1HoldData struct { } @@ -3653,12 +3186,6 @@ type GoogleCloudContactcenterinsightsV1RuntimeAnnotation struct { EndBoundary *GoogleCloudContactcenterinsightsV1AnnotationBoundary `json:"endBoundary,omitempty"` // FaqAnswer: Agent Assist FAQ answer data. FaqAnswer *GoogleCloudContactcenterinsightsV1FaqAnswerData `json:"faqAnswer,omitempty"` - // GeneratorSuggestionResult: The generator suggestion result. - GeneratorSuggestionResult *GoogleCloudContactcenterinsightsV1GetGeneratorSuggestionResponse `json:"generatorSuggestionResult,omitempty"` - // KnowledgeAssistResult: The Knowledge Assist result. - KnowledgeAssistResult *GoogleCloudContactcenterinsightsV1GetKnowledgeAssistResponse `json:"knowledgeAssistResult,omitempty"` - // KnowledgeSearchResult: The Knowledge Search result. - KnowledgeSearchResult *GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer `json:"knowledgeSearchResult,omitempty"` // SmartComposeSuggestion: Agent Assist Smart Compose suggestion data. SmartComposeSuggestion *GoogleCloudContactcenterinsightsV1SmartComposeSuggestionData `json:"smartComposeSuggestion,omitempty"` // SmartReply: Agent Assist Smart Reply data. @@ -3666,6 +3193,8 @@ type GoogleCloudContactcenterinsightsV1RuntimeAnnotation struct { // StartBoundary: The boundary in the conversation where the annotation starts, // inclusive. StartBoundary *GoogleCloudContactcenterinsightsV1AnnotationBoundary `json:"startBoundary,omitempty"` + // UserInput: Explicit input used for generating the answer + UserInput *GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput `json:"userInput,omitempty"` // ForceSendFields is a list of field names (e.g. "AnnotationId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3684,86 +3213,30 @@ func (s *GoogleCloudContactcenterinsightsV1RuntimeAnnotation) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer: Represents a -// SearchKnowledge answer. -type GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer struct { - // Answer: The piece of text from the knowledge base documents that answers the - // search query - Answer string `json:"answer,omitempty"` - // AnswerRecord: The name of the answer record. Format: - // `projects//locations//answer Records/` - AnswerRecord string `json:"answerRecord,omitempty"` - // AnswerSources: All sources used to generate the answer. - AnswerSources []*GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource `json:"answerSources,omitempty"` - // AnswerType: The type of the answer. - // - // Possible values: - // "ANSWER_TYPE_UNSPECIFIED" - The answer has a unspecified type. - // "FAQ" - The answer is from FAQ documents. - // "GENERATIVE" - The answer is from generative model. - // "INTENT" - The answer is from intent matching. - AnswerType string `json:"answerType,omitempty"` - // ConfidenceScore: The confidence score in [0.0, 1.0] range. - ConfidenceScore float64 `json:"confidenceScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Answer") 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. "Answer") 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 *GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswer - var s1 struct { - ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceScore = float64(s1.ConfidenceScore) - return nil -} - -// GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource: The -// sources of the answers. -type GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource struct { - // Document: The document from which the snippet was extracted. Format: - // `projects//knowledgeBases//documents/` - Document string `json:"document,omitempty"` - // Snippet: The relevant snippet of the article. - Snippet string `json:"snippet,omitempty"` - // Title: The title of the article. - Title string `json:"title,omitempty"` - // Uri: The URI of the article. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to +// GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput: Explicit input +// used for generating the answer +type GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput struct { + // GeneratorName: The resource name of associated generator. Format: + // `projects//locations//generators/` + GeneratorName string `json:"generatorName,omitempty"` + // Query: Query text. Article Search uses this to store the input query used to + // generate the search results. + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "GeneratorName") 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. "Document") to include in API + // NullFields is a list of field names (e.g. "GeneratorName") 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 *GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1SearchKnowledgeAnswerAnswerSource +func (s *GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -4049,54 +3522,6 @@ func (s *GoogleCloudContactcenterinsightsV1SpeechConfig) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudContactcenterinsightsV1SummarySuggestion: Suggested summary of -// the conversation. -type GoogleCloudContactcenterinsightsV1SummarySuggestion struct { - // SummarySections: Required. All the parts of generated summary. - SummarySections []*GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection `json:"summarySections,omitempty"` - // ForceSendFields is a list of field names (e.g. "SummarySections") 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. "SummarySections") 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 *GoogleCloudContactcenterinsightsV1SummarySuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1SummarySuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection: A -// component of the generated summary. -type GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection struct { - // Section: Required. Name of the section. - Section string `json:"section,omitempty"` - // Summary: Required. Summary text for the section. - Summary string `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "Section") 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. "Section") 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 *GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1SummarySuggestionSummarySection - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata: Metadata for // undeploying an issue model. type GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata struct { @@ -4222,207 +3647,37 @@ func (s *GoogleCloudContactcenterinsightsV1UploadConversationRequest) MarshalJSO return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudContactcenterinsightsV1View: The View resource. -type GoogleCloudContactcenterinsightsV1View struct { - // CreateTime: Output only. The time at which this view was created. - CreateTime string `json:"createTime,omitempty"` - // DisplayName: The human-readable display name of the view. - DisplayName string `json:"displayName,omitempty"` - // Name: Immutable. The resource name of the view. Format: - // projects/{project}/locations/{location}/views/{view} - Name string `json:"name,omitempty"` - // UpdateTime: Output only. The most recent time at which the view was updated. - UpdateTime string `json:"updateTime,omitempty"` - // Value: String with specific view properties, must be non-empty. - Value string `json:"value,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 *GoogleCloudContactcenterinsightsV1View) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1View - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction: Agent -// Coaching instructions that customer can configure. -type GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction struct { - // AgentAction: Optional. The action that human agent should take. For example, - // "apologize for the slow shipping". If the users only want to use agent - // coaching for intent detection, agent_action can be empty - AgentAction string `json:"agentAction,omitempty"` - // Condition: Optional. The condition of the instruction. For example, "the - // customer wants to cancel an order". If the users want the instruction to be - // triggered unconditionally, the condition can be empty. - Condition string `json:"condition,omitempty"` - // Description: Optional. The detailed description of this instruction. - Description string `json:"description,omitempty"` - // DisplayName: Optional. Display name for the instruction. - DisplayName string `json:"displayName,omitempty"` - // Metadata: Optional. Additional information attached to this instruction. - Metadata map[string]string `json:"metadata,omitempty"` - // SystemAction: Optional. The action that system should take. For example, - // "call GetOrderTime with order_number={order number provided by the - // customer}". If the users don't have plugins or don't want to trigger - // plugins, the system_action can be empty - SystemAction string `json:"systemAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentAction") 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. "AgentAction") 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 *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion: Suggestion -// for coaching agents. -type GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion struct { - // AgentActionSuggestions: Optional. Suggested actions for the agent to take. - AgentActionSuggestions []*GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSuggestion `json:"agentActionSuggestions,omitempty"` - // ApplicableInstructions: Optional. Instructions applicable based on the - // current context. - ApplicableInstructions []*GoogleCloudContactcenterinsightsV1alpha1AgentCoachingInstruction `json:"applicableInstructions,omitempty"` - // SampleResponses: Optional. Sample response for the Agent. - SampleResponses []*GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse `json:"sampleResponses,omitempty"` - // SuggestionEval: Self evaluation of the suggestion. - SuggestionEval *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionEval `json:"suggestionEval,omitempty"` - // SuggestionReasoning: Reasoning for the suggestion. - SuggestionReasoning *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionReasoning `json:"suggestionReasoning,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentActionSuggestions") 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. "AgentActionSuggestions") 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 *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSug -// gestion: Actions suggested for the agent. This is based on applicable -// instructions. -type GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSuggestion struct { - // AgentAction: Optional. The suggested action for the agent. - AgentAction string `json:"agentAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentAction") 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. "AgentAction") 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 *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentActionSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingS -// uggestionEval: Self evaluations of the suggestion. -type GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionEval struct { - // ActionActionSuggestionEval: Optional. Eval for Agent action suggestion. - ActionActionSuggestionEval string `json:"actionActionSuggestionEval,omitempty"` - // SampleResponseEval: Optional. Eval for sample response. - SampleResponseEval string `json:"sampleResponseEval,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionActionSuggestionEval") - // 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. "ActionActionSuggestionEval") 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 *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionEval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionEval - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingS -// uggestionReasoning: Reasoning for the suggestion. -type GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionReasoning struct { - // AgentActionTaken: Optional. The actions that the agent has taken already. - AgentActionTaken string `json:"agentActionTaken,omitempty"` - // IssueSummary: Optional. Summary of the issue. - IssueSummary string `json:"issueSummary,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentActionTaken") 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. "AgentActionTaken") 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 *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionReasoning) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionAgentCoachingSuggestionReasoning - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse -// : Sample response that the agent can use. This could be based on applicable -// instructions and ingested data from other systems. -type GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse struct { - // ResponseText: Optional. Sample response for Agent in text. - ResponseText string `json:"responseText,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResponseText") to +// GoogleCloudContactcenterinsightsV1View: The View resource. +type GoogleCloudContactcenterinsightsV1View struct { + // CreateTime: Output only. The time at which this view was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: The human-readable display name of the view. + DisplayName string `json:"displayName,omitempty"` + // Name: Immutable. The resource name of the view. Format: + // projects/{project}/locations/{location}/views/{view} + Name string `json:"name,omitempty"` + // UpdateTime: Output only. The most recent time at which the view was updated. + UpdateTime string `json:"updateTime,omitempty"` + // Value: String with specific view properties, must be non-empty. + Value string `json:"value,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. "ResponseText") to include in API + // 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 *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestionSampleResponse +func (s *GoogleCloudContactcenterinsightsV1View) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1View return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -6101,31 +5356,6 @@ func (s *GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData) UnmarshalJSON(da return nil } -// GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion: Suggestion -// generated using free form generator. -type GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion struct { - // Labels: Optional. Labels for the generator. - Labels []string `json:"labels,omitempty"` - // Response: Required. Free form suggestion. - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Labels") 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. "Labels") 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 *GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudContactcenterinsightsV1alpha1GcsSource: A Cloud Storage source of // conversation data. type GoogleCloudContactcenterinsightsV1alpha1GcsSource struct { @@ -6153,278 +5383,6 @@ func (s *GoogleCloudContactcenterinsightsV1alpha1GcsSource) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion: Suggestion -// generated using a Generator. -type GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion struct { - // AgentCoachingSuggestion: Optional. Suggestion to coach the agent. - AgentCoachingSuggestion *GoogleCloudContactcenterinsightsV1alpha1AgentCoachingSuggestion `json:"agentCoachingSuggestion,omitempty"` - // FreeFormSuggestion: Optional. Free form suggestion. - FreeFormSuggestion *GoogleCloudContactcenterinsightsV1alpha1FreeFormSuggestion `json:"freeFormSuggestion,omitempty"` - // SummarySuggestion: Optional. Suggested summary. - SummarySuggestion *GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion `json:"summarySuggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentCoachingSuggestion") 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. "AgentCoachingSuggestion") 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 *GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse: -// Represents response from generators. -type GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse struct { - // GeneratorSuggestion: The suggestion generated from the Generator. - GeneratorSuggestion *GoogleCloudContactcenterinsightsV1alpha1GeneratorSuggestion `json:"generatorSuggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "GeneratorSuggestion") 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. "GeneratorSuggestion") 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 *GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse: Response -// for Knowledge Assist. Contains suggested query and optionally includes an -// answer for the query. -type GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse struct { - // SuggestedQuery: The query suggested based on the context. Suggestion is made - // only if it is different from the previous suggestion. - SuggestedQuery *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery `json:"suggestedQuery,omitempty"` - // SuggestedQueryAnswer: The answer generated for the suggested query. Whether - // or not an answer is generated depends on how confident we are about the - // generated query. - SuggestedQueryAnswer *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer `json:"suggestedQueryAnswer,omitempty"` - // ForceSendFields is a list of field names (e.g. "SuggestedQuery") 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. "SuggestedQuery") 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 *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAn -// swer: Represents an answer from Knowledge. Cuurently supports FAQ and -// Generative answers. -type GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer struct { - // AnswerText: The piece of text from the `source` that answers this suggested - // query. - AnswerText string `json:"answerText,omitempty"` - // FaqSource: Populated if the prediction came from FAQ. - FaqSource *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource `json:"faqSource,omitempty"` - // GenerativeSource: Populated if the prediction was Generative. - GenerativeSource *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource `json:"generativeSource,omitempty"` - // IntentMatchingSource: Populated if the prediction was from intent matching. - IntentMatchingSource *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource `json:"intentMatchingSource,omitempty"` - // MatchConfidence: The system's confidence score that this answer is a good - // match for this conversational query. The range is from 0.0 (completely - // uncertain) to 1.0 (completely certain). - MatchConfidence float64 `json:"matchConfidence,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnswerText") 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. "AnswerText") 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 *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswer - var s1 struct { - MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MatchConfidence = float64(s1.MatchConfidence) - return nil -} - -// GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAn -// swerFaqSource: Details about source of FAQ answer. -type GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource struct { - // Document: Indicates which Knowledge Document this answer was extracted from. - // Format: `projects//knowledgeBases//documents/`. - Document string `json:"document,omitempty"` - // Question: The corresponding FAQ question. - Question string `json:"question,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") 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 *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerFaqSource - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAn -// swerGenerativeSource: Details about source of Generative answer. -type GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource struct { - // Snippets: All snippets used for this Generative Prediction, with their - // source URI and data. - Snippets []*GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet `json:"snippets,omitempty"` - // ForceSendFields is a list of field names (e.g. "Snippets") 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. "Snippets") 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 *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSource - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAn -// swerGenerativeSourceSnippet: Snippet Source for a Generative Prediction. -type GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet struct { - // Document: Indicates which Knowledge Document this snippet was extracted - // from. Format: `projects//knowledgeBases//documents/`. - Document string `json:"document,omitempty"` - // Text: text taken from that URI. - Text string `json:"text,omitempty"` - // Title: Title of the document. - Title string `json:"title,omitempty"` - // Uri: URI the data is sourced from. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") 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 *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerGenerativeSourceSnippet - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAn -// swerIntentMatchingSource: Details about source of Intent Matching answer. -type GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource struct { - // Title: Title of the document. - Title string `json:"title,omitempty"` - // Uri: URI the data is sourced from. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Title") 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. "Title") 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 *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseKnowledgeAnswerIntentMatchingSource - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQu -// ery: Represents a suggested query. -type GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery struct { - // QueryText: Suggested query text. - QueryText string `json:"queryText,omitempty"` - // Score: Suggested query score. - Score float64 `json:"score,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueryText") 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. "QueryText") 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 *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponseSuggestedQuery - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Score = float64(s1.Score) - return nil -} - // GoogleCloudContactcenterinsightsV1alpha1HoldData: The data for a hold // annotation. type GoogleCloudContactcenterinsightsV1alpha1HoldData struct { @@ -7124,12 +6082,6 @@ type GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation struct { EndBoundary *GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary `json:"endBoundary,omitempty"` // FaqAnswer: Agent Assist FAQ answer data. FaqAnswer *GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData `json:"faqAnswer,omitempty"` - // GeneratorSuggestionResult: The generator suggestion result. - GeneratorSuggestionResult *GoogleCloudContactcenterinsightsV1alpha1GetGeneratorSuggestionResponse `json:"generatorSuggestionResult,omitempty"` - // KnowledgeAssistResult: The Knowledge Assist result. - KnowledgeAssistResult *GoogleCloudContactcenterinsightsV1alpha1GetKnowledgeAssistResponse `json:"knowledgeAssistResult,omitempty"` - // KnowledgeSearchResult: The Knowledge Search result. - KnowledgeSearchResult *GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer `json:"knowledgeSearchResult,omitempty"` // SmartComposeSuggestion: Agent Assist Smart Compose suggestion data. SmartComposeSuggestion *GoogleCloudContactcenterinsightsV1alpha1SmartComposeSuggestionData `json:"smartComposeSuggestion,omitempty"` // SmartReply: Agent Assist Smart Reply data. @@ -7137,6 +6089,8 @@ type GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation struct { // StartBoundary: The boundary in the conversation where the annotation starts, // inclusive. StartBoundary *GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary `json:"startBoundary,omitempty"` + // UserInput: Explicit input used for generating the answer + UserInput *GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput `json:"userInput,omitempty"` // ForceSendFields is a list of field names (e.g. "AnnotationId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -7155,86 +6109,30 @@ func (s *GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation) MarshalJSON( return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer: Represents a -// SearchKnowledge answer. -type GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer struct { - // Answer: The piece of text from the knowledge base documents that answers the - // search query - Answer string `json:"answer,omitempty"` - // AnswerRecord: The name of the answer record. Format: - // `projects//locations//answer Records/` - AnswerRecord string `json:"answerRecord,omitempty"` - // AnswerSources: All sources used to generate the answer. - AnswerSources []*GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource `json:"answerSources,omitempty"` - // AnswerType: The type of the answer. - // - // Possible values: - // "ANSWER_TYPE_UNSPECIFIED" - The answer has a unspecified type. - // "FAQ" - The answer is from FAQ documents. - // "GENERATIVE" - The answer is from generative model. - // "INTENT" - The answer is from intent matching. - AnswerType string `json:"answerType,omitempty"` - // ConfidenceScore: The confidence score in [0.0, 1.0] range. - ConfidenceScore float64 `json:"confidenceScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Answer") 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. "Answer") 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 *GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswer - var s1 struct { - ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceScore = float64(s1.ConfidenceScore) - return nil -} - -// GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource: -// The sources of the answers. -type GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource struct { - // Document: The document from which the snippet was extracted. Format: - // `projects//knowledgeBases//documents/` - Document string `json:"document,omitempty"` - // Snippet: The relevant snippet of the article. - Snippet string `json:"snippet,omitempty"` - // Title: The title of the article. - Title string `json:"title,omitempty"` - // Uri: The URI of the article. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to +// GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput: Explicit +// input used for generating the answer +type GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput struct { + // GeneratorName: The resource name of associated generator. Format: + // `projects//locations//generators/` + GeneratorName string `json:"generatorName,omitempty"` + // Query: Query text. Article Search uses this to store the input query used to + // generate the search results. + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "GeneratorName") 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. "Document") to include in API + // NullFields is a list of field names (e.g. "GeneratorName") 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 *GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1SearchKnowledgeAnswerAnswerSource +func (s *GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -7406,54 +6304,6 @@ func (s *GoogleCloudContactcenterinsightsV1alpha1SpeechConfig) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion: Suggested summary -// of the conversation. -type GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion struct { - // SummarySections: Required. All the parts of generated summary. - SummarySections []*GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection `json:"summarySections,omitempty"` - // ForceSendFields is a list of field names (e.g. "SummarySections") 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. "SummarySections") 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 *GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1SummarySuggestion - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection: A -// component of the generated summary. -type GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection struct { - // Section: Required. Name of the section. - Section string `json:"section,omitempty"` - // Summary: Required. Summary text for the section. - Summary string `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "Section") 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. "Section") 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 *GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudContactcenterinsightsV1alpha1SummarySuggestionSummarySection - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata: Metadata // for undeploying an issue model. type GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata struct { diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 0b7d047d5df..c511d6fd60f 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -6219,7 +6219,7 @@ } } }, - "revision": "20240518", + "revision": "20240611", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -14766,7 +14766,7 @@ "description": "Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps merchants to quickly understand the impact of the issue. The detailed breakdown helps the merchant to fully understand the impact of the issue. It can be rendered as dialog that opens when the merchant mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`." }, "prerenderedContent": { - "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", + "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `list-intro` - marks the paragraph that contains an intro for a list. This paragraph will be always followed by a list. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", "type": "string" }, "title": { diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 8e171e18f44..6347377d0ae 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -11907,9 +11907,11 @@ type ProductIssue struct { // can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds // additional information fitting to the context, can use the 'i' as an icon. * // `content-moderation` - marks the paragraph that explains how the issue was - // identified. * `new-element` - Present for new elements added to the - // pre-rendered content in the future. To make sure that a new content element - // does not break your style, you can hide everything with this class. + // identified. * `list-intro` - marks the paragraph that contains an intro for + // a list. This paragraph will be always followed by a list. * `new-element` - + // Present for new elements added to the pre-rendered content in the future. To + // make sure that a new content element does not break your style, you can hide + // everything with this class. PrerenderedContent string `json:"prerenderedContent,omitempty"` // Title: Title of the issue. Title string `json:"title,omitempty"` diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 5869329b466..05e04494292 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -24,18 +24,28 @@ "endpoints": [ { "description": "Regional Endpoint", - "endpointUrl": "https://dataflow.me-central2.rep.googleapis.com/", - "location": "me-central2" + "endpointUrl": "https://dataflow.europe-west3.rep.googleapis.com/", + "location": "europe-west3" }, { "description": "Regional Endpoint", - "endpointUrl": "https://dataflow.europe-west3.rep.googleapis.com/", - "location": "europe-west3" + "endpointUrl": "https://dataflow.europe-west8.rep.googleapis.com/", + "location": "europe-west8" }, { "description": "Regional Endpoint", "endpointUrl": "https://dataflow.europe-west9.rep.googleapis.com/", "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://dataflow.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://dataflow.us-east7.rep.googleapis.com/", + "location": "us-east7" } ], "fullyEncodeReservedExpansion": true, @@ -2187,7 +2197,7 @@ } } }, - "revision": "20240430", + "revision": "20240603", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -4981,7 +4991,34 @@ "BOOLEAN", "ENUM", "NUMBER", - "KAFKA_TOPIC" + "KAFKA_TOPIC", + "KAFKA_READ_TOPIC", + "KAFKA_WRITE_TOPIC" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false ], "enumDescriptions": [ "Default input type.", @@ -5004,7 +5041,9 @@ "The parameter specifies a boolean input.", "The parameter specifies an enum input.", "The parameter specifies a number input.", - "The parameter specifies the fully-qualified name of an Apache Kafka topic. This can be either a Google Managed Kafka topic or a non-managed Kafka topic." + "Deprecated. Please use KAFKA_READ_TOPIC instead.", + "The parameter specifies the fully-qualified name of an Apache Kafka topic. This can be either a Google Managed Kafka topic or a non-managed Kafka topic.", + "The parameter specifies the fully-qualified name of an Apache Kafka topic. This can be an existing Google Managed Kafka topic, the name for a new Google Managed Kafka topic, or an existing non-managed Kafka topic." ], "type": "string" }, diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index 9aacfa3be55..fccc7fd3d28 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -3892,9 +3892,14 @@ type ParameterMetadata struct { // "BOOLEAN" - The parameter specifies a boolean input. // "ENUM" - The parameter specifies an enum input. // "NUMBER" - The parameter specifies a number input. - // "KAFKA_TOPIC" - The parameter specifies the fully-qualified name of an - // Apache Kafka topic. This can be either a Google Managed Kafka topic or a + // "KAFKA_TOPIC" - Deprecated. Please use KAFKA_READ_TOPIC instead. + // "KAFKA_READ_TOPIC" - The parameter specifies the fully-qualified name of + // an Apache Kafka topic. This can be either a Google Managed Kafka topic or a // non-managed Kafka topic. + // "KAFKA_WRITE_TOPIC" - The parameter specifies the fully-qualified name of + // an Apache Kafka topic. This can be an existing Google Managed Kafka topic, + // the name for a new Google Managed Kafka topic, or an existing non-managed + // Kafka topic. ParamType string `json:"paramType,omitempty"` // ParentName: Optional. Specifies the name of the parent parameter. Used in // conjunction with 'parent_trigger_values' to make this parameter conditional diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index 3d69de89ba2..f0722b3dfd0 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -892,7 +892,7 @@ ] }, "generateDataQualityRules": { - "description": "Generates recommended DataQualityRule from a data profiling DataScan.", + "description": "Generates recommended data quality rules based on the results of a data profiling scan.Use the recommendations to build rules for a data quality scan.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:generateDataQualityRules", "httpMethod": "POST", "id": "dataplex.projects.locations.dataScans.generateDataQualityRules", @@ -901,7 +901,7 @@ ], "parameters": { "name": { - "description": "Required. The name should be either * the name of a datascan with at least one successful completed data profiling job, or * the name of a successful completed data profiling datascan job.", + "description": "Required. The name must be one of the following: The name of a data scan with at least one successful, completed data profiling job The name of a successful, completed data profiling job (a data scan job where the job type is data profiling)", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", "required": true, @@ -1164,7 +1164,7 @@ "jobs": { "methods": { "generateDataQualityRules": { - "description": "Generates recommended DataQualityRule from a data profiling DataScan.", + "description": "Generates recommended data quality rules based on the results of a data profiling scan.Use the recommendations to build rules for a data quality scan.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs/{jobsId}:generateDataQualityRules", "httpMethod": "POST", "id": "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules", @@ -1173,7 +1173,7 @@ ], "parameters": { "name": { - "description": "Required. The name should be either * the name of a datascan with at least one successful completed data profiling job, or * the name of a successful completed data profiling datascan job.", + "description": "Required. The name must be one of the following: The name of a data scan with at least one successful, completed data profiling job The name of a successful, completed data profiling job (a data scan job where the job type is data profiling)", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+$", "required": true, @@ -5271,7 +5271,7 @@ } } }, - "revision": "20240523", + "revision": "20240529", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -8302,6 +8302,11 @@ "description": "User-defined labels. The maximum size of keys and values is 128 characters each.", "type": "object" }, + "location": { + "description": "Output only. Location of the resource in the source system. Entry will be searchable by this location. By default, this should match the location of the EntryGroup containing this entry. A different value allows capturing source location for data external to GCP.", + "readOnly": true, + "type": "string" + }, "platform": { "description": "The platform containing the source system. The maximum size of the field is 64 characters.", "type": "string" @@ -8628,17 +8633,17 @@ "type": "object" }, "GoogleCloudDataplexV1GenerateDataQualityRulesRequest": { - "description": "Generate recommended DataQualityRules request.", + "description": "Request details for generating data quality rule recommendations.", "id": "GoogleCloudDataplexV1GenerateDataQualityRulesRequest", "properties": {}, "type": "object" }, "GoogleCloudDataplexV1GenerateDataQualityRulesResponse": { - "description": "Generate recommended DataQualityRules response.", + "description": "Response details for data quality rule recommendations.", "id": "GoogleCloudDataplexV1GenerateDataQualityRulesResponse", "properties": { "rule": { - "description": "Generated recommended {@link DataQualityRule}s.", + "description": "The data quality rules that Dataplex generates based on the results of a data profiling scan.", "items": { "$ref": "GoogleCloudDataplexV1DataQualityRule" }, diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index ad8f6371ee1..5b6b4a2bb65 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -4137,6 +4137,11 @@ type GoogleCloudDataplexV1EntrySource struct { // Labels: User-defined labels. The maximum size of keys and values is 128 // characters each. Labels map[string]string `json:"labels,omitempty"` + // Location: Output only. Location of the resource in the source system. Entry + // will be searchable by this location. By default, this should match the + // location of the EntryGroup containing this entry. A different value allows + // capturing source location for data external to GCP. + Location string `json:"location,omitempty"` // Platform: The platform containing the source system. The maximum size of the // field is 64 characters. Platform string `json:"platform,omitempty"` @@ -4528,15 +4533,16 @@ func (s *GoogleCloudDataplexV1EnvironmentSessionStatus) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1GenerateDataQualityRulesRequest: Generate recommended -// DataQualityRules request. +// GoogleCloudDataplexV1GenerateDataQualityRulesRequest: Request details for +// generating data quality rule recommendations. type GoogleCloudDataplexV1GenerateDataQualityRulesRequest struct { } -// GoogleCloudDataplexV1GenerateDataQualityRulesResponse: Generate recommended -// DataQualityRules response. +// GoogleCloudDataplexV1GenerateDataQualityRulesResponse: Response details for +// data quality rule recommendations. type GoogleCloudDataplexV1GenerateDataQualityRulesResponse struct { - // Rule: Generated recommended {@link DataQualityRule}s. + // Rule: The data quality rules that Dataplex generates based on the results of + // a data profiling scan. Rule []*GoogleCloudDataplexV1DataQualityRule `json:"rule,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -10221,12 +10227,14 @@ type ProjectsLocationsDataScansGenerateDataQualityRulesCall struct { header_ http.Header } -// GenerateDataQualityRules: Generates recommended DataQualityRule from a data -// profiling DataScan. +// GenerateDataQualityRules: Generates recommended data quality rules based on +// the results of a data profiling scan.Use the recommendations to build rules +// for a data quality scan. // -// - name: The name should be either * the name of a datascan with at least one -// successful completed data profiling job, or * the name of a successful -// completed data profiling datascan job. +// - name: The name must be one of the following: The name of a data scan with +// at least one successful, completed data profiling job The name of a +// successful, completed data profiling job (a data scan job where the job +// type is data profiling). func (r *ProjectsLocationsDataScansService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { c := &ProjectsLocationsDataScansGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -11179,12 +11187,14 @@ type ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall struct { header_ http.Header } -// GenerateDataQualityRules: Generates recommended DataQualityRule from a data -// profiling DataScan. +// GenerateDataQualityRules: Generates recommended data quality rules based on +// the results of a data profiling scan.Use the recommendations to build rules +// for a data quality scan. // -// - name: The name should be either * the name of a datascan with at least one -// successful completed data profiling job, or * the name of a successful -// completed data profiling datascan job. +// - name: The name must be one of the following: The name of a data scan with +// at least one successful, completed data profiling job The name of a +// successful, completed data profiling job (a data scan job where the job +// type is data profiling). func (r *ProjectsLocationsDataScansJobsService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { c := &ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index e3e9b0d6750..cd078d6316f 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -3072,7 +3072,7 @@ } } }, - "revision": "20240505", + "revision": "20240605", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3210,6 +3210,32 @@ }, "type": "object" }, + "AutotuningConfig": { + "description": "Autotuning configuration of the workload.", + "id": "AutotuningConfig", + "properties": { + "scenarios": { + "description": "Optional. Scenarios for which tunings are applied.", + "items": { + "enum": [ + "SCENARIO_UNSPECIFIED", + "SCALING", + "BROADCAST_HASH_JOIN", + "MEMORY" + ], + "enumDescriptions": [ + "Default value.", + "Scaling recommendations such as initialExecutors.", + "Adding hints for potential relation broadcasts.", + "Memory management for workloads." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AuxiliaryNodeGroup": { "description": "Node group identification and configuration information.", "id": "AuxiliaryNodeGroup", @@ -5606,7 +5632,9 @@ "DELETE", "RESIZE", "REPAIR", - "UPDATE_LABELS" + "UPDATE_LABELS", + "START", + "STOP" ], "enumDescriptions": [ "Node group operation type is unknown.", @@ -5615,7 +5643,9 @@ "Delete node group operation type.", "Resize node group operation type.", "Repair node group operation type.", - "Update node group label operation type." + "Update node group label operation type.", + "Start node group operation type.", + "Stop node group operation type." ], "type": "string" }, @@ -6208,6 +6238,14 @@ "description": "Runtime configuration for a workload.", "id": "RuntimeConfig", "properties": { + "autotuningConfig": { + "$ref": "AutotuningConfig", + "description": "Optional. Autotuning configuration of the workload." + }, + "cohort": { + "description": "Optional. Cohort identifier. Identifies families of the workloads having the same shape, e.g. daily ETL jobs.", + "type": "string" + }, "containerImage": { "description": "Optional. Optional custom container image for the job runtime environment. If not specified, a default container image will be used.", "type": "string" diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index e72c6209d79..bb21c2d084b 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -519,6 +519,34 @@ func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// AutotuningConfig: Autotuning configuration of the workload. +type AutotuningConfig struct { + // Scenarios: Optional. Scenarios for which tunings are applied. + // + // Possible values: + // "SCENARIO_UNSPECIFIED" - Default value. + // "SCALING" - Scaling recommendations such as initialExecutors. + // "BROADCAST_HASH_JOIN" - Adding hints for potential relation broadcasts. + // "MEMORY" - Memory management for workloads. + Scenarios []string `json:"scenarios,omitempty"` + // ForceSendFields is a list of field names (e.g. "Scenarios") 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. "Scenarios") 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 *AutotuningConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutotuningConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // AuxiliaryNodeGroup: Node group identification and configuration information. type AuxiliaryNodeGroup struct { // NodeGroup: Required. Node group configuration. @@ -3619,6 +3647,8 @@ type NodeGroupOperationMetadata struct { // "RESIZE" - Resize node group operation type. // "REPAIR" - Repair node group operation type. // "UPDATE_LABELS" - Update node group label operation type. + // "START" - Start node group operation type. + // "STOP" - Stop node group operation type. OperationType string `json:"operationType,omitempty"` // Status: Output only. Current operation status. Status *ClusterOperationStatus `json:"status,omitempty"` @@ -4391,6 +4421,11 @@ func (s *ResizeNodeGroupRequest) MarshalJSON() ([]byte, error) { // RuntimeConfig: Runtime configuration for a workload. type RuntimeConfig struct { + // AutotuningConfig: Optional. Autotuning configuration of the workload. + AutotuningConfig *AutotuningConfig `json:"autotuningConfig,omitempty"` + // Cohort: Optional. Cohort identifier. Identifies families of the workloads + // having the same shape, e.g. daily ETL jobs. + Cohort string `json:"cohort,omitempty"` // ContainerImage: Optional. Optional custom container image for the job // runtime environment. If not specified, a default container image will be // used. @@ -4402,13 +4437,13 @@ type RuntimeConfig struct { RepositoryConfig *RepositoryConfig `json:"repositoryConfig,omitempty"` // Version: Optional. Version of the batch runtime. Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerImage") to + // ForceSendFields is a list of field names (e.g. "AutotuningConfig") 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. "ContainerImage") to include in + // NullFields is a list of field names (e.g. "AutotuningConfig") 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. diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index c935afd6c3d..c53eb2a522b 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1250,7 +1250,7 @@ } } }, - "revision": "20240515", + "revision": "20240529", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AppendOnly": { @@ -1560,6 +1560,10 @@ "postgresqlRdbms": { "$ref": "PostgresqlRdbms", "description": "PostgreSQL RDBMS to enrich with child data objects and metadata." + }, + "sqlServerRdbms": { + "$ref": "SqlServerRdbms", + "description": "SQLServer RDBMS to enrich with child data objects and metadata." } }, "type": "object" @@ -1579,6 +1583,10 @@ "postgresqlRdbms": { "$ref": "PostgresqlRdbms", "description": "Enriched PostgreSQL RDBMS object." + }, + "sqlServerRdbms": { + "$ref": "SqlServerRdbms", + "description": "Enriched SQLServer RDBMS object." } }, "type": "object" diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index 41b4a96cd22..5ef17259496 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -549,6 +549,9 @@ type DiscoverConnectionProfileRequest struct { // PostgresqlRdbms: PostgreSQL RDBMS to enrich with child data objects and // metadata. PostgresqlRdbms *PostgresqlRdbms `json:"postgresqlRdbms,omitempty"` + // SqlServerRdbms: SQLServer RDBMS to enrich with child data objects and + // metadata. + SqlServerRdbms *SqlServerRdbms `json:"sqlServerRdbms,omitempty"` // ForceSendFields is a list of field names (e.g. "ConnectionProfile") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -575,6 +578,8 @@ type DiscoverConnectionProfileResponse struct { OracleRdbms *OracleRdbms `json:"oracleRdbms,omitempty"` // PostgresqlRdbms: Enriched PostgreSQL RDBMS object. PostgresqlRdbms *PostgresqlRdbms `json:"postgresqlRdbms,omitempty"` + // SqlServerRdbms: Enriched SQLServer RDBMS object. + SqlServerRdbms *SqlServerRdbms `json:"sqlServerRdbms,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index b8082e00920..a7d69e6e8e3 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -3433,6 +3433,35 @@ "https://www.googleapis.com/auth/dialogflow" ] }, + "suggestKnowledgeAssist": { + "description": "Gets knowledge assist suggestions based on historical messages.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestKnowledgeAssist", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.participants.suggestions.suggestKnowledgeAssist", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the participant to fetch suggestions for. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/suggestions:suggestKnowledgeAssist", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "suggestSmartReplies": { "description": "Gets smart replies for a participant based on specific historical messages.", "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestSmartReplies", @@ -6954,6 +6983,35 @@ "https://www.googleapis.com/auth/dialogflow" ] }, + "suggestKnowledgeAssist": { + "description": "Gets knowledge assist suggestions based on historical messages.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestKnowledgeAssist", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestKnowledgeAssist", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the participant to fetch suggestions for. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/suggestions:suggestKnowledgeAssist", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "suggestSmartReplies": { "description": "Gets smart replies for a participant based on specific historical messages.", "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestSmartReplies", @@ -7965,7 +8023,7 @@ } } }, - "revision": "20240523", + "revision": "20240605", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -8026,11 +8084,11 @@ "id": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", "properties": { "enableInteractionLogging": { - "description": "If true, DF Interaction logging is currently enabled.", + "description": "Enables DF Interaction logging.", "type": "boolean" }, "enableStackdriverLogging": { - "description": "If true, StackDriver logging is currently enabled.", + "description": "Enables StackDriver logging.", "type": "boolean" } }, @@ -10416,11 +10474,11 @@ "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", "properties": { "enableInteractionLogging": { - "description": "If true, DF Interaction logging is currently enabled.", + "description": "Enables DF Interaction logging.", "type": "boolean" }, "enableStackdriverLogging": { - "description": "If true, StackDriver logging is currently enabled.", + "description": "Enables StackDriver logging.", "type": "boolean" } }, @@ -11773,6 +11831,10 @@ "text": { "$ref": "GoogleCloudDialogflowCxV3beta1TextInput", "description": "The natural language text to be processed." + }, + "toolCallResult": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolCallResult", + "description": "The results of a tool executed by the client." } }, "type": "object" @@ -11841,6 +11903,10 @@ "text": { "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageText", "description": "Returns a text response." + }, + "toolCall": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolCall", + "description": "Returns the definition of a tool call that should be executed by the client." } }, "type": "object" @@ -12235,6 +12301,67 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ToolCall": { + "description": "Represents a call of a specific tool's action with the specified inputs.", + "id": "GoogleCloudDialogflowCxV3beta1ToolCall", + "properties": { + "action": { + "description": "Required. The name of the tool's action associated with this call.", + "type": "string" + }, + "inputParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The action's input parameters.", + "type": "object" + }, + "tool": { + "description": "Required. The tool associated with this call. Format: `projects//locations//agents//tools/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolCallResult": { + "description": "The result of calling a tool's action that has been executed by the client.", + "id": "GoogleCloudDialogflowCxV3beta1ToolCallResult", + "properties": { + "action": { + "description": "Required. The name of the tool's action associated with this call.", + "type": "string" + }, + "error": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolCallResultError", + "description": "The tool call's error." + }, + "outputParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The tool call's output parameters.", + "type": "object" + }, + "tool": { + "description": "Required. The tool associated with this call. Format: `projects//locations//agents//tools/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolCallResultError": { + "description": "An error produced by the tool call.", + "id": "GoogleCloudDialogflowCxV3beta1ToolCallResultError", + "properties": { + "message": { + "description": "Optional. The error message of the function.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1TransitionRoute": { "description": "A transition route specifies a intent that can be matched and/or a data condition that can be evaluated during a session. When a specified transition is matched, the following actions are taken in order: * If there is a `trigger_fulfillment` associated with the transition, it will be called. * If there is a `target_page` associated with the transition, the session will transition into the specified page. * If there is a `target_flow` associated with the transition, the session will transition into the specified flow.", "id": "GoogleCloudDialogflowCxV3beta1TransitionRoute", @@ -12874,14 +13001,16 @@ "ARTICLE_SUGGESTION", "FAQ", "SMART_REPLY", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", "Run smart reply model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -14314,6 +14443,99 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswer": { + "description": "Represents a Knowledge Assist answer.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswer", + "properties": { + "answerRecord": { + "description": "The name of the answer record. Format: `projects//locations//answer Records/`.", + "type": "string" + }, + "suggestedQuery": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery", + "description": "The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion." + }, + "suggestedQueryAnswer": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer", + "description": "The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer": { + "description": "Represents an answer from Knowledge. Currently supports FAQ and Generative answers.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer", + "properties": { + "answerText": { + "description": "The piece of text from the `source` that answers this suggested query.", + "type": "string" + }, + "faqSource": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "description": "Populated if the prediction came from FAQ." + }, + "generativeSource": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "description": "Populated if the prediction was Generative." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource": { + "description": "Details about source of FAQ answer.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "properties": { + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource": { + "description": "Details about source of Generative answer.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "properties": { + "snippets": { + "description": "All snippets used for this Generative Prediction, with their source URI and data.", + "items": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet": { + "description": "Snippet Source for a Generative Prediction.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet", + "properties": { + "text": { + "description": "Text taken from that URI.", + "type": "string" + }, + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "URI the data is sourced from.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery": { + "description": "Represents a suggested query.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery", + "properties": { + "queryText": { + "description": "Suggested query text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2KnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowV2KnowledgeOperationMetadata", @@ -14636,14 +14858,16 @@ "ARTICLE_SUGGESTION", "FAQ", "SMART_REPLY", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", "Run smart reply model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -14737,6 +14961,27 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse": { + "description": "The response message for Participants.SuggestKnowledgeAssist.", + "id": "GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.context_size field in the request if there are fewer messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "knowledgeAssistAnswer": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswer", + "description": "Output only. Knowledge Assist suggestion.", + "readOnly": true + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2SuggestSmartRepliesResponse": { "description": "The response message for Participants.SuggestSmartReplies.", "id": "GoogleCloudDialogflowV2SuggestSmartRepliesResponse", @@ -14777,6 +15022,10 @@ "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." }, + "suggestKnowledgeAssistResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse", + "description": "SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST." + }, "suggestSmartRepliesResponse": { "$ref": "GoogleCloudDialogflowV2SuggestSmartRepliesResponse", "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." @@ -15017,6 +15266,10 @@ ], "type": "string" }, + "knowledgeAssistFeedback": { + "$ref": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback", + "description": "Optional. Feedback for knowledge assist." + }, "knowledgeSearchFeedback": { "$ref": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback", "description": "Optional. Feedback for knowledge search." @@ -15028,6 +15281,24 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback": { + "description": "Feedback for knowledge assist.", + "id": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback", + "properties": { + "answerCopied": { + "description": "Whether the suggested answer was copied by the human agent. If the value is set to be true, AnswerFeedback.clicked will be updated to be true.", + "type": "boolean" + }, + "clickedUris": { + "description": "The URIs clicked by the human agent. The value is appended for each UpdateAnswerRecordRequest. If the value is not empty, AnswerFeedback.clicked will be updated to be true.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback": { "description": "Feedback for knowledge search.", "id": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback", @@ -15381,6 +15652,11 @@ ], "type": "string" }, + "callCompanionAuthCode": { + "description": "The auth code for accessing Call Companion UI.", + "format": "byte", + "type": "string" + }, "cxCurrentPage": { "description": "The unique identifier of the current Dialogflow CX conversation page. Format: `projects//locations//agents//flows//pages/`.", "type": "string" @@ -15687,7 +15963,8 @@ "SMART_REPLY", "DIALOGFLOW_ASSIST", "CONVERSATION_SUMMARIZATION", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", @@ -15696,7 +15973,8 @@ "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", "Run conversation summarization model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -15732,7 +16010,8 @@ "SMART_REPLY", "DIALOGFLOW_ASSIST", "CONVERSATION_SUMMARIZATION", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", @@ -15741,7 +16020,8 @@ "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", "Run conversation summarization model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -16909,6 +17189,10 @@ "description": "Detail human agent assistant config.", "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig", "properties": { + "disableHighLatencyFeaturesSyncDelivery": { + "description": "Optional. When disable_high_latency_features_sync_delivery is true and using the AnalyzeContent API, we will not deliver the responses from high latency features in the API response. The human_agent_assistant_config.notification_config must be configured and enable_event_based_suggestion must be set to true to receive the responses from high latency features in Pub/Sub. High latency feature(s): KNOWLEDGE_ASSIST.", + "type": "boolean" + }, "featureConfigs": { "description": "Configuration of different suggestion features. One feature can have only one config.", "items": { @@ -16954,6 +17238,14 @@ "description": "Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, ENTITY_EXTRACTION, KNOWLEDGE_ASSIST.", "type": "boolean" }, + "enableQuerySuggestionOnly": { + "description": "Optional. Enable query suggestion only. Supported features: KNOWLEDGE_ASSIST", + "type": "boolean" + }, + "enableQuerySuggestionWhenNoAnswer": { + "description": "Optional. Enable query suggestion even if we can't find its answer. By default, queries are suggested only if we find its answer. Supported features: KNOWLEDGE_ASSIST", + "type": "boolean" + }, "queryConfig": { "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig", "description": "Configs of query." @@ -18732,6 +19024,99 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer": { + "description": "Represents a Knowledge Assist answer.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer", + "properties": { + "answerRecord": { + "description": "The name of the answer record. Format: `projects//locations//answer Records/`.", + "type": "string" + }, + "suggestedQuery": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery", + "description": "The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion." + }, + "suggestedQueryAnswer": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer", + "description": "The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer": { + "description": "Represents an answer from Knowledge. Currently supports FAQ and Generative answers.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer", + "properties": { + "answerText": { + "description": "The piece of text from the `source` that answers this suggested query.", + "type": "string" + }, + "faqSource": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "description": "Populated if the prediction came from FAQ." + }, + "generativeSource": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "description": "Populated if the prediction was Generative." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource": { + "description": "Details about source of FAQ answer.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "properties": { + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource": { + "description": "Details about source of Generative answer.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "properties": { + "snippets": { + "description": "All snippets used for this Generative Prediction, with their source URI and data.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet": { + "description": "Snippet Source for a Generative Prediction.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet", + "properties": { + "text": { + "description": "Text taken from that URI.", + "type": "string" + }, + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "URI the data is sourced from.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery": { + "description": "Represents a suggested query.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery", + "properties": { + "queryText": { + "description": "Suggested query text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1KnowledgeBase": { "description": "A knowledge base represents a collection of knowledge documents that you provide to Dialogflow. Your knowledge documents contain information that may be useful during conversations with end-users. Some Dialogflow features use knowledge bases when looking for a response to an end-user input. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", "id": "GoogleCloudDialogflowV2beta1KnowledgeBase", @@ -19890,7 +20275,8 @@ "SMART_REPLY", "DIALOGFLOW_ASSIST", "CONVERSATION_SUMMARIZATION", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", @@ -19899,7 +20285,8 @@ "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", "Run conversation summarization model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -20193,6 +20580,47 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest": { + "description": "The request message for Participants.SuggestKnowledgeAssist.", + "id": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest", + "properties": { + "contextSize": { + "description": "Optional. Max number of messages prior to and including latest_message to use as context when compiling the suggestion. The context size is by default 100 and at most 100.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "Optional. The name of the latest conversation message to compile suggestions for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "previousSuggestedQuery": { + "description": "Optional. The previously suggested query for the given conversation. This helps identify whether the next suggestion we generate is resonably different from the previous one. This is useful to avoid similar suggestions within the conversation.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse": { + "description": "The response message for Participants.SuggestKnowledgeAssist.", + "id": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.context_size field in the request if there are fewer messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "knowledgeAssistAnswer": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer", + "description": "Output only. Knowledge Assist suggestion.", + "readOnly": true + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest": { "description": "The request message for Participants.SuggestSmartReplies.", "id": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest", @@ -20352,7 +20780,8 @@ "SMART_REPLY", "DIALOGFLOW_ASSIST", "CONVERSATION_SUMMARIZATION", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", @@ -20361,7 +20790,8 @@ "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", "Run conversation summarization model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -20419,6 +20849,10 @@ "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." }, + "suggestKnowledgeAssistResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse", + "description": "SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST." + }, "suggestSmartRepliesResponse": { "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index 3f72a3fb11a..1796f55a3fb 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -929,10 +929,9 @@ func (s *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings) MarshalJSON() ([ // GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings: Define behaviors // on logging. type GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings struct { - // EnableInteractionLogging: If true, DF Interaction logging is currently - // enabled. + // EnableInteractionLogging: Enables DF Interaction logging. EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` - // EnableStackdriverLogging: If true, StackDriver logging is currently enabled. + // EnableStackdriverLogging: Enables StackDriver logging. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableInteractionLogging") // to unconditionally include in API requests. By default, fields with empty or @@ -4367,10 +4366,9 @@ func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings) MarshalJSON // GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings: Define // behaviors on logging. type GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings struct { - // EnableInteractionLogging: If true, DF Interaction logging is currently - // enabled. + // EnableInteractionLogging: Enables DF Interaction logging. EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` - // EnableStackdriverLogging: If true, StackDriver logging is currently enabled. + // EnableStackdriverLogging: Enables StackDriver logging. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableInteractionLogging") // to unconditionally include in API requests. By default, fields with empty or @@ -6412,6 +6410,8 @@ type GoogleCloudDialogflowCxV3beta1QueryInput struct { LanguageCode string `json:"languageCode,omitempty"` // Text: The natural language text to be processed. Text *GoogleCloudDialogflowCxV3beta1TextInput `json:"text,omitempty"` + // ToolCallResult: The results of a tool executed by the client. + ToolCallResult *GoogleCloudDialogflowCxV3beta1ToolCallResult `json:"toolCallResult,omitempty"` // ForceSendFields is a list of field names (e.g. "Audio") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -6504,6 +6504,9 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { TelephonyTransferCall *GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"` // Text: Returns a text response. Text *GoogleCloudDialogflowCxV3beta1ResponseMessageText `json:"text,omitempty"` + // ToolCall: Returns the definition of a tool call that should be executed by + // the client. + ToolCall *GoogleCloudDialogflowCxV3beta1ToolCall `json:"toolCall,omitempty"` // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -7099,6 +7102,87 @@ func (s *GoogleCloudDialogflowCxV3beta1TextInput) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1ToolCall: Represents a call of a specific +// tool's action with the specified inputs. +type GoogleCloudDialogflowCxV3beta1ToolCall struct { + // Action: Required. The name of the tool's action associated with this call. + Action string `json:"action,omitempty"` + // InputParameters: Optional. The action's input parameters. + InputParameters googleapi.RawMessage `json:"inputParameters,omitempty"` + // Tool: Required. The tool associated with this call. Format: + // `projects//locations//agents//tools/`. + Tool string `json:"tool,omitempty"` + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *GoogleCloudDialogflowCxV3beta1ToolCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolCall + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolCallResult: The result of calling a tool's +// action that has been executed by the client. +type GoogleCloudDialogflowCxV3beta1ToolCallResult struct { + // Action: Required. The name of the tool's action associated with this call. + Action string `json:"action,omitempty"` + // Error: The tool call's error. + Error *GoogleCloudDialogflowCxV3beta1ToolCallResultError `json:"error,omitempty"` + // OutputParameters: The tool call's output parameters. + OutputParameters googleapi.RawMessage `json:"outputParameters,omitempty"` + // Tool: Required. The tool associated with this call. Format: + // `projects//locations//agents//tools/`. + Tool string `json:"tool,omitempty"` + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *GoogleCloudDialogflowCxV3beta1ToolCallResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolCallResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolCallResultError: An error produced by the +// tool call. +type GoogleCloudDialogflowCxV3beta1ToolCallResultError struct { + // Message: Optional. The error message of the function. + Message string `json:"message,omitempty"` + // 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 *GoogleCloudDialogflowCxV3beta1ToolCallResultError) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolCallResultError + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1TransitionRoute: A transition route specifies // a intent that can be matched and/or a data condition that can be evaluated // during a session. When a specified transition is matched, the following @@ -7908,6 +7992,7 @@ type GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata struct // "SMART_REPLY" - Run smart reply model for chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -9767,6 +9852,162 @@ func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2KnowledgeAssistAnswer: Represents a Knowledge Assist +// answer. +type GoogleCloudDialogflowV2KnowledgeAssistAnswer struct { + // AnswerRecord: The name of the answer record. Format: + // `projects//locations//answer Records/`. + AnswerRecord string `json:"answerRecord,omitempty"` + // SuggestedQuery: The query suggested based on the context. Suggestion is made + // only if it is different from the previous suggestion. + SuggestedQuery *GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery `json:"suggestedQuery,omitempty"` + // SuggestedQueryAnswer: The answer generated for the suggested query. Whether + // or not an answer is generated depends on how confident we are about the + // generated query. + SuggestedQueryAnswer *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer `json:"suggestedQueryAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerRecord") 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. "AnswerRecord") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer: Represents an +// answer from Knowledge. Currently supports FAQ and Generative answers. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer struct { + // AnswerText: The piece of text from the `source` that answers this suggested + // query. + AnswerText string `json:"answerText,omitempty"` + // FaqSource: Populated if the prediction came from FAQ. + FaqSource *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource `json:"faqSource,omitempty"` + // GenerativeSource: Populated if the prediction was Generative. + GenerativeSource *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource `json:"generativeSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerText") 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. "AnswerText") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource: +// Details about source of FAQ answer. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource struct { + // Question: The corresponding FAQ question. + Question string `json:"question,omitempty"` + // ForceSendFields is a list of field names (e.g. "Question") 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. "Question") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource: +// Details about source of Generative answer. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource struct { + // Snippets: All snippets used for this Generative Prediction, with their + // source URI and data. + Snippets []*GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet `json:"snippets,omitempty"` + // ForceSendFields is a list of field names (e.g. "Snippets") 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. "Snippets") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSn +// ippet: Snippet Source for a Generative Prediction. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet struct { + // Text: Text taken from that URI. + Text string `json:"text,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: URI the data is sourced from. + Uri string `json:"uri,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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery: Represents a +// suggested query. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery struct { + // QueryText: Suggested query text. + QueryText string `json:"queryText,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryText") 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. "QueryText") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2KnowledgeOperationMetadata: Metadata in // google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowV2KnowledgeOperationMetadata struct { @@ -10195,6 +10436,7 @@ type GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata struct { // "SMART_REPLY" - Run smart reply model for chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -10349,6 +10591,37 @@ func (s *GoogleCloudDialogflowV2SuggestFaqAnswersResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse: The response message +// for Participants.SuggestKnowledgeAssist. +type GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse struct { + // ContextSize: Number of messages prior to and including latest_message to + // compile the suggestion. It may be smaller than the + // SuggestKnowledgeAssistRequest.context_size field in the request if there are + // fewer messages in the conversation. + ContextSize int64 `json:"contextSize,omitempty"` + // KnowledgeAssistAnswer: Output only. Knowledge Assist suggestion. + KnowledgeAssistAnswer *GoogleCloudDialogflowV2KnowledgeAssistAnswer `json:"knowledgeAssistAnswer,omitempty"` + // LatestMessage: The name of the latest conversation message used to compile + // suggestion for. Format: `projects//locations//conversations//messages/`. + LatestMessage string `json:"latestMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContextSize") 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. "ContextSize") 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 *GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2SuggestSmartRepliesResponse: The response message for // Participants.SuggestSmartReplies. type GoogleCloudDialogflowV2SuggestSmartRepliesResponse struct { @@ -10395,6 +10668,9 @@ type GoogleCloudDialogflowV2SuggestionResult struct { // SuggestFaqAnswersResponse: SuggestFaqAnswersResponse if request is for // FAQ_ANSWER. SuggestFaqAnswersResponse *GoogleCloudDialogflowV2SuggestFaqAnswersResponse `json:"suggestFaqAnswersResponse,omitempty"` + // SuggestKnowledgeAssistResponse: SuggestKnowledgeAssistResponse if request is + // for KNOWLEDGE_ASSIST. + SuggestKnowledgeAssistResponse *GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse `json:"suggestKnowledgeAssistResponse,omitempty"` // SuggestSmartRepliesResponse: SuggestSmartRepliesResponse if request is for // SMART_REPLY. SuggestSmartRepliesResponse *GoogleCloudDialogflowV2SuggestSmartRepliesResponse `json:"suggestSmartRepliesResponse,omitempty"` @@ -10689,6 +10965,8 @@ type GoogleCloudDialogflowV2beta1AgentAssistantFeedback struct { // "INEFFICIENT" - Document is inefficient. // "EFFICIENT" - Document is efficient. DocumentEfficiency string `json:"documentEfficiency,omitempty"` + // KnowledgeAssistFeedback: Optional. Feedback for knowledge assist. + KnowledgeAssistFeedback *GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback `json:"knowledgeAssistFeedback,omitempty"` // KnowledgeSearchFeedback: Optional. Feedback for knowledge search. KnowledgeSearchFeedback *GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback `json:"knowledgeSearchFeedback,omitempty"` // SummarizationFeedback: Feedback for conversation summarization. @@ -10711,6 +10989,35 @@ func (s *GoogleCloudDialogflowV2beta1AgentAssistantFeedback) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback: +// Feedback for knowledge assist. +type GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback struct { + // AnswerCopied: Whether the suggested answer was copied by the human agent. If + // the value is set to be true, AnswerFeedback.clicked will be updated to be + // true. + AnswerCopied bool `json:"answerCopied,omitempty"` + // ClickedUris: The URIs clicked by the human agent. The value is appended for + // each UpdateAnswerRecordRequest. If the value is not empty, + // AnswerFeedback.clicked will be updated to be true. + ClickedUris []string `json:"clickedUris,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerCopied") 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. "AnswerCopied") 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 *GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeAssistFeedback + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback: // Feedback for knowledge search. type GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback struct { @@ -11192,6 +11499,8 @@ type GoogleCloudDialogflowV2beta1AutomatedAgentReply struct { // WARNING: partial reply is not eligible for barge-in. // "FINAL" - Final reply. AutomatedAgentReplyType string `json:"automatedAgentReplyType,omitempty"` + // CallCompanionAuthCode: The auth code for accessing Call Companion UI. + CallCompanionAuthCode string `json:"callCompanionAuthCode,omitempty"` // CxCurrentPage: The unique identifier of the current Dialogflow CX // conversation page. Format: `projects//locations//agents//flows//pages/`. CxCurrentPage string `json:"cxCurrentPage,omitempty"` @@ -11639,6 +11948,7 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata s // chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -11686,6 +11996,7 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigRequest struct { // chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ParticipantRole") to // unconditionally include in API requests. By default, fields with empty or @@ -13408,6 +13719,15 @@ func (s *GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigMessageAnalysisCon // GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig: // Detail human agent assistant config. type GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig struct { + // DisableHighLatencyFeaturesSyncDelivery: Optional. When + // disable_high_latency_features_sync_delivery is true and using the + // AnalyzeContent API, we will not deliver the responses from high latency + // features in the API response. The + // human_agent_assistant_config.notification_config must be configured and + // enable_event_based_suggestion must be set to true to receive the responses + // from high latency features in Pub/Sub. High latency feature(s): + // KNOWLEDGE_ASSIST. + DisableHighLatencyFeaturesSyncDelivery bool `json:"disableHighLatencyFeaturesSyncDelivery,omitempty"` // FeatureConfigs: Configuration of different suggestion features. One feature // can have only one config. FeatureConfigs []*GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfig `json:"featureConfigs,omitempty"` @@ -13424,16 +13744,18 @@ type GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig struc // will be grouped into a single Pub/Sub event or // StreamingAnalyzeContentResponse. GroupSuggestionResponses bool `json:"groupSuggestionResponses,omitempty"` - // ForceSendFields is a list of field names (e.g. "FeatureConfigs") 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. + // "DisableHighLatencyFeaturesSyncDelivery") 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. "FeatureConfigs") 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. + // "DisableHighLatencyFeaturesSyncDelivery") 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:"-"` } @@ -13462,6 +13784,13 @@ type GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfi // tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, // DIALOGFLOW_ASSIST, ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. EnableEventBasedSuggestion bool `json:"enableEventBasedSuggestion,omitempty"` + // EnableQuerySuggestionOnly: Optional. Enable query suggestion only. Supported + // features: KNOWLEDGE_ASSIST + EnableQuerySuggestionOnly bool `json:"enableQuerySuggestionOnly,omitempty"` + // EnableQuerySuggestionWhenNoAnswer: Optional. Enable query suggestion even if + // we can't find its answer. By default, queries are suggested only if we find + // its answer. Supported features: KNOWLEDGE_ASSIST + EnableQuerySuggestionWhenNoAnswer bool `json:"enableQuerySuggestionWhenNoAnswer,omitempty"` // QueryConfig: Configs of query. QueryConfig *GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig `json:"queryConfig,omitempty"` // SuggestionFeature: The suggestion feature. @@ -15936,6 +16265,162 @@ func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data return nil } +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer: Represents a Knowledge +// Assist answer. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer struct { + // AnswerRecord: The name of the answer record. Format: + // `projects//locations//answer Records/`. + AnswerRecord string `json:"answerRecord,omitempty"` + // SuggestedQuery: The query suggested based on the context. Suggestion is made + // only if it is different from the previous suggestion. + SuggestedQuery *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery `json:"suggestedQuery,omitempty"` + // SuggestedQueryAnswer: The answer generated for the suggested query. Whether + // or not an answer is generated depends on how confident we are about the + // generated query. + SuggestedQueryAnswer *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer `json:"suggestedQueryAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerRecord") 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. "AnswerRecord") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer: Represents +// an answer from Knowledge. Currently supports FAQ and Generative answers. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer struct { + // AnswerText: The piece of text from the `source` that answers this suggested + // query. + AnswerText string `json:"answerText,omitempty"` + // FaqSource: Populated if the prediction came from FAQ. + FaqSource *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource `json:"faqSource,omitempty"` + // GenerativeSource: Populated if the prediction was Generative. + GenerativeSource *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource `json:"generativeSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerText") 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. "AnswerText") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource: +// Details about source of FAQ answer. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource struct { + // Question: The corresponding FAQ question. + Question string `json:"question,omitempty"` + // ForceSendFields is a list of field names (e.g. "Question") 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. "Question") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSou +// rce: Details about source of Generative answer. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource struct { + // Snippets: All snippets used for this Generative Prediction, with their + // source URI and data. + Snippets []*GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet `json:"snippets,omitempty"` + // ForceSendFields is a list of field names (e.g. "Snippets") 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. "Snippets") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSou +// rceSnippet: Snippet Source for a Generative Prediction. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet struct { + // Text: Text taken from that URI. + Text string `json:"text,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: URI the data is sourced from. + Uri string `json:"uri,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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery: Represents +// a suggested query. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery struct { + // QueryText: Suggested query text. + QueryText string `json:"queryText,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryText") 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. "QueryText") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1KnowledgeBase: A knowledge base represents a // collection of knowledge documents that you provide to Dialogflow. Your // knowledge documents contain information that may be useful during @@ -17635,6 +18120,7 @@ type GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata str // chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -18140,6 +18626,74 @@ func (s *GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest: The request +// message for Participants.SuggestKnowledgeAssist. +type GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest struct { + // ContextSize: Optional. Max number of messages prior to and including + // latest_message to use as context when compiling the suggestion. The context + // size is by default 100 and at most 100. + ContextSize int64 `json:"contextSize,omitempty"` + // LatestMessage: Optional. The name of the latest conversation message to + // compile suggestions for. If empty, it will be the latest message of the + // conversation. Format: `projects//locations//conversations//messages/`. + LatestMessage string `json:"latestMessage,omitempty"` + // PreviousSuggestedQuery: Optional. The previously suggested query for the + // given conversation. This helps identify whether the next suggestion we + // generate is resonably different from the previous one. This is useful to + // avoid similar suggestions within the conversation. + PreviousSuggestedQuery string `json:"previousSuggestedQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContextSize") 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. "ContextSize") 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 *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse: The response +// message for Participants.SuggestKnowledgeAssist. +type GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse struct { + // ContextSize: Number of messages prior to and including latest_message to + // compile the suggestion. It may be smaller than the + // SuggestKnowledgeAssistRequest.context_size field in the request if there are + // fewer messages in the conversation. + ContextSize int64 `json:"contextSize,omitempty"` + // KnowledgeAssistAnswer: Output only. Knowledge Assist suggestion. + KnowledgeAssistAnswer *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer `json:"knowledgeAssistAnswer,omitempty"` + // LatestMessage: The name of the latest conversation message used to compile + // suggestion for. Format: `projects//locations//conversations//messages/`. + LatestMessage string `json:"latestMessage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ContextSize") 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. "ContextSize") 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 *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest: The request message // for Participants.SuggestSmartReplies. type GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest struct { @@ -18346,6 +18900,7 @@ type GoogleCloudDialogflowV2beta1SuggestionFeature struct { // chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. 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 @@ -18429,6 +18984,9 @@ type GoogleCloudDialogflowV2beta1SuggestionResult struct { // SuggestFaqAnswersResponse: SuggestFaqAnswersResponse if request is for // FAQ_ANSWER. SuggestFaqAnswersResponse *GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse `json:"suggestFaqAnswersResponse,omitempty"` + // SuggestKnowledgeAssistResponse: SuggestKnowledgeAssistResponse if request is + // for KNOWLEDGE_ASSIST. + SuggestKnowledgeAssistResponse *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse `json:"suggestKnowledgeAssistResponse,omitempty"` // SuggestSmartRepliesResponse: SuggestSmartRepliesResponse if request is for // SMART_REPLY. SuggestSmartRepliesResponse *GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse `json:"suggestSmartRepliesResponse,omitempty"` @@ -31564,6 +32122,110 @@ func (c *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Do(o return ret, nil } +type ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall struct { + s *Service + parent string + googleclouddialogflowv2beta1suggestknowledgeassistrequest *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SuggestKnowledgeAssist: Gets knowledge assist suggestions based on +// historical messages. +// +// - parent: The name of the participant to fetch suggestions for. Format: +// `projects//locations//conversations//participants/`. +func (r *ProjectsConversationsParticipantsSuggestionsService) SuggestKnowledgeAssist(parent string, googleclouddialogflowv2beta1suggestknowledgeassistrequest *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest) *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall { + c := &ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2beta1suggestknowledgeassistrequest = googleclouddialogflowv2beta1suggestknowledgeassistrequest + 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 *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Context(ctx context.Context) *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall { + 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 *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1suggestknowledgeassistrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/suggestions:suggestKnowledgeAssist") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.conversations.participants.suggestions.suggestKnowledgeAssist" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse, 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 := &GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsConversationsParticipantsSuggestionsSuggestSmartRepliesCall struct { s *Service parent string @@ -44233,6 +44895,110 @@ func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersC return ret, nil } +type ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall struct { + s *Service + parent string + googleclouddialogflowv2beta1suggestknowledgeassistrequest *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SuggestKnowledgeAssist: Gets knowledge assist suggestions based on +// historical messages. +// +// - parent: The name of the participant to fetch suggestions for. Format: +// `projects//locations//conversations//participants/`. +func (r *ProjectsLocationsConversationsParticipantsSuggestionsService) SuggestKnowledgeAssist(parent string, googleclouddialogflowv2beta1suggestknowledgeassistrequest *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistRequest) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall { + c := &ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2beta1suggestknowledgeassistrequest = googleclouddialogflowv2beta1suggestknowledgeassistrequest + 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 *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall { + 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 *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1suggestknowledgeassistrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/suggestions:suggestKnowledgeAssist") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.conversations.participants.suggestions.suggestKnowledgeAssist" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestKnowledgeAssistCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse, 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 := &GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsConversationsParticipantsSuggestionsSuggestSmartRepliesCall struct { s *Service parent string diff --git a/dialogflow/v3beta1/dialogflow-api.json b/dialogflow/v3beta1/dialogflow-api.json index ca3dbbaa58c..d6402e93131 100644 --- a/dialogflow/v3beta1/dialogflow-api.json +++ b/dialogflow/v3beta1/dialogflow-api.json @@ -3131,6 +3131,449 @@ } } }, + "playbooks": { + "methods": { + "create": { + "description": "Creates a playbook in a specified agent.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agents.playbooks.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The agent to create a playbook for. Format: `projects//locations//agents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/playbooks", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1Playbook" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Playbook" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes a specified playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agents.playbooks.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the playbook to delete. Format: `projects//locations//agents//playbooks/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified Playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.playbooks.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the playbook. Format: `projects//locations//agents//playbooks/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Playbook" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns a list of playbooks in the specified agent.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.playbooks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list playbooks from. Format: `projects//locations//agents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/playbooks", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified Playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agents.playbooks.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of the playbook. Format: `projects//locations//agents//playbooks/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1Playbook" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Playbook" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "examples": { + "methods": { + "create": { + "description": "Creates an example in the specified playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/examples", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agents.playbooks.examples.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The playbook to create an example for. Format: `projects//locations//agents//playbooks/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/examples", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified example.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/examples/{examplesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agents.playbooks.examples.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the example to delete. Format: `projects//locations//agents//playbooks//examples/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+/examples/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified example.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/examples/{examplesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.playbooks.examples.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the example. Format: `projects//locations//agents//playbooks//examples/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+/examples/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns a list of examples in the specified playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/examples", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.playbooks.examples.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language to list examples for. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The playbook to list the examples from. Format: `projects//locations//agents//playbooks/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/examples", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1ListExamplesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Update the specified example.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/examples/{examplesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agents.playbooks.examples.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of the playbook example. Format: `projects//locations//agents//playbooks//examples/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+/examples/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "versions": { + "methods": { + "create": { + "description": "Creates a version for the specified Playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/versions", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agents.playbooks.versions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The playbook to create a version for. Format: `projects//locations//agents//playbooks/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/versions", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookVersion" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified version of the Playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/versions/{versionsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agents.playbooks.versions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the playbook version to delete. Format: `projects//locations//agents//playbooks//versions/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified version of the Playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/versions/{versionsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.playbooks.versions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the playbook version. Format: `projects//locations//agents//playbooks//versions/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Lists versions for the specified Playbook.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/playbooks/{playbooksId}/versions", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.playbooks.versions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The playbook to list versions for. Format: `projects//locations//agents//playbooks/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/playbooks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/versions", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + }, "sessions": { "methods": { "detectIntent": { @@ -3847,6 +4290,197 @@ } } }, + "tools": { + "methods": { + "create": { + "description": "Creates a Tool in the specified agent.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/tools", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agents.tools.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The agent to create a Tool for. Format: `projects//locations//agents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/tools", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1Tool" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Tool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes a specified Tool.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/tools/{toolsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agents.tools.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "This field has no effect for Tools not being used. For Tools that are used: * If `force` is set to false, an error will be returned with message indicating the referenced resources. * If `force` is set to true, Dialogflow will remove the tool, as well as any references to the tool.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the Tool to be deleted. Format: `projects//locations//agents//tools/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/tools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "export": { + "description": "Exports the selected tools.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/tools:export", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agents.tools.export", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The agent to export tools from. Format: `projects//locations//agents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/tools:export", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1ExportToolsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified Tool.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/tools/{toolsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.tools.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Tool. Format: `projects//locations//agents//tools/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/tools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Tool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns a list of Tools in the specified agent.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/tools", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.tools.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list the Tools from. Format: `projects//locations//agents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+parent}/tools", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1ListToolsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Update the specified Tool.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/tools/{toolsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agents.tools.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of the Tool. Format: `projects//locations//agents//tools/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/tools/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1Tool" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1Tool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, "transitionRouteGroups": { "methods": { "create": { @@ -4551,7 +5185,7 @@ } } }, - "revision": "20240507", + "revision": "20240605", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -4612,11 +5246,11 @@ "id": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", "properties": { "enableInteractionLogging": { - "description": "If true, DF Interaction logging is currently enabled.", + "description": "Enables DF Interaction logging.", "type": "boolean" }, "enableStackdriverLogging": { - "description": "If true, StackDriver logging is currently enabled.", + "description": "Enables StackDriver logging.", "type": "boolean" } }, @@ -6944,6 +7578,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1Action": { + "description": "Action performed by end user or Dialogflow agent in the conversation.", + "id": "GoogleCloudDialogflowCxV3beta1Action", + "properties": { + "agentUtterance": { + "$ref": "GoogleCloudDialogflowCxV3beta1AgentUtterance", + "description": "Optional. Action performed by the agent as a message." + }, + "flowInvocation": { + "$ref": "GoogleCloudDialogflowCxV3beta1FlowInvocation", + "description": "Optional. Action performed on behalf of the agent by invoking a CX flow." + }, + "playbookInvocation": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookInvocation", + "description": "Optional. Action performed on behalf of the agent by invoking a child playbook." + }, + "toolUse": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolUse", + "description": "Optional. Action performed on behalf of the agent by calling a plugin tool." + }, + "userUtterance": { + "$ref": "GoogleCloudDialogflowCxV3beta1UserUtterance", + "description": "Optional. Agent obtained a message from the customer." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AdvancedSettings": { "description": "Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\u003eFlow-\u003ePage-\u003eFulfillment/Parameter.", "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", @@ -7002,11 +7663,11 @@ "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", "properties": { "enableInteractionLogging": { - "description": "If true, DF Interaction logging is currently enabled.", + "description": "Enables DF Interaction logging.", "type": "boolean" }, "enableStackdriverLogging": { - "description": "If true, StackDriver logging is currently enabled.", + "description": "Enables StackDriver logging.", "type": "boolean" } }, @@ -7110,7 +7771,11 @@ "description": "Speech recognition related settings." }, "startFlow": { - "description": "Immutable. Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: `projects//locations//agents//flows/`.", + "description": "Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: `projects//locations//agents//flows/`. Currently only the default start flow with id \"00000000-0000-0000-0000-000000000000\" is allowed.", + "type": "string" + }, + "startPlaybook": { + "description": "Name of the start playbook in this agent. A start playbook will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: `projects//locations//agents//playbooks/`. Currently only the default playbook with id \"00000000-0000-0000-0000-000000000000\" is allowed.", "type": "string" }, "supportedLanguageCodes": { @@ -7209,6 +7874,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AgentUtterance": { + "description": "AgentUtterance represents one message sent by the agent.", + "id": "GoogleCloudDialogflowCxV3beta1AgentUtterance", + "properties": { + "text": { + "description": "Required. Message content in text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AgentValidationResult": { "description": "The response message for Agents.GetAgentValidationResult.", "id": "GoogleCloudDialogflowCxV3beta1AgentValidationResult", @@ -8581,19 +9257,95 @@ "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, - "triggerFulfillment": { - "$ref": "GoogleCloudDialogflowCxV3beta1Fulfillment", - "description": "The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1EventInput": { - "description": "Represents the event to trigger.", - "id": "GoogleCloudDialogflowCxV3beta1EventInput", - "properties": { - "event": { - "description": "Name of the event.", + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3beta1Fulfillment", + "description": "The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1EventInput": { + "description": "Represents the event to trigger.", + "id": "GoogleCloudDialogflowCxV3beta1EventInput", + "properties": { + "event": { + "description": "Name of the event.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1Example": { + "description": "Example represents a sample execution of the playbook in the conversation. An example consists of a list of ordered actions performed by end user or Dialogflow agent according the playbook instructions to fulfill the task.", + "id": "GoogleCloudDialogflowCxV3beta1Example", + "properties": { + "actions": { + "description": "Required. The ordered list of actions performed by the end user and the Dialogflow agent.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1Action" + }, + "type": "array" + }, + "conversationState": { + "description": "Required. Example's output state.", + "enum": [ + "OUTPUT_STATE_UNSPECIFIED", + "OUTPUT_STATE_OK", + "OUTPUT_STATE_CANCELLED", + "OUTPUT_STATE_FAILED", + "OUTPUT_STATE_ESCALATED", + "OUTPUT_STATE_PENDING" + ], + "enumDescriptions": [ + "Unspecified output.", + "Succeeded.", + "Cancelled.", + "Failed.", + "Escalated.", + "Pending." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp of initial example creation.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. The high level concise description of the example. The max number of characters is 200.", + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the example.", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used.", + "type": "string" + }, + "name": { + "description": "The unique identifier of the playbook example. Format: `projects//locations//agents//playbooks//examples/`.", + "type": "string" + }, + "playbookInput": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookInput", + "description": "Optional. The input to the playbook in the example." + }, + "playbookOutput": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookOutput", + "description": "Optional. The output of the playbook in the example." + }, + "tokenCount": { + "description": "Output only. Estimated number of tokes current example takes when sent to the LLM.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last time the example was updated.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, @@ -9103,6 +9855,42 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ExportToolsRequest": { + "description": "The request message for Tools.ExportTools.", + "id": "GoogleCloudDialogflowCxV3beta1ExportToolsRequest", + "properties": { + "dataFormat": { + "description": "Optional. The data format of the exported tools. If not specified, `BLOB` is assumed.", + "enum": [ + "DATA_FORMAT_UNSPECIFIED", + "BLOB", + "JSON" + ], + "enumDescriptions": [ + "Unspecified format. Treated as `BLOB`.", + "Tools will be exported as raw bytes.", + "Tools will be exported in JSON format." + ], + "type": "string" + }, + "tools": { + "description": "Required. The name of the tools to export. Format: `projects//locations//agents//tools/`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "toolsContentInline": { + "description": "Optional. The option to return the serialized tools inline.", + "type": "boolean" + }, + "toolsUri": { + "description": "Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to export the tools to. The format of this URI must be `gs:///`. Dialogflow performs a write operation for the Cloud Storage object on the caller's behalf, so your request authentication must have write permissions for the object. For more information, see [Dialogflow access control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1FilterSpecs": { "description": "Filter specifications for data stores.", "id": "GoogleCloudDialogflowCxV3beta1FilterSpecs", @@ -9204,6 +9992,53 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1FlowInvocation": { + "description": "Stores metadata of the invocation of a CX flow. Next Id: 7", + "id": "GoogleCloudDialogflowCxV3beta1FlowInvocation", + "properties": { + "flow": { + "description": "Required. The unique identifier of the flow. Format: `projects//locations//agents/`.", + "type": "string" + }, + "flowState": { + "description": "Required. Flow invocation's output state.", + "enum": [ + "OUTPUT_STATE_UNSPECIFIED", + "OUTPUT_STATE_OK", + "OUTPUT_STATE_CANCELLED", + "OUTPUT_STATE_FAILED", + "OUTPUT_STATE_ESCALATED", + "OUTPUT_STATE_PENDING" + ], + "enumDescriptions": [ + "Unspecified output.", + "Succeeded.", + "Cancelled.", + "Failed.", + "Escalated.", + "Pending." + ], + "type": "string" + }, + "inputActionParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. A list of input parameters for the flow.", + "type": "object" + }, + "outputActionParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. A list of output parameters generated by the flow invocation.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1FlowMultiLanguageSettings": { "description": "Settings for multi-lingual agents.", "id": "GoogleCloudDialogflowCxV3beta1FlowMultiLanguageSettings", @@ -9480,6 +10315,24 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1GenerativeInfo": { + "description": "Represents the information of a query if handled by generative agent resources.", + "id": "GoogleCloudDialogflowCxV3beta1GenerativeInfo", + "properties": { + "actionTracingInfo": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example", + "description": "The actions performed by the generative playbook for the current agent response." + }, + "currentPlaybooks": { + "description": "The stack of playbooks that the conversation has currently entered, with the most recent one on the top.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1GenerativeSettings": { "description": "Settings for Generative AI.", "id": "GoogleCloudDialogflowCxV3beta1GenerativeSettings", @@ -9500,6 +10353,10 @@ "description": "Language for this settings.", "type": "string" }, + "llmModelSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1LlmModelSettings", + "description": "LLM model settings." + }, "name": { "description": "Format: `projects//locations//agents//generativeSettings`.", "type": "string" @@ -9583,6 +10440,10 @@ "description": "Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.", "type": "string" }, + "llmModelSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1LlmModelSettings", + "description": "The LLM model settings." + }, "name": { "description": "The unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: `projects//locations//agents//generators/`.", "type": "string" @@ -10364,6 +11225,24 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ListExamplesResponse": { + "description": "The response message for Examples.ListExamples.", + "id": "GoogleCloudDialogflowCxV3beta1ListExamplesResponse", + "properties": { + "examples": { + "description": "The list of examples. There will be a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ListExperimentsResponse": { "description": "The response message for Experiments.ListExperiments.", "id": "GoogleCloudDialogflowCxV3beta1ListExperimentsResponse", @@ -10454,6 +11333,42 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse": { + "description": "The response message for Playbooks.ListPlaybookVersions.", + "id": "GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "playbookVersions": { + "description": "The list of playbook version. There will be a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse": { + "description": "The response message for Playbooks.ListPlaybooks.", + "id": "GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "playbooks": { + "description": "The list of playbooks. There will be a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1Playbook" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ListSecuritySettingsResponse": { "description": "The response message for SecuritySettings.ListSecuritySettings.", "id": "GoogleCloudDialogflowCxV3beta1ListSecuritySettingsResponse", @@ -10526,6 +11441,24 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ListToolsResponse": { + "description": "The response message for Tools.ListTools.", + "id": "GoogleCloudDialogflowCxV3beta1ListToolsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "tools": { + "description": "The list of Tools. There will be a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1Tool" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse": { "description": "The response message for TransitionRouteGroups.ListTransitionRouteGroups.", "id": "GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse", @@ -10580,6 +11513,21 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1LlmModelSettings": { + "description": "Settings for LLM models.", + "id": "GoogleCloudDialogflowCxV3beta1LlmModelSettings", + "properties": { + "model": { + "description": "The selected LLM model.", + "type": "string" + }, + "promptText": { + "description": "The custom prompt to use.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1LoadVersionRequest": { "description": "The request message for Versions.LoadVersion.", "id": "GoogleCloudDialogflowCxV3beta1LoadVersionRequest", @@ -10915,19 +11863,281 @@ ], "type": "string" }, - "value": { - "description": "Optional for both WebhookRequest and WebhookResponse. The value of the parameter. This field can be set by the webhook to change the parameter value.", - "type": "any" + "value": { + "description": "Optional for both WebhookRequest and WebhookResponse. The value of the parameter. This field can be set by the webhook to change the parameter value.", + "type": "any" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ParameterDefinition": { + "description": "Defines the properties of a parameter. Used to define parameters used in the agent and the input / output parameters for each fulfillment.", + "id": "GoogleCloudDialogflowCxV3beta1ParameterDefinition", + "properties": { + "description": { + "description": "Human-readable description of the parameter. Limited to 300 characters.", + "type": "string" + }, + "name": { + "description": "Required. Name of parameter.", + "type": "string" + }, + "type": { + "description": "Required. Type of parameter.", + "enum": [ + "PARAMETER_TYPE_UNSPECIFIED", + "STRING", + "NUMBER", + "BOOLEAN", + "NULL", + "OBJECT", + "LIST" + ], + "enumDescriptions": [ + "Not specified. No validation will be performed.", + "Represents any string value.", + "Represents any number value.", + "Represents a boolean value.", + "Represents a null value.", + "Represents any object value.", + "Represents a repeated value." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1Phrase": { + "description": "Text input which can be used for prompt or banned phrases.", + "id": "GoogleCloudDialogflowCxV3beta1Phrase", + "properties": { + "text": { + "description": "Required. Text input which can be used for prompt or banned phrases.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1Playbook": { + "description": "Playbook is the basic building block to instruct the LLM how to execute a certain task. A playbook consists of a goal to accomplish, an optional list of step by step instructions (the step instruction may refers to name of the custom or default plugin tools to use) to perform the task, a list of contextual input data to be passed in at the beginning of the invoked, and a list of output parameters to store the playbook result.", + "id": "GoogleCloudDialogflowCxV3beta1Playbook", + "properties": { + "createTime": { + "description": "Output only. The timestamp of initial playbook creation.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The human-readable name of the playbook, unique within an agent.", + "type": "string" + }, + "goal": { + "description": "Required. High level description of the goal the playbook intend to accomplish.", + "type": "string" + }, + "inputParameterDefinitions": { + "description": "Optional. Defined structured input parameters for this playbook.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1ParameterDefinition" + }, + "type": "array" + }, + "instruction": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookInstruction", + "description": "Instruction to accomplish target goal." + }, + "llmModelSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1LlmModelSettings", + "description": "Optional. Llm model settings for the playbook." + }, + "name": { + "description": "The unique identifier of the playbook. Format: `projects//locations//agents//playbooks/`.", + "type": "string" + }, + "outputParameterDefinitions": { + "description": "Optional. Defined structured output parameters for this playbook.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1ParameterDefinition" + }, + "type": "array" + }, + "referencedFlows": { + "description": "Output only. The resource name of flows referenced by the current playbook in the instructions.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "referencedPlaybooks": { + "description": "Output only. The resource name of other playbooks referenced by the current playbook in the instructions.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "referencedTools": { + "description": "Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps.", + "items": { + "type": "string" + }, + "type": "array" + }, + "tokenCount": { + "description": "Output only. Estimated number of tokes current playbook takes when sent to the LLM.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last time the playbook version was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1PlaybookInput": { + "description": "Input of the playbook.", + "id": "GoogleCloudDialogflowCxV3beta1PlaybookInput", + "properties": { + "actionParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. A list of input parameters for the action.", + "type": "object" + }, + "precedingConversationSummary": { + "description": "Optional. Summary string of the preceding conversation for the child playbook invocation.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1PlaybookInstruction": { + "description": "Message of the Instruction of the playbook.", + "id": "GoogleCloudDialogflowCxV3beta1PlaybookInstruction", + "properties": { + "steps": { + "description": "Ordered list of step by step execution instructions to accomplish target goal.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookStep" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1PlaybookInvocation": { + "description": "Stores metadata of the invocation of a child playbook. Next Id: 5", + "id": "GoogleCloudDialogflowCxV3beta1PlaybookInvocation", + "properties": { + "playbook": { + "description": "Required. The unique identifier of the playbook. Format: `projects//locations//agents//playbooks/`.", + "type": "string" + }, + "playbookInput": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookInput", + "description": "Optional. Input of the child playbook invocation." + }, + "playbookOutput": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookOutput", + "description": "Optional. Output of the child playbook invocation." + }, + "playbookState": { + "description": "Required. Playbook invocation's output state.", + "enum": [ + "OUTPUT_STATE_UNSPECIFIED", + "OUTPUT_STATE_OK", + "OUTPUT_STATE_CANCELLED", + "OUTPUT_STATE_FAILED", + "OUTPUT_STATE_ESCALATED", + "OUTPUT_STATE_PENDING" + ], + "enumDescriptions": [ + "Unspecified output.", + "Succeeded.", + "Cancelled.", + "Failed.", + "Escalated.", + "Pending." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1PlaybookOutput": { + "description": "Output of the playbook.", + "id": "GoogleCloudDialogflowCxV3beta1PlaybookOutput", + "properties": { + "actionParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. A Struct object of output parameters for the action.", + "type": "object" + }, + "executionSummary": { + "description": "Optional. Summary string of the execution result of the child playbook.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1Phrase": { - "description": "Text input which can be used for prompt or banned phrases.", - "id": "GoogleCloudDialogflowCxV3beta1Phrase", + "GoogleCloudDialogflowCxV3beta1PlaybookStep": { + "description": "Message of single step execution.", + "id": "GoogleCloudDialogflowCxV3beta1PlaybookStep", "properties": { + "steps": { + "description": "Sub-processing needed to execute the current step.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1PlaybookStep" + }, + "type": "array" + }, "text": { - "description": "Required. Text input which can be used for prompt or banned phrases.", + "description": "Step instruction in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1PlaybookVersion": { + "description": "Playbook version is a snapshot of the playbook at certain timestamp.", + "id": "GoogleCloudDialogflowCxV3beta1PlaybookVersion", + "properties": { + "description": { + "description": "Optional. The description of the playbook version.", + "type": "string" + }, + "examples": { + "description": "Output only. Snapshot of the examples belonging to the playbook when the playbook version is created.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1Example" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "The unique identifier of the playbook version. Format: `projects//locations//agents//playbooks//versions/`.", + "type": "string" + }, + "playbook": { + "$ref": "GoogleCloudDialogflowCxV3beta1Playbook", + "description": "Output only. Snapshot of the playbook when the playbook version is created.", + "readOnly": true + }, + "updateTime": { + "description": "Output only. Last time the playbook version was created or modified.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, @@ -10960,6 +12170,10 @@ "text": { "$ref": "GoogleCloudDialogflowCxV3beta1TextInput", "description": "The natural language text to be processed." + }, + "toolCallResult": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolCallResult", + "description": "The results of a tool executed by the client." } }, "type": "object" @@ -10980,6 +12194,10 @@ "description": "The unique identifier of the page to override the current page in the session. Format: `projects//locations//agents//flows//pages/`. If `current_page` is specified, the previous state of the session will be ignored by Dialogflow, including the previous page and the previous session parameters. In most cases, current_page and parameters should be configured together to direct a session to a specific state.", "type": "string" }, + "currentPlaybook": { + "description": "Optional. Start the session with the specified playbook. You can only specify the playbook at the beginning of the session. Otherwise, an error will be thrown. Format: `projects//locations//agents//playbooks/`.", + "type": "string" + }, "disableWebhook": { "description": "Whether to disable webhook calls for this request.", "type": "boolean" @@ -11003,6 +12221,10 @@ "$ref": "GoogleTypeLatLng", "description": "The geo location of this conversational query." }, + "llmModelSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1LlmModelSettings", + "description": "Optional. Use the specified LLM model settings for processing the request." + }, "parameters": { "additionalProperties": { "description": "Properties of the object.", @@ -11065,6 +12287,10 @@ "description": "Indicates whether the Thumbs up/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget.", "type": "boolean" }, + "currentFlow": { + "$ref": "GoogleCloudDialogflowCxV3beta1Flow", + "description": "The current Flow. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`." + }, "currentPage": { "$ref": "GoogleCloudDialogflowCxV3beta1Page", "description": "The current Page. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`." @@ -11085,6 +12311,10 @@ "$ref": "GoogleCloudDialogflowCxV3beta1DtmfInput", "description": "If a DTMF was provided as input, this field will contain a copy of the DtmfInput." }, + "generativeInfo": { + "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeInfo", + "description": "The information of a query if handled by generative agent resources." + }, "intent": { "$ref": "GoogleCloudDialogflowCxV3beta1Intent", "deprecated": true, @@ -11268,6 +12498,10 @@ "text": { "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageText", "description": "Returns a text response." + }, + "toolCall": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolCall", + "description": "Returns the definition of a tool call that should be executed by the client." } }, "type": "object" @@ -12016,100 +13250,434 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1TestConfig": { - "description": "Represents configurations for a test case.", - "id": "GoogleCloudDialogflowCxV3beta1TestConfig", + "GoogleCloudDialogflowCxV3beta1TestConfig": { + "description": "Represents configurations for a test case.", + "id": "GoogleCloudDialogflowCxV3beta1TestConfig", + "properties": { + "flow": { + "description": "Flow name to start the test case with. Format: `projects//locations//agents//flows/`. Only one of `flow` and `page` should be set to indicate the starting point of the test case. If both are set, `page` takes precedence over `flow`. If neither is set, the test case will start with start page on the default start flow.", + "type": "string" + }, + "page": { + "description": "The page to start the test case with. Format: `projects//locations//agents//flows//pages/`. Only one of `flow` and `page` should be set to indicate the starting point of the test case. If both are set, `page` takes precedence over `flow`. If neither is set, the test case will start with start page on the default start flow.", + "type": "string" + }, + "trackingParameters": { + "description": "Session parameters to be compared when calculating differences.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1TestError": { + "description": "Error info for running a test.", + "id": "GoogleCloudDialogflowCxV3beta1TestError", + "properties": { + "status": { + "$ref": "GoogleRpcStatus", + "description": "The status associated with the test." + }, + "testCase": { + "description": "The test case resource name.", + "type": "string" + }, + "testTime": { + "description": "The timestamp when the test was completed.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1TestRunDifference": { + "description": "The description of differences between original and replayed agent output.", + "id": "GoogleCloudDialogflowCxV3beta1TestRunDifference", + "properties": { + "description": { + "description": "A human readable description of the diff, showing the actual output vs expected output.", + "type": "string" + }, + "type": { + "description": "The type of diff.", + "enum": [ + "DIFF_TYPE_UNSPECIFIED", + "INTENT", + "PAGE", + "PARAMETERS", + "UTTERANCE", + "FLOW" + ], + "enumDescriptions": [ + "Should never be used.", + "The intent.", + "The page.", + "The parameters.", + "The message utterance.", + "The flow." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1TextInput": { + "description": "Represents the natural language text to be processed.", + "id": "GoogleCloudDialogflowCxV3beta1TextInput", + "properties": { + "text": { + "description": "Required. The UTF-8 encoded natural language text to be processed.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1TextToSpeechSettings": { + "description": "Settings related to speech synthesizing.", + "id": "GoogleCloudDialogflowCxV3beta1TextToSpeechSettings", + "properties": { + "synthesizeSpeechConfigs": { + "additionalProperties": { + "$ref": "GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig" + }, + "description": "Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/cx/docs/reference/language) to SynthesizeSpeechConfig. These settings affect: - The [phone gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) synthesize configuration set via Agent.text_to_speech_settings. - How speech is synthesized when invoking session APIs. Agent.text_to_speech_settings only applies if OutputAudioConfig.synthesize_speech_config is not specified.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1Tool": { + "description": "A tool provides a list of actions which are available to the Playbook to attain its goal. A Tool consists of a description of the tool's usage and a specification of the tool which contains the schema and authentication information.", + "id": "GoogleCloudDialogflowCxV3beta1Tool", + "properties": { + "dataStoreSpec": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolDataStoreTool", + "description": "Data store search tool specification." + }, + "description": { + "description": "Required. High level description of the Tool and its usage.", + "type": "string" + }, + "displayName": { + "description": "Required. The human-readable name of the Tool, unique within an agent.", + "type": "string" + }, + "extensionSpec": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolExtensionTool", + "description": "Vertex extension tool specification." + }, + "functionSpec": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolFunctionTool", + "description": "Client side executed function specification." + }, + "name": { + "description": "The unique identifier of the Tool. Format: `projects//locations//agents//tools/`.", + "type": "string" + }, + "openApiSpec": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolOpenApiTool", + "description": "OpenAPI specification of the Tool." + }, + "toolType": { + "description": "Output only. The tool type.", + "enum": [ + "TOOL_TYPE_UNSPECIFIED", + "CUSTOMIZED_TOOL", + "BUILTIN_TOOL" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Customer provided tool.", + "First party built-in tool created by Dialogflow which cannot be modified." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolAuthentication": { + "description": "Authentication information required for API calls", + "id": "GoogleCloudDialogflowCxV3beta1ToolAuthentication", + "properties": { + "apiKeyConfig": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig", + "description": "Config for API key auth." + }, + "oauthConfig": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig", + "description": "Config for OAuth." + }, + "serviceAgentAuthConfig": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig", + "description": "Config for [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) auth." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig": { + "description": "Config for authentication with API key.", + "id": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig", + "properties": { + "apiKey": { + "description": "Required. The API key.", + "type": "string" + }, + "keyName": { + "description": "Required. The parameter name or the header name of the API key. E.g., If the API request is \"https://example.com/act?X-Api-Key=\", \"X-Api-Key\" would be the parameter name.", + "type": "string" + }, + "requestLocation": { + "description": "Required. Key location in the request.", + "enum": [ + "REQUEST_LOCATION_UNSPECIFIED", + "HEADER", + "QUERY_STRING" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents the key in http header.", + "Represents the key in query string." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig": { + "description": "Config for authentication with OAuth.", + "id": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig", + "properties": { + "clientId": { + "description": "Required. The client ID from the OAuth provider.", + "type": "string" + }, + "clientSecret": { + "description": "Required. The client secret from the OAuth provider.", + "type": "string" + }, + "oauthGrantType": { + "description": "Required. OAuth grant types.", + "enum": [ + "OAUTH_GRANT_TYPE_UNSPECIFIED", + "CLIENT_CREDENTIAL" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents the [client credential flow](https://oauth.net/2/grant-types/client-credentials)." + ], + "type": "string" + }, + "tokenEndpoint": { + "description": "Required. The token endpoint in the OAuth provider to exchange for an access token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig": { + "description": "Config for auth using [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).", + "id": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolCall": { + "description": "Represents a call of a specific tool's action with the specified inputs.", + "id": "GoogleCloudDialogflowCxV3beta1ToolCall", + "properties": { + "action": { + "description": "Required. The name of the tool's action associated with this call.", + "type": "string" + }, + "inputParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The action's input parameters.", + "type": "object" + }, + "tool": { + "description": "Required. The tool associated with this call. Format: `projects//locations//agents//tools/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolCallResult": { + "description": "The result of calling a tool's action that has been executed by the client.", + "id": "GoogleCloudDialogflowCxV3beta1ToolCallResult", + "properties": { + "action": { + "description": "Required. The name of the tool's action associated with this call.", + "type": "string" + }, + "error": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolCallResultError", + "description": "The tool call's error." + }, + "outputParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The tool call's output parameters.", + "type": "object" + }, + "tool": { + "description": "Required. The tool associated with this call. Format: `projects//locations//agents//tools/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolCallResultError": { + "description": "An error produced by the tool call.", + "id": "GoogleCloudDialogflowCxV3beta1ToolCallResultError", + "properties": { + "message": { + "description": "Optional. The error message of the function.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolDataStoreTool": { + "description": "A DataStoreTool is a way to provide specifications needed to search a list of data stores.", + "id": "GoogleCloudDialogflowCxV3beta1ToolDataStoreTool", "properties": { - "flow": { - "description": "Flow name to start the test case with. Format: `projects//locations//agents//flows/`. Only one of `flow` and `page` should be set to indicate the starting point of the test case. If both are set, `page` takes precedence over `flow`. If neither is set, the test case will start with start page on the default start flow.", - "type": "string" - }, - "page": { - "description": "The page to start the test case with. Format: `projects//locations//agents//flows//pages/`. Only one of `flow` and `page` should be set to indicate the starting point of the test case. If both are set, `page` takes precedence over `flow`. If neither is set, the test case will start with start page on the default start flow.", - "type": "string" - }, - "trackingParameters": { - "description": "Session parameters to be compared when calculating differences.", + "dataStoreConnections": { + "description": "Required. List of data stores to search.", "items": { - "type": "string" + "$ref": "GoogleCloudDialogflowCxV3beta1DataStoreConnection" }, "type": "array" + }, + "fallbackPrompt": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolDataStoreToolFallbackPrompt", + "description": "Required. Fallback prompt configurations to use." } }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1TestError": { - "description": "Error info for running a test.", - "id": "GoogleCloudDialogflowCxV3beta1TestError", + "GoogleCloudDialogflowCxV3beta1ToolDataStoreToolFallbackPrompt": { + "description": "A FallbackPrompt is a way to provide specifications for the Data Store fallback prompt when generating responses.", + "id": "GoogleCloudDialogflowCxV3beta1ToolDataStoreToolFallbackPrompt", + "properties": {}, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolExtensionTool": { + "description": "An ExtensionTool is a way to use Vertex Extensions as a tool.", + "id": "GoogleCloudDialogflowCxV3beta1ToolExtensionTool", "properties": { - "status": { - "$ref": "GoogleRpcStatus", - "description": "The status associated with the test." - }, - "testCase": { - "description": "The test case resource name.", + "name": { + "description": "Required. The full name of the referenced vertex extension. Formats: `projects/{project}/locations/{location}/extensions/{extension}`", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolFunctionTool": { + "description": "A Function tool describes the functions to be invoked on the client side.", + "id": "GoogleCloudDialogflowCxV3beta1ToolFunctionTool", + "properties": { + "inputSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object.", + "type": "object" }, - "testTime": { - "description": "The timestamp when the test was completed.", - "format": "google-datetime", - "type": "string" + "outputSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1TestRunDifference": { - "description": "The description of differences between original and replayed agent output.", - "id": "GoogleCloudDialogflowCxV3beta1TestRunDifference", + "GoogleCloudDialogflowCxV3beta1ToolOpenApiTool": { + "description": "An OpenAPI tool is a way to provide the Tool specifications in the Open API schema format.", + "id": "GoogleCloudDialogflowCxV3beta1ToolOpenApiTool", "properties": { - "description": { - "description": "A human readable description of the diff, showing the actual output vs expected output.", - "type": "string" + "authentication": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolAuthentication", + "description": "Optional. Authentication information required by the API." }, - "type": { - "description": "The type of diff.", - "enum": [ - "DIFF_TYPE_UNSPECIFIED", - "INTENT", - "PAGE", - "PARAMETERS", - "UTTERANCE", - "FLOW" - ], - "enumDescriptions": [ - "Should never be used.", - "The intent.", - "The page.", - "The parameters.", - "The message utterance.", - "The flow." - ], + "textSchema": { + "description": "Required. The OpenAPI schema specified as a text.", "type": "string" + }, + "tlsConfig": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolTLSConfig", + "description": "Optional. TLS configuration for the HTTPS verification." } }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1TextInput": { - "description": "Represents the natural language text to be processed.", - "id": "GoogleCloudDialogflowCxV3beta1TextInput", + "GoogleCloudDialogflowCxV3beta1ToolTLSConfig": { + "description": "The TLS configuration.", + "id": "GoogleCloudDialogflowCxV3beta1ToolTLSConfig", "properties": { - "text": { - "description": "Required. The UTF-8 encoded natural language text to be processed.", + "caCerts": { + "description": "Required. Specifies a list of allowed custom CA certificates for HTTPS verification.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert": { + "description": "The CA certificate.", + "id": "GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert", + "properties": { + "cert": { + "description": "Required. The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with \"subject alt name\". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile \u003c(printf \"\\nsubjectAltName='DNS:www.example.com'\")", + "format": "byte", + "type": "string" + }, + "displayName": { + "description": "Required. The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates.", "type": "string" } }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1TextToSpeechSettings": { - "description": "Settings related to speech synthesizing.", - "id": "GoogleCloudDialogflowCxV3beta1TextToSpeechSettings", + "GoogleCloudDialogflowCxV3beta1ToolUse": { + "description": "Stores metadata of the invocation of an action supported by a tool.", + "id": "GoogleCloudDialogflowCxV3beta1ToolUse", "properties": { - "synthesizeSpeechConfigs": { + "action": { + "description": "Optional. Name of the action to be called during the tool use.", + "type": "string" + }, + "inputActionParameters": { "additionalProperties": { - "$ref": "GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig" + "description": "Properties of the object.", + "type": "any" }, - "description": "Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/cx/docs/reference/language) to SynthesizeSpeechConfig. These settings affect: - The [phone gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) synthesize configuration set via Agent.text_to_speech_settings. - How speech is synthesized when invoking session APIs. Agent.text_to_speech_settings only applies if OutputAudioConfig.synthesize_speech_config is not specified.", + "description": "Optional. A list of input parameters for the action.", + "type": "object" + }, + "outputActionParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. A list of output parameters generated by the action.", "type": "object" + }, + "tool": { + "description": "Required. The tool that should be used. Format: `projects//locations//agents//tools/`.", + "type": "string" } }, "type": "object" @@ -12377,6 +13945,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1UserUtterance": { + "description": "UserUtterance represents one message sent by the customer.", + "id": "GoogleCloudDialogflowCxV3beta1UserUtterance", + "properties": { + "text": { + "description": "Required. Message content in text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ValidateAgentRequest": { "description": "The request message for Agents.ValidateAgent.", "id": "GoogleCloudDialogflowCxV3beta1ValidateAgentRequest", @@ -13130,14 +14709,16 @@ "ARTICLE_SUGGESTION", "FAQ", "SMART_REPLY", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", "Run smart reply model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -14570,6 +16151,99 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswer": { + "description": "Represents a Knowledge Assist answer.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswer", + "properties": { + "answerRecord": { + "description": "The name of the answer record. Format: `projects//locations//answer Records/`.", + "type": "string" + }, + "suggestedQuery": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery", + "description": "The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion." + }, + "suggestedQueryAnswer": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer", + "description": "The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer": { + "description": "Represents an answer from Knowledge. Currently supports FAQ and Generative answers.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer", + "properties": { + "answerText": { + "description": "The piece of text from the `source` that answers this suggested query.", + "type": "string" + }, + "faqSource": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "description": "Populated if the prediction came from FAQ." + }, + "generativeSource": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "description": "Populated if the prediction was Generative." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource": { + "description": "Details about source of FAQ answer.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "properties": { + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource": { + "description": "Details about source of Generative answer.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "properties": { + "snippets": { + "description": "All snippets used for this Generative Prediction, with their source URI and data.", + "items": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet": { + "description": "Snippet Source for a Generative Prediction.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet", + "properties": { + "text": { + "description": "Text taken from that URI.", + "type": "string" + }, + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "URI the data is sourced from.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery": { + "description": "Represents a suggested query.", + "id": "GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery", + "properties": { + "queryText": { + "description": "Suggested query text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2KnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowV2KnowledgeOperationMetadata", @@ -14892,14 +16566,16 @@ "ARTICLE_SUGGESTION", "FAQ", "SMART_REPLY", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", "Run smart reply model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -14993,6 +16669,27 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse": { + "description": "The response message for Participants.SuggestKnowledgeAssist.", + "id": "GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.context_size field in the request if there are fewer messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "knowledgeAssistAnswer": { + "$ref": "GoogleCloudDialogflowV2KnowledgeAssistAnswer", + "description": "Output only. Knowledge Assist suggestion.", + "readOnly": true + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2SuggestSmartRepliesResponse": { "description": "The response message for Participants.SuggestSmartReplies.", "id": "GoogleCloudDialogflowV2SuggestSmartRepliesResponse", @@ -15033,6 +16730,10 @@ "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." }, + "suggestKnowledgeAssistResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse", + "description": "SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST." + }, "suggestSmartRepliesResponse": { "$ref": "GoogleCloudDialogflowV2SuggestSmartRepliesResponse", "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." @@ -15245,7 +16946,8 @@ "SMART_REPLY", "DIALOGFLOW_ASSIST", "CONVERSATION_SUMMARIZATION", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", @@ -15254,7 +16956,8 @@ "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", "Run conversation summarization model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -16832,6 +18535,99 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer": { + "description": "Represents a Knowledge Assist answer.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer", + "properties": { + "answerRecord": { + "description": "The name of the answer record. Format: `projects//locations//answer Records/`.", + "type": "string" + }, + "suggestedQuery": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery", + "description": "The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion." + }, + "suggestedQueryAnswer": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer", + "description": "The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer": { + "description": "Represents an answer from Knowledge. Currently supports FAQ and Generative answers.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer", + "properties": { + "answerText": { + "description": "The piece of text from the `source` that answers this suggested query.", + "type": "string" + }, + "faqSource": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "description": "Populated if the prediction came from FAQ." + }, + "generativeSource": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "description": "Populated if the prediction was Generative." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource": { + "description": "Details about source of FAQ answer.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource", + "properties": { + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource": { + "description": "Details about source of Generative answer.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource", + "properties": { + "snippets": { + "description": "All snippets used for this Generative Prediction, with their source URI and data.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet": { + "description": "Snippet Source for a Generative Prediction.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet", + "properties": { + "text": { + "description": "Text taken from that URI.", + "type": "string" + }, + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "URI the data is sourced from.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery": { + "description": "Represents a suggested query.", + "id": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery", + "properties": { + "queryText": { + "description": "Suggested query text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata", @@ -17160,7 +18956,8 @@ "SMART_REPLY", "DIALOGFLOW_ASSIST", "CONVERSATION_SUMMARIZATION", - "KNOWLEDGE_SEARCH" + "KNOWLEDGE_SEARCH", + "KNOWLEDGE_ASSIST" ], "enumDescriptions": [ "Unspecified feature type.", @@ -17169,7 +18966,8 @@ "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", "Run conversation summarization model for chat.", - "Run knowledge search with text input from agent or text generated query." + "Run knowledge search with text input from agent or text generated query.", + "Run knowledge assist with automatic query generation." ], "type": "string" } @@ -17265,6 +19063,27 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse": { + "description": "The response message for Participants.SuggestKnowledgeAssist.", + "id": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.context_size field in the request if there are fewer messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "knowledgeAssistAnswer": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer", + "description": "Output only. Knowledge Assist suggestion.", + "readOnly": true + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse": { "description": "The response message for Participants.SuggestSmartReplies.", "id": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", @@ -17312,6 +19131,10 @@ "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." }, + "suggestKnowledgeAssistResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse", + "description": "SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST." + }, "suggestSmartRepliesResponse": { "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." diff --git a/dialogflow/v3beta1/dialogflow-gen.go b/dialogflow/v3beta1/dialogflow-gen.go index d1740f08a05..ba4adabae6d 100644 --- a/dialogflow/v3beta1/dialogflow-gen.go +++ b/dialogflow/v3beta1/dialogflow-gen.go @@ -207,8 +207,10 @@ func NewProjectsLocationsAgentsService(s *Service) *ProjectsLocationsAgentsServi rs.Flows = NewProjectsLocationsAgentsFlowsService(s) rs.Generators = NewProjectsLocationsAgentsGeneratorsService(s) rs.Intents = NewProjectsLocationsAgentsIntentsService(s) + rs.Playbooks = NewProjectsLocationsAgentsPlaybooksService(s) rs.Sessions = NewProjectsLocationsAgentsSessionsService(s) rs.TestCases = NewProjectsLocationsAgentsTestCasesService(s) + rs.Tools = NewProjectsLocationsAgentsToolsService(s) rs.TransitionRouteGroups = NewProjectsLocationsAgentsTransitionRouteGroupsService(s) rs.Webhooks = NewProjectsLocationsAgentsWebhooksService(s) return rs @@ -231,10 +233,14 @@ type ProjectsLocationsAgentsService struct { Intents *ProjectsLocationsAgentsIntentsService + Playbooks *ProjectsLocationsAgentsPlaybooksService + Sessions *ProjectsLocationsAgentsSessionsService TestCases *ProjectsLocationsAgentsTestCasesService + Tools *ProjectsLocationsAgentsToolsService + TransitionRouteGroups *ProjectsLocationsAgentsTransitionRouteGroupsService Webhooks *ProjectsLocationsAgentsWebhooksService @@ -399,6 +405,39 @@ type ProjectsLocationsAgentsIntentsService struct { s *Service } +func NewProjectsLocationsAgentsPlaybooksService(s *Service) *ProjectsLocationsAgentsPlaybooksService { + rs := &ProjectsLocationsAgentsPlaybooksService{s: s} + rs.Examples = NewProjectsLocationsAgentsPlaybooksExamplesService(s) + rs.Versions = NewProjectsLocationsAgentsPlaybooksVersionsService(s) + return rs +} + +type ProjectsLocationsAgentsPlaybooksService struct { + s *Service + + Examples *ProjectsLocationsAgentsPlaybooksExamplesService + + Versions *ProjectsLocationsAgentsPlaybooksVersionsService +} + +func NewProjectsLocationsAgentsPlaybooksExamplesService(s *Service) *ProjectsLocationsAgentsPlaybooksExamplesService { + rs := &ProjectsLocationsAgentsPlaybooksExamplesService{s: s} + return rs +} + +type ProjectsLocationsAgentsPlaybooksExamplesService struct { + s *Service +} + +func NewProjectsLocationsAgentsPlaybooksVersionsService(s *Service) *ProjectsLocationsAgentsPlaybooksVersionsService { + rs := &ProjectsLocationsAgentsPlaybooksVersionsService{s: s} + return rs +} + +type ProjectsLocationsAgentsPlaybooksVersionsService struct { + s *Service +} + func NewProjectsLocationsAgentsSessionsService(s *Service) *ProjectsLocationsAgentsSessionsService { rs := &ProjectsLocationsAgentsSessionsService{s: s} rs.EntityTypes = NewProjectsLocationsAgentsSessionsEntityTypesService(s) @@ -441,6 +480,15 @@ type ProjectsLocationsAgentsTestCasesResultsService struct { s *Service } +func NewProjectsLocationsAgentsToolsService(s *Service) *ProjectsLocationsAgentsToolsService { + rs := &ProjectsLocationsAgentsToolsService{s: s} + return rs +} + +type ProjectsLocationsAgentsToolsService struct { + s *Service +} + func NewProjectsLocationsAgentsTransitionRouteGroupsService(s *Service) *ProjectsLocationsAgentsTransitionRouteGroupsService { rs := &ProjectsLocationsAgentsTransitionRouteGroupsService{s: s} return rs @@ -569,10 +617,9 @@ func (s *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings) MarshalJSON() ([ // GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings: Define behaviors // on logging. type GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings struct { - // EnableInteractionLogging: If true, DF Interaction logging is currently - // enabled. + // EnableInteractionLogging: Enables DF Interaction logging. EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` - // EnableStackdriverLogging: If true, StackDriver logging is currently enabled. + // EnableStackdriverLogging: Enables StackDriver logging. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableInteractionLogging") // to unconditionally include in API requests. By default, fields with empty or @@ -3924,6 +3971,40 @@ func (s *GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1Action: Action performed by end user or +// Dialogflow agent in the conversation. +type GoogleCloudDialogflowCxV3beta1Action struct { + // AgentUtterance: Optional. Action performed by the agent as a message. + AgentUtterance *GoogleCloudDialogflowCxV3beta1AgentUtterance `json:"agentUtterance,omitempty"` + // FlowInvocation: Optional. Action performed on behalf of the agent by + // invoking a CX flow. + FlowInvocation *GoogleCloudDialogflowCxV3beta1FlowInvocation `json:"flowInvocation,omitempty"` + // PlaybookInvocation: Optional. Action performed on behalf of the agent by + // invoking a child playbook. + PlaybookInvocation *GoogleCloudDialogflowCxV3beta1PlaybookInvocation `json:"playbookInvocation,omitempty"` + // ToolUse: Optional. Action performed on behalf of the agent by calling a + // plugin tool. + ToolUse *GoogleCloudDialogflowCxV3beta1ToolUse `json:"toolUse,omitempty"` + // UserUtterance: Optional. Agent obtained a message from the customer. + UserUtterance *GoogleCloudDialogflowCxV3beta1UserUtterance `json:"userUtterance,omitempty"` + // ForceSendFields is a list of field names (e.g. "AgentUtterance") 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. "AgentUtterance") 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 *GoogleCloudDialogflowCxV3beta1Action) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1Action + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AdvancedSettings: Hierarchical advanced // settings for agent/flow/page/fulfillment/parameter. Settings exposed at // lower level overrides the settings exposed at higher level. Overriding @@ -4007,10 +4088,9 @@ func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings) MarshalJSON // GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings: Define // behaviors on logging. type GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings struct { - // EnableInteractionLogging: If true, DF Interaction logging is currently - // enabled. + // EnableInteractionLogging: Enables DF Interaction logging. EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` - // EnableStackdriverLogging: If true, StackDriver logging is currently enabled. + // EnableStackdriverLogging: Enables StackDriver logging. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableInteractionLogging") // to unconditionally include in API requests. By default, fields with empty or @@ -4122,11 +4202,18 @@ type GoogleCloudDialogflowCxV3beta1Agent struct { SecuritySettings string `json:"securitySettings,omitempty"` // SpeechToTextSettings: Speech recognition related settings. SpeechToTextSettings *GoogleCloudDialogflowCxV3beta1SpeechToTextSettings `json:"speechToTextSettings,omitempty"` - // StartFlow: Immutable. Name of the start flow in this agent. A start flow + // StartFlow: Name of the start flow in this agent. A start flow will be + // automatically created when the agent is created, and can only be deleted by + // deleting the agent. Format: `projects//locations//agents//flows/`. Currently + // only the default start flow with id "00000000-0000-0000-0000-000000000000" + // is allowed. + StartFlow string `json:"startFlow,omitempty"` + // StartPlaybook: Name of the start playbook in this agent. A start playbook // will be automatically created when the agent is created, and can only be // deleted by deleting the agent. Format: - // `projects//locations//agents//flows/`. - StartFlow string `json:"startFlow,omitempty"` + // `projects//locations//agents//playbooks/`. Currently only the default + // playbook with id "00000000-0000-0000-0000-000000000000" is allowed. + StartPlaybook string `json:"startPlaybook,omitempty"` // SupportedLanguageCodes: The list of all languages supported by the agent // (except for the `default_language_code`). SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"` @@ -4289,6 +4376,29 @@ func (s *GoogleCloudDialogflowCxV3beta1AgentPersonalizationSettings) MarshalJSON return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1AgentUtterance: AgentUtterance represents one +// message sent by the agent. +type GoogleCloudDialogflowCxV3beta1AgentUtterance struct { + // Text: Required. Message content in text. + 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 *GoogleCloudDialogflowCxV3beta1AgentUtterance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AgentUtterance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AgentValidationResult: The response message // for Agents.GetAgentValidationResult. type GoogleCloudDialogflowCxV3beta1AgentValidationResult struct { @@ -6197,6 +6307,68 @@ func (s *GoogleCloudDialogflowCxV3beta1EventInput) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1Example: Example represents a sample execution +// of the playbook in the conversation. An example consists of a list of +// ordered actions performed by end user or Dialogflow agent according the +// playbook instructions to fulfill the task. +type GoogleCloudDialogflowCxV3beta1Example struct { + // Actions: Required. The ordered list of actions performed by the end user and + // the Dialogflow agent. + Actions []*GoogleCloudDialogflowCxV3beta1Action `json:"actions,omitempty"` + // ConversationState: Required. Example's output state. + // + // Possible values: + // "OUTPUT_STATE_UNSPECIFIED" - Unspecified output. + // "OUTPUT_STATE_OK" - Succeeded. + // "OUTPUT_STATE_CANCELLED" - Cancelled. + // "OUTPUT_STATE_FAILED" - Failed. + // "OUTPUT_STATE_ESCALATED" - Escalated. + // "OUTPUT_STATE_PENDING" - Pending. + ConversationState string `json:"conversationState,omitempty"` + // CreateTime: Output only. The timestamp of initial example creation. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. The high level concise description of the example. + // The max number of characters is 200. + Description string `json:"description,omitempty"` + // DisplayName: Required. The display name of the example. + DisplayName string `json:"displayName,omitempty"` + // LanguageCode: Optional. The language code of the example. If not specified, + // the agent's default language is used. Note: languages must be enabled in the + // agent before they can be used. + LanguageCode string `json:"languageCode,omitempty"` + // Name: The unique identifier of the playbook example. Format: + // `projects//locations//agents//playbooks//examples/`. + Name string `json:"name,omitempty"` + // PlaybookInput: Optional. The input to the playbook in the example. + PlaybookInput *GoogleCloudDialogflowCxV3beta1PlaybookInput `json:"playbookInput,omitempty"` + // PlaybookOutput: Optional. The output of the playbook in the example. + PlaybookOutput *GoogleCloudDialogflowCxV3beta1PlaybookOutput `json:"playbookOutput,omitempty"` + // TokenCount: Output only. Estimated number of tokes current example takes + // when sent to the LLM. + TokenCount int64 `json:"tokenCount,omitempty,string"` + // UpdateTime: Output only. Last time the example 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. "Actions") 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. "Actions") 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 *GoogleCloudDialogflowCxV3beta1Example) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1Example + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1Experiment: Represents an experiment in an // environment. type GoogleCloudDialogflowCxV3beta1Experiment struct { @@ -6869,6 +7041,49 @@ func (s *GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1ExportToolsRequest: The request message for +// Tools.ExportTools. +type GoogleCloudDialogflowCxV3beta1ExportToolsRequest struct { + // DataFormat: Optional. The data format of the exported tools. If not + // specified, `BLOB` is assumed. + // + // Possible values: + // "DATA_FORMAT_UNSPECIFIED" - Unspecified format. Treated as `BLOB`. + // "BLOB" - Tools will be exported as raw bytes. + // "JSON" - Tools will be exported in JSON format. + DataFormat string `json:"dataFormat,omitempty"` + // Tools: Required. The name of the tools to export. Format: + // `projects//locations//agents//tools/`. + Tools []string `json:"tools,omitempty"` + // ToolsContentInline: Optional. The option to return the serialized tools + // inline. + ToolsContentInline bool `json:"toolsContentInline,omitempty"` + // ToolsUri: Optional. The Google Cloud Storage + // (https://cloud.google.com/storage/docs/) URI to export the tools to. The + // format of this URI must be `gs:///`. Dialogflow performs a write operation + // for the Cloud Storage object on the caller's behalf, so your request + // authentication must have write permissions for the object. For more + // information, see Dialogflow access control + // (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + ToolsUri string `json:"toolsUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataFormat") 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. "DataFormat") 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 *GoogleCloudDialogflowCxV3beta1ExportToolsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ExportToolsRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1FilterSpecs: Filter specifications for data // stores. type GoogleCloudDialogflowCxV3beta1FilterSpecs struct { @@ -7016,6 +7231,45 @@ func (s *GoogleCloudDialogflowCxV3beta1FlowImportStrategy) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1FlowInvocation: Stores metadata of the +// invocation of a CX flow. Next Id: 7 +type GoogleCloudDialogflowCxV3beta1FlowInvocation struct { + // Flow: Required. The unique identifier of the flow. Format: + // `projects//locations//agents/`. + Flow string `json:"flow,omitempty"` + // FlowState: Required. Flow invocation's output state. + // + // Possible values: + // "OUTPUT_STATE_UNSPECIFIED" - Unspecified output. + // "OUTPUT_STATE_OK" - Succeeded. + // "OUTPUT_STATE_CANCELLED" - Cancelled. + // "OUTPUT_STATE_FAILED" - Failed. + // "OUTPUT_STATE_ESCALATED" - Escalated. + // "OUTPUT_STATE_PENDING" - Pending. + FlowState string `json:"flowState,omitempty"` + // InputActionParameters: Optional. A list of input parameters for the flow. + InputActionParameters googleapi.RawMessage `json:"inputActionParameters,omitempty"` + // OutputActionParameters: Optional. A list of output parameters generated by + // the flow invocation. + OutputActionParameters googleapi.RawMessage `json:"outputActionParameters,omitempty"` + // ForceSendFields is a list of field names (e.g. "Flow") 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. "Flow") 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 *GoogleCloudDialogflowCxV3beta1FlowInvocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1FlowInvocation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1FlowMultiLanguageSettings: Settings for // multi-lingual agents. type GoogleCloudDialogflowCxV3beta1FlowMultiLanguageSettings struct { @@ -7458,6 +7712,33 @@ func (s *GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1GenerativeInfo: Represents the information of +// a query if handled by generative agent resources. +type GoogleCloudDialogflowCxV3beta1GenerativeInfo struct { + // ActionTracingInfo: The actions performed by the generative playbook for the + // current agent response. + ActionTracingInfo *GoogleCloudDialogflowCxV3beta1Example `json:"actionTracingInfo,omitempty"` + // CurrentPlaybooks: The stack of playbooks that the conversation has currently + // entered, with the most recent one on the top. + CurrentPlaybooks []string `json:"currentPlaybooks,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActionTracingInfo") 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. "ActionTracingInfo") 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 *GoogleCloudDialogflowCxV3beta1GenerativeInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GenerativeInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1GenerativeSettings: Settings for Generative // AI. type GoogleCloudDialogflowCxV3beta1GenerativeSettings struct { @@ -7469,6 +7750,8 @@ type GoogleCloudDialogflowCxV3beta1GenerativeSettings struct { KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` // LanguageCode: Language for this settings. LanguageCode string `json:"languageCode,omitempty"` + // LlmModelSettings: LLM model settings. + LlmModelSettings *GoogleCloudDialogflowCxV3beta1LlmModelSettings `json:"llmModelSettings,omitempty"` // Name: Format: `projects//locations//agents//generativeSettings`. Name string `json:"name,omitempty"` @@ -7599,6 +7882,8 @@ type GoogleCloudDialogflowCxV3beta1Generator struct { // $conversation, $last-user-utterance, etc. populated by Dialogflow. It can // also contain custom placeholders which will be resolved during fulfillment. DisplayName string `json:"displayName,omitempty"` + // LlmModelSettings: The LLM model settings. + LlmModelSettings *GoogleCloudDialogflowCxV3beta1LlmModelSettings `json:"llmModelSettings,omitempty"` // Name: The unique identifier of the generator. Must be set for the // Generators.UpdateGenerator method. Generators.CreateGenerate populates the // name automatically. Format: `projects//locations//agents//generators/`. @@ -8798,6 +9083,36 @@ func (s *GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1ListExamplesResponse: The response message for +// Examples.ListExamples. +type GoogleCloudDialogflowCxV3beta1ListExamplesResponse struct { + // Examples: The list of examples. There will be a maximum number of items + // returned based on the page_size field in the request. + Examples []*GoogleCloudDialogflowCxV3beta1Example `json:"examples,omitempty"` + // NextPageToken: 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. "Examples") 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. "Examples") 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 *GoogleCloudDialogflowCxV3beta1ListExamplesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ListExamplesResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1ListExperimentsResponse: The response message // for Experiments.ListExperiments. type GoogleCloudDialogflowCxV3beta1ListExperimentsResponse struct { @@ -8950,6 +9265,66 @@ func (s *GoogleCloudDialogflowCxV3beta1ListPagesResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse: The response +// message for Playbooks.ListPlaybookVersions. +type GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty if there + // are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // PlaybookVersions: The list of playbook version. There will be a maximum + // number of items returned based on the page_size field in the request. + PlaybookVersions []*GoogleCloudDialogflowCxV3beta1PlaybookVersion `json:"playbookVersions,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 *GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse: The response message +// for Playbooks.ListPlaybooks. +type GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty if there + // are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Playbooks: The list of playbooks. There will be a maximum number of items + // returned based on the page_size field in the request. + Playbooks []*GoogleCloudDialogflowCxV3beta1Playbook `json:"playbooks,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 *GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1ListSecuritySettingsResponse: The response // message for SecuritySettings.ListSecuritySettings. type GoogleCloudDialogflowCxV3beta1ListSecuritySettingsResponse struct { @@ -9069,6 +9444,36 @@ func (s *GoogleCloudDialogflowCxV3beta1ListTestCasesResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1ListToolsResponse: The response message for +// Tools.ListTools. +type GoogleCloudDialogflowCxV3beta1ListToolsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty if there + // are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Tools: The list of Tools. There will be a maximum number of items returned + // based on the page_size field in the request. + Tools []*GoogleCloudDialogflowCxV3beta1Tool `json:"tools,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 *GoogleCloudDialogflowCxV3beta1ListToolsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ListToolsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse: The // response message for TransitionRouteGroups.ListTransitionRouteGroups. type GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse struct { @@ -9163,6 +9568,30 @@ func (s *GoogleCloudDialogflowCxV3beta1ListWebhooksResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1LlmModelSettings: Settings for LLM models. +type GoogleCloudDialogflowCxV3beta1LlmModelSettings struct { + // Model: The selected LLM model. + Model string `json:"model,omitempty"` + // PromptText: The custom prompt to use. + PromptText string `json:"promptText,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") 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. "Model") 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 *GoogleCloudDialogflowCxV3beta1LlmModelSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1LlmModelSettings + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1LoadVersionRequest: The request message for // Versions.LoadVersion. type GoogleCloudDialogflowCxV3beta1LoadVersionRequest struct { @@ -9662,6 +10091,45 @@ func (s *GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo) MarshalJSO return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1ParameterDefinition: Defines the properties of +// a parameter. Used to define parameters used in the agent and the input / +// output parameters for each fulfillment. +type GoogleCloudDialogflowCxV3beta1ParameterDefinition struct { + // Description: Human-readable description of the parameter. Limited to 300 + // characters. + Description string `json:"description,omitempty"` + // Name: Required. Name of parameter. + Name string `json:"name,omitempty"` + // Type: Required. Type of parameter. + // + // Possible values: + // "PARAMETER_TYPE_UNSPECIFIED" - Not specified. No validation will be + // performed. + // "STRING" - Represents any string value. + // "NUMBER" - Represents any number value. + // "BOOLEAN" - Represents a boolean value. + // "NULL" - Represents a null value. + // "OBJECT" - Represents any object value. + // "LIST" - Represents a repeated value. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudDialogflowCxV3beta1ParameterDefinition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ParameterDefinition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1Phrase: Text input which can be used for // prompt or banned phrases. type GoogleCloudDialogflowCxV3beta1Phrase struct { @@ -9685,6 +10153,247 @@ func (s *GoogleCloudDialogflowCxV3beta1Phrase) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1Playbook: Playbook is the basic building block +// to instruct the LLM how to execute a certain task. A playbook consists of a +// goal to accomplish, an optional list of step by step instructions (the step +// instruction may refers to name of the custom or default plugin tools to use) +// to perform the task, a list of contextual input data to be passed in at the +// beginning of the invoked, and a list of output parameters to store the +// playbook result. +type GoogleCloudDialogflowCxV3beta1Playbook struct { + // CreateTime: Output only. The timestamp of initial playbook creation. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Required. The human-readable name of the playbook, unique + // within an agent. + DisplayName string `json:"displayName,omitempty"` + // Goal: Required. High level description of the goal the playbook intend to + // accomplish. + Goal string `json:"goal,omitempty"` + // InputParameterDefinitions: Optional. Defined structured input parameters for + // this playbook. + InputParameterDefinitions []*GoogleCloudDialogflowCxV3beta1ParameterDefinition `json:"inputParameterDefinitions,omitempty"` + // Instruction: Instruction to accomplish target goal. + Instruction *GoogleCloudDialogflowCxV3beta1PlaybookInstruction `json:"instruction,omitempty"` + // LlmModelSettings: Optional. Llm model settings for the playbook. + LlmModelSettings *GoogleCloudDialogflowCxV3beta1LlmModelSettings `json:"llmModelSettings,omitempty"` + // Name: The unique identifier of the playbook. Format: + // `projects//locations//agents//playbooks/`. + Name string `json:"name,omitempty"` + // OutputParameterDefinitions: Optional. Defined structured output parameters + // for this playbook. + OutputParameterDefinitions []*GoogleCloudDialogflowCxV3beta1ParameterDefinition `json:"outputParameterDefinitions,omitempty"` + // ReferencedFlows: Output only. The resource name of flows referenced by the + // current playbook in the instructions. + ReferencedFlows []string `json:"referencedFlows,omitempty"` + // ReferencedPlaybooks: Output only. The resource name of other playbooks + // referenced by the current playbook in the instructions. + ReferencedPlaybooks []string `json:"referencedPlaybooks,omitempty"` + // ReferencedTools: Optional. The resource name of tools referenced by the + // current playbook in the instructions. If not provided explicitly, they are + // will be implied using the tool being referenced in goal and steps. + ReferencedTools []string `json:"referencedTools,omitempty"` + // TokenCount: Output only. Estimated number of tokes current playbook takes + // when sent to the LLM. + TokenCount int64 `json:"tokenCount,omitempty,string"` + // UpdateTime: Output only. Last time the playbook version 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. "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 *GoogleCloudDialogflowCxV3beta1Playbook) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1Playbook + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1PlaybookInput: Input of the playbook. +type GoogleCloudDialogflowCxV3beta1PlaybookInput struct { + // ActionParameters: Optional. A list of input parameters for the action. + ActionParameters googleapi.RawMessage `json:"actionParameters,omitempty"` + // PrecedingConversationSummary: Optional. Summary string of the preceding + // conversation for the child playbook invocation. + PrecedingConversationSummary string `json:"precedingConversationSummary,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActionParameters") 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. "ActionParameters") 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 *GoogleCloudDialogflowCxV3beta1PlaybookInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1PlaybookInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1PlaybookInstruction: Message of the +// Instruction of the playbook. +type GoogleCloudDialogflowCxV3beta1PlaybookInstruction struct { + // Steps: Ordered list of step by step execution instructions to accomplish + // target goal. + Steps []*GoogleCloudDialogflowCxV3beta1PlaybookStep `json:"steps,omitempty"` + // ForceSendFields is a list of field names (e.g. "Steps") 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. "Steps") 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 *GoogleCloudDialogflowCxV3beta1PlaybookInstruction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1PlaybookInstruction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1PlaybookInvocation: Stores metadata of the +// invocation of a child playbook. Next Id: 5 +type GoogleCloudDialogflowCxV3beta1PlaybookInvocation struct { + // Playbook: Required. The unique identifier of the playbook. Format: + // `projects//locations//agents//playbooks/`. + Playbook string `json:"playbook,omitempty"` + // PlaybookInput: Optional. Input of the child playbook invocation. + PlaybookInput *GoogleCloudDialogflowCxV3beta1PlaybookInput `json:"playbookInput,omitempty"` + // PlaybookOutput: Optional. Output of the child playbook invocation. + PlaybookOutput *GoogleCloudDialogflowCxV3beta1PlaybookOutput `json:"playbookOutput,omitempty"` + // PlaybookState: Required. Playbook invocation's output state. + // + // Possible values: + // "OUTPUT_STATE_UNSPECIFIED" - Unspecified output. + // "OUTPUT_STATE_OK" - Succeeded. + // "OUTPUT_STATE_CANCELLED" - Cancelled. + // "OUTPUT_STATE_FAILED" - Failed. + // "OUTPUT_STATE_ESCALATED" - Escalated. + // "OUTPUT_STATE_PENDING" - Pending. + PlaybookState string `json:"playbookState,omitempty"` + // ForceSendFields is a list of field names (e.g. "Playbook") 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. "Playbook") 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 *GoogleCloudDialogflowCxV3beta1PlaybookInvocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1PlaybookInvocation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1PlaybookOutput: Output of the playbook. +type GoogleCloudDialogflowCxV3beta1PlaybookOutput struct { + // ActionParameters: Optional. A Struct object of output parameters for the + // action. + ActionParameters googleapi.RawMessage `json:"actionParameters,omitempty"` + // ExecutionSummary: Optional. Summary string of the execution result of the + // child playbook. + ExecutionSummary string `json:"executionSummary,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActionParameters") 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. "ActionParameters") 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 *GoogleCloudDialogflowCxV3beta1PlaybookOutput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1PlaybookOutput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1PlaybookStep: Message of single step +// execution. +type GoogleCloudDialogflowCxV3beta1PlaybookStep struct { + // Steps: Sub-processing needed to execute the current step. + Steps []*GoogleCloudDialogflowCxV3beta1PlaybookStep `json:"steps,omitempty"` + // Text: Step instruction in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "Steps") 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. "Steps") 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 *GoogleCloudDialogflowCxV3beta1PlaybookStep) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1PlaybookStep + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1PlaybookVersion: Playbook version is a +// snapshot of the playbook at certain timestamp. +type GoogleCloudDialogflowCxV3beta1PlaybookVersion struct { + // Description: Optional. The description of the playbook version. + Description string `json:"description,omitempty"` + // Examples: Output only. Snapshot of the examples belonging to the playbook + // when the playbook version is created. + Examples []*GoogleCloudDialogflowCxV3beta1Example `json:"examples,omitempty"` + // Name: The unique identifier of the playbook version. Format: + // `projects//locations//agents//playbooks//versions/`. + Name string `json:"name,omitempty"` + // Playbook: Output only. Snapshot of the playbook when the playbook version is + // created. + Playbook *GoogleCloudDialogflowCxV3beta1Playbook `json:"playbook,omitempty"` + // UpdateTime: Output only. Last time the playbook version was created or + // modified. + 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. "Description") 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. "Description") 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 *GoogleCloudDialogflowCxV3beta1PlaybookVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1PlaybookVersion + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1QueryInput: Represents the query input. It can // contain one of: 1. A conversational query in the form of text. 2. An intent // query that specifies which intent to trigger. 3. Natural language speech @@ -9707,6 +10416,8 @@ type GoogleCloudDialogflowCxV3beta1QueryInput struct { LanguageCode string `json:"languageCode,omitempty"` // Text: The natural language text to be processed. Text *GoogleCloudDialogflowCxV3beta1TextInput `json:"text,omitempty"` + // ToolCallResult: The results of a tool executed by the client. + ToolCallResult *GoogleCloudDialogflowCxV3beta1ToolCallResult `json:"toolCallResult,omitempty"` // ForceSendFields is a list of field names (e.g. "Audio") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -9744,6 +10455,11 @@ type GoogleCloudDialogflowCxV3beta1QueryParameters struct { // parameters. In most cases, current_page and parameters should be configured // together to direct a session to a specific state. CurrentPage string `json:"currentPage,omitempty"` + // CurrentPlaybook: Optional. Start the session with the specified playbook. + // You can only specify the playbook at the beginning of the session. + // Otherwise, an error will be thrown. Format: + // `projects//locations//agents//playbooks/`. + CurrentPlaybook string `json:"currentPlaybook,omitempty"` // DisableWebhook: Whether to disable webhook calls for this request. DisableWebhook bool `json:"disableWebhook,omitempty"` // EndUserMetadata: Optional. Information about the end-user to improve the @@ -9761,6 +10477,9 @@ type GoogleCloudDialogflowCxV3beta1QueryParameters struct { FlowVersions []string `json:"flowVersions,omitempty"` // GeoLocation: The geo location of this conversational query. GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"` + // LlmModelSettings: Optional. Use the specified LLM model settings for + // processing the request. + LlmModelSettings *GoogleCloudDialogflowCxV3beta1LlmModelSettings `json:"llmModelSettings,omitempty"` // Parameters: Additional parameters to be put into session parameters. To // remove a parameter from the session, clients should explicitly set the // parameter value to null. You can reference the session parameters in the @@ -9842,6 +10561,9 @@ type GoogleCloudDialogflowCxV3beta1QueryResult struct { // controls are need to be shown for the response in the Dialogflow Messenger // widget. AllowAnswerFeedback bool `json:"allowAnswerFeedback,omitempty"` + // CurrentFlow: The current Flow. Some, not all fields are filled in this + // message, including but not limited to `name` and `display_name`. + CurrentFlow *GoogleCloudDialogflowCxV3beta1Flow `json:"currentFlow,omitempty"` // CurrentPage: The current Page. Some, not all fields are filled in this // message, including but not limited to `name` and `display_name`. CurrentPage *GoogleCloudDialogflowCxV3beta1Page `json:"currentPage,omitempty"` @@ -9866,6 +10588,9 @@ type GoogleCloudDialogflowCxV3beta1QueryResult struct { // Dtmf: If a DTMF was provided as input, this field will contain a copy of the // DtmfInput. Dtmf *GoogleCloudDialogflowCxV3beta1DtmfInput `json:"dtmf,omitempty"` + // GenerativeInfo: The information of a query if handled by generative agent + // resources. + GenerativeInfo *GoogleCloudDialogflowCxV3beta1GenerativeInfo `json:"generativeInfo,omitempty"` // Intent: The Intent that matched the conversational query. Some, not all // fields are filled in this message, including but not limited to: `name` and // `display_name`. This field is deprecated, please use QueryResult.match @@ -10063,6 +10788,9 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { TelephonyTransferCall *GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"` // Text: Returns a text response. Text *GoogleCloudDialogflowCxV3beta1ResponseMessageText `json:"text,omitempty"` + // ToolCall: Returns the definition of a tool call that should be executed by + // the client. + ToolCall *GoogleCloudDialogflowCxV3beta1ToolCall `json:"toolCall,omitempty"` // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -11366,6 +12094,440 @@ func (s *GoogleCloudDialogflowCxV3beta1TextToSpeechSettings) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1Tool: A tool provides a list of actions which +// are available to the Playbook to attain its goal. A Tool consists of a +// description of the tool's usage and a specification of the tool which +// contains the schema and authentication information. +type GoogleCloudDialogflowCxV3beta1Tool struct { + // DataStoreSpec: Data store search tool specification. + DataStoreSpec *GoogleCloudDialogflowCxV3beta1ToolDataStoreTool `json:"dataStoreSpec,omitempty"` + // Description: Required. High level description of the Tool and its usage. + Description string `json:"description,omitempty"` + // DisplayName: Required. The human-readable name of the Tool, unique within an + // agent. + DisplayName string `json:"displayName,omitempty"` + // ExtensionSpec: Vertex extension tool specification. + ExtensionSpec *GoogleCloudDialogflowCxV3beta1ToolExtensionTool `json:"extensionSpec,omitempty"` + // FunctionSpec: Client side executed function specification. + FunctionSpec *GoogleCloudDialogflowCxV3beta1ToolFunctionTool `json:"functionSpec,omitempty"` + // Name: The unique identifier of the Tool. Format: + // `projects//locations//agents//tools/`. + Name string `json:"name,omitempty"` + // OpenApiSpec: OpenAPI specification of the Tool. + OpenApiSpec *GoogleCloudDialogflowCxV3beta1ToolOpenApiTool `json:"openApiSpec,omitempty"` + // ToolType: Output only. The tool type. + // + // Possible values: + // "TOOL_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "CUSTOMIZED_TOOL" - Customer provided tool. + // "BUILTIN_TOOL" - First party built-in tool created by Dialogflow which + // cannot be modified. + ToolType string `json:"toolType,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DataStoreSpec") 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. "DataStoreSpec") 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 *GoogleCloudDialogflowCxV3beta1Tool) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1Tool + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolAuthentication: Authentication information +// required for API calls +type GoogleCloudDialogflowCxV3beta1ToolAuthentication struct { + // ApiKeyConfig: Config for API key auth. + ApiKeyConfig *GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig `json:"apiKeyConfig,omitempty"` + // OauthConfig: Config for OAuth. + OauthConfig *GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig `json:"oauthConfig,omitempty"` + // ServiceAgentAuthConfig: Config for Diglogflow service agent + // (https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) + // auth. + ServiceAgentAuthConfig *GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig `json:"serviceAgentAuthConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiKeyConfig") 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. "ApiKeyConfig") 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 *GoogleCloudDialogflowCxV3beta1ToolAuthentication) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolAuthentication + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig: Config for +// authentication with API key. +type GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig struct { + // ApiKey: Required. The API key. + ApiKey string `json:"apiKey,omitempty"` + // KeyName: Required. The parameter name or the header name of the API key. + // E.g., If the API request is "https://example.com/act?X-Api-Key=", + // "X-Api-Key" would be the parameter name. + KeyName string `json:"keyName,omitempty"` + // RequestLocation: Required. Key location in the request. + // + // Possible values: + // "REQUEST_LOCATION_UNSPECIFIED" - Default value. This value is unused. + // "HEADER" - Represents the key in http header. + // "QUERY_STRING" - Represents the key in query string. + RequestLocation string `json:"requestLocation,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiKey") 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. "ApiKey") 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 *GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig: Config for +// authentication with OAuth. +type GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig struct { + // ClientId: Required. The client ID from the OAuth provider. + ClientId string `json:"clientId,omitempty"` + // ClientSecret: Required. The client secret from the OAuth provider. + ClientSecret string `json:"clientSecret,omitempty"` + // OauthGrantType: Required. OAuth grant types. + // + // Possible values: + // "OAUTH_GRANT_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "CLIENT_CREDENTIAL" - Represents the [client credential + // flow](https://oauth.net/2/grant-types/client-credentials). + OauthGrantType string `json:"oauthGrantType,omitempty"` + // TokenEndpoint: Required. The token endpoint in the OAuth provider to + // exchange for an access token. + TokenEndpoint string `json:"tokenEndpoint,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientId") 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. "ClientId") 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 *GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig: +// Config for auth using Diglogflow service agent +// (https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). +type GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig struct { +} + +// GoogleCloudDialogflowCxV3beta1ToolCall: Represents a call of a specific +// tool's action with the specified inputs. +type GoogleCloudDialogflowCxV3beta1ToolCall struct { + // Action: Required. The name of the tool's action associated with this call. + Action string `json:"action,omitempty"` + // InputParameters: Optional. The action's input parameters. + InputParameters googleapi.RawMessage `json:"inputParameters,omitempty"` + // Tool: Required. The tool associated with this call. Format: + // `projects//locations//agents//tools/`. + Tool string `json:"tool,omitempty"` + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *GoogleCloudDialogflowCxV3beta1ToolCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolCall + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolCallResult: The result of calling a tool's +// action that has been executed by the client. +type GoogleCloudDialogflowCxV3beta1ToolCallResult struct { + // Action: Required. The name of the tool's action associated with this call. + Action string `json:"action,omitempty"` + // Error: The tool call's error. + Error *GoogleCloudDialogflowCxV3beta1ToolCallResultError `json:"error,omitempty"` + // OutputParameters: The tool call's output parameters. + OutputParameters googleapi.RawMessage `json:"outputParameters,omitempty"` + // Tool: Required. The tool associated with this call. Format: + // `projects//locations//agents//tools/`. + Tool string `json:"tool,omitempty"` + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *GoogleCloudDialogflowCxV3beta1ToolCallResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolCallResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolCallResultError: An error produced by the +// tool call. +type GoogleCloudDialogflowCxV3beta1ToolCallResultError struct { + // Message: Optional. The error message of the function. + Message string `json:"message,omitempty"` + // 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 *GoogleCloudDialogflowCxV3beta1ToolCallResultError) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolCallResultError + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolDataStoreTool: A DataStoreTool is a way to +// provide specifications needed to search a list of data stores. +type GoogleCloudDialogflowCxV3beta1ToolDataStoreTool struct { + // DataStoreConnections: Required. List of data stores to search. + DataStoreConnections []*GoogleCloudDialogflowCxV3beta1DataStoreConnection `json:"dataStoreConnections,omitempty"` + // FallbackPrompt: Required. Fallback prompt configurations to use. + FallbackPrompt *GoogleCloudDialogflowCxV3beta1ToolDataStoreToolFallbackPrompt `json:"fallbackPrompt,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStoreConnections") 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. "DataStoreConnections") 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 *GoogleCloudDialogflowCxV3beta1ToolDataStoreTool) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolDataStoreTool + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolDataStoreToolFallbackPrompt: A +// FallbackPrompt is a way to provide specifications for the Data Store +// fallback prompt when generating responses. +type GoogleCloudDialogflowCxV3beta1ToolDataStoreToolFallbackPrompt struct { +} + +// GoogleCloudDialogflowCxV3beta1ToolExtensionTool: An ExtensionTool is a way +// to use Vertex Extensions as a tool. +type GoogleCloudDialogflowCxV3beta1ToolExtensionTool struct { + // Name: Required. The full name of the referenced vertex extension. Formats: + // `projects/{project}/locations/{location}/extensions/{extension}` + Name string `json:"name,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 + // 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 *GoogleCloudDialogflowCxV3beta1ToolExtensionTool) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolExtensionTool + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolFunctionTool: A Function tool describes +// the functions to be invoked on the client side. +type GoogleCloudDialogflowCxV3beta1ToolFunctionTool struct { + // InputSchema: Optional. The JSON schema is encapsulated in a + // google.protobuf.Struct to describe the input of the function. This input is + // a JSON object that contains the function's parameters as properties of the + // object. + InputSchema googleapi.RawMessage `json:"inputSchema,omitempty"` + // OutputSchema: Optional. The JSON schema is encapsulated in a + // google.protobuf.Struct to describe the output of the function. This output + // is a JSON object that contains the function's parameters as properties of + // the object. + OutputSchema googleapi.RawMessage `json:"outputSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "InputSchema") 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. "InputSchema") 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 *GoogleCloudDialogflowCxV3beta1ToolFunctionTool) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolFunctionTool + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolOpenApiTool: An OpenAPI tool is a way to +// provide the Tool specifications in the Open API schema format. +type GoogleCloudDialogflowCxV3beta1ToolOpenApiTool struct { + // Authentication: Optional. Authentication information required by the API. + Authentication *GoogleCloudDialogflowCxV3beta1ToolAuthentication `json:"authentication,omitempty"` + // TextSchema: Required. The OpenAPI schema specified as a text. + TextSchema string `json:"textSchema,omitempty"` + // TlsConfig: Optional. TLS configuration for the HTTPS verification. + TlsConfig *GoogleCloudDialogflowCxV3beta1ToolTLSConfig `json:"tlsConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Authentication") 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. "Authentication") 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 *GoogleCloudDialogflowCxV3beta1ToolOpenApiTool) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolOpenApiTool + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolTLSConfig: The TLS configuration. +type GoogleCloudDialogflowCxV3beta1ToolTLSConfig struct { + // CaCerts: Required. Specifies a list of allowed custom CA certificates for + // HTTPS verification. + CaCerts []*GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert `json:"caCerts,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaCerts") 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. "CaCerts") 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 *GoogleCloudDialogflowCxV3beta1ToolTLSConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolTLSConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert: The CA certificate. +type GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert struct { + // Cert: Required. The allowed custom CA certificates (in DER format) for HTTPS + // verification. This overrides the default SSL trust store. If this is empty + // or unspecified, Dialogflow will use Google's default trust store to verify + // certificates. N.B. Make sure the HTTPS server certificates are signed with + // "subject alt name". For instance a certificate can be self-signed using the + // following command, openssl x509 -req -days 200 -in example.com.csr \ + // -signkey example.com.key \ -out example.com.crt \ -extfile <(printf + // "\nsubjectAltName='DNS:www.example.com'") + Cert string `json:"cert,omitempty"` + // DisplayName: Required. The name of the allowed custom CA certificates. This + // can be used to disambiguate the custom CA certificates. + DisplayName string `json:"displayName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cert") 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. "Cert") 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 *GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolTLSConfigCACert + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ToolUse: Stores metadata of the invocation of +// an action supported by a tool. +type GoogleCloudDialogflowCxV3beta1ToolUse struct { + // Action: Optional. Name of the action to be called during the tool use. + Action string `json:"action,omitempty"` + // InputActionParameters: Optional. A list of input parameters for the action. + InputActionParameters googleapi.RawMessage `json:"inputActionParameters,omitempty"` + // OutputActionParameters: Optional. A list of output parameters generated by + // the action. + OutputActionParameters googleapi.RawMessage `json:"outputActionParameters,omitempty"` + // Tool: Required. The tool that should be used. Format: + // `projects//locations//agents//tools/`. + Tool string `json:"tool,omitempty"` + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *GoogleCloudDialogflowCxV3beta1ToolUse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolUse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1TrainFlowRequest: The request message for // Flows.TrainFlow. type GoogleCloudDialogflowCxV3beta1TrainFlowRequest struct { @@ -11767,6 +12929,29 @@ func (s *GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata) MarshalJ return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1UserUtterance: UserUtterance represents one +// message sent by the customer. +type GoogleCloudDialogflowCxV3beta1UserUtterance struct { + // Text: Required. Message content in text. + 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 *GoogleCloudDialogflowCxV3beta1UserUtterance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1UserUtterance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1ValidateAgentRequest: The request message for // Agents.ValidateAgent. type GoogleCloudDialogflowCxV3beta1ValidateAgentRequest struct { @@ -12713,6 +13898,7 @@ type GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata struct // "SMART_REPLY" - Run smart reply model for chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -14572,6 +15758,162 @@ func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2KnowledgeAssistAnswer: Represents a Knowledge Assist +// answer. +type GoogleCloudDialogflowV2KnowledgeAssistAnswer struct { + // AnswerRecord: The name of the answer record. Format: + // `projects//locations//answer Records/`. + AnswerRecord string `json:"answerRecord,omitempty"` + // SuggestedQuery: The query suggested based on the context. Suggestion is made + // only if it is different from the previous suggestion. + SuggestedQuery *GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery `json:"suggestedQuery,omitempty"` + // SuggestedQueryAnswer: The answer generated for the suggested query. Whether + // or not an answer is generated depends on how confident we are about the + // generated query. + SuggestedQueryAnswer *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer `json:"suggestedQueryAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerRecord") 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. "AnswerRecord") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer: Represents an +// answer from Knowledge. Currently supports FAQ and Generative answers. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer struct { + // AnswerText: The piece of text from the `source` that answers this suggested + // query. + AnswerText string `json:"answerText,omitempty"` + // FaqSource: Populated if the prediction came from FAQ. + FaqSource *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource `json:"faqSource,omitempty"` + // GenerativeSource: Populated if the prediction was Generative. + GenerativeSource *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource `json:"generativeSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerText") 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. "AnswerText") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource: +// Details about source of FAQ answer. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource struct { + // Question: The corresponding FAQ question. + Question string `json:"question,omitempty"` + // ForceSendFields is a list of field names (e.g. "Question") 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. "Question") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource: +// Details about source of Generative answer. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource struct { + // Snippets: All snippets used for this Generative Prediction, with their + // source URI and data. + Snippets []*GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet `json:"snippets,omitempty"` + // ForceSendFields is a list of field names (e.g. "Snippets") 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. "Snippets") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSn +// ippet: Snippet Source for a Generative Prediction. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet struct { + // Text: Text taken from that URI. + Text string `json:"text,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: URI the data is sourced from. + Uri string `json:"uri,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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery: Represents a +// suggested query. +type GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery struct { + // QueryText: Suggested query text. + QueryText string `json:"queryText,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryText") 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. "QueryText") 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 *GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2KnowledgeOperationMetadata: Metadata in // google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowV2KnowledgeOperationMetadata struct { @@ -15000,6 +16342,7 @@ type GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata struct { // "SMART_REPLY" - Run smart reply model for chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -15154,6 +16497,37 @@ func (s *GoogleCloudDialogflowV2SuggestFaqAnswersResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse: The response message +// for Participants.SuggestKnowledgeAssist. +type GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse struct { + // ContextSize: Number of messages prior to and including latest_message to + // compile the suggestion. It may be smaller than the + // SuggestKnowledgeAssistRequest.context_size field in the request if there are + // fewer messages in the conversation. + ContextSize int64 `json:"contextSize,omitempty"` + // KnowledgeAssistAnswer: Output only. Knowledge Assist suggestion. + KnowledgeAssistAnswer *GoogleCloudDialogflowV2KnowledgeAssistAnswer `json:"knowledgeAssistAnswer,omitempty"` + // LatestMessage: The name of the latest conversation message used to compile + // suggestion for. Format: `projects//locations//conversations//messages/`. + LatestMessage string `json:"latestMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContextSize") 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. "ContextSize") 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 *GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2SuggestSmartRepliesResponse: The response message for // Participants.SuggestSmartReplies. type GoogleCloudDialogflowV2SuggestSmartRepliesResponse struct { @@ -15200,6 +16574,9 @@ type GoogleCloudDialogflowV2SuggestionResult struct { // SuggestFaqAnswersResponse: SuggestFaqAnswersResponse if request is for // FAQ_ANSWER. SuggestFaqAnswersResponse *GoogleCloudDialogflowV2SuggestFaqAnswersResponse `json:"suggestFaqAnswersResponse,omitempty"` + // SuggestKnowledgeAssistResponse: SuggestKnowledgeAssistResponse if request is + // for KNOWLEDGE_ASSIST. + SuggestKnowledgeAssistResponse *GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse `json:"suggestKnowledgeAssistResponse,omitempty"` // SuggestSmartRepliesResponse: SuggestSmartRepliesResponse if request is for // SMART_REPLY. SuggestSmartRepliesResponse *GoogleCloudDialogflowV2SuggestSmartRepliesResponse `json:"suggestSmartRepliesResponse,omitempty"` @@ -15495,6 +16872,7 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata s // chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -17646,6 +19024,162 @@ func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data return nil } +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer: Represents a Knowledge +// Assist answer. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer struct { + // AnswerRecord: The name of the answer record. Format: + // `projects//locations//answer Records/`. + AnswerRecord string `json:"answerRecord,omitempty"` + // SuggestedQuery: The query suggested based on the context. Suggestion is made + // only if it is different from the previous suggestion. + SuggestedQuery *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery `json:"suggestedQuery,omitempty"` + // SuggestedQueryAnswer: The answer generated for the suggested query. Whether + // or not an answer is generated depends on how confident we are about the + // generated query. + SuggestedQueryAnswer *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer `json:"suggestedQueryAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerRecord") 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. "AnswerRecord") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer: Represents +// an answer from Knowledge. Currently supports FAQ and Generative answers. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer struct { + // AnswerText: The piece of text from the `source` that answers this suggested + // query. + AnswerText string `json:"answerText,omitempty"` + // FaqSource: Populated if the prediction came from FAQ. + FaqSource *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource `json:"faqSource,omitempty"` + // GenerativeSource: Populated if the prediction was Generative. + GenerativeSource *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource `json:"generativeSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerText") 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. "AnswerText") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource: +// Details about source of FAQ answer. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource struct { + // Question: The corresponding FAQ question. + Question string `json:"question,omitempty"` + // ForceSendFields is a list of field names (e.g. "Question") 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. "Question") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSou +// rce: Details about source of Generative answer. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource struct { + // Snippets: All snippets used for this Generative Prediction, with their + // source URI and data. + Snippets []*GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet `json:"snippets,omitempty"` + // ForceSendFields is a list of field names (e.g. "Snippets") 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. "Snippets") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSou +// rceSnippet: Snippet Source for a Generative Prediction. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet struct { + // Text: Text taken from that URI. + Text string `json:"text,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: URI the data is sourced from. + Uri string `json:"uri,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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery: Represents +// a suggested query. +type GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery struct { + // QueryText: Suggested query text. + QueryText string `json:"queryText,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryText") 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. "QueryText") 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 *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in // google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct { @@ -18086,6 +19620,7 @@ type GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata str // chat. // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from agent or // text generated query. + // "KNOWLEDGE_ASSIST" - Run knowledge assist with automatic query generation. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") to // unconditionally include in API requests. By default, fields with empty or @@ -18244,6 +19779,37 @@ func (s *GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse: The response +// message for Participants.SuggestKnowledgeAssist. +type GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse struct { + // ContextSize: Number of messages prior to and including latest_message to + // compile the suggestion. It may be smaller than the + // SuggestKnowledgeAssistRequest.context_size field in the request if there are + // fewer messages in the conversation. + ContextSize int64 `json:"contextSize,omitempty"` + // KnowledgeAssistAnswer: Output only. Knowledge Assist suggestion. + KnowledgeAssistAnswer *GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer `json:"knowledgeAssistAnswer,omitempty"` + // LatestMessage: The name of the latest conversation message used to compile + // suggestion for. Format: `projects//locations//conversations//messages/`. + LatestMessage string `json:"latestMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContextSize") 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. "ContextSize") 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 *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse: The response // message for Participants.SuggestSmartReplies. type GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse struct { @@ -18296,6 +19862,9 @@ type GoogleCloudDialogflowV2beta1SuggestionResult struct { // SuggestFaqAnswersResponse: SuggestFaqAnswersResponse if request is for // FAQ_ANSWER. SuggestFaqAnswersResponse *GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse `json:"suggestFaqAnswersResponse,omitempty"` + // SuggestKnowledgeAssistResponse: SuggestKnowledgeAssistResponse if request is + // for KNOWLEDGE_ASSIST. + SuggestKnowledgeAssistResponse *GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse `json:"suggestKnowledgeAssistResponse,omitempty"` // SuggestSmartRepliesResponse: SuggestSmartRepliesResponse if request is for // SMART_REPLY. SuggestSmartRepliesResponse *GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse `json:"suggestSmartRepliesResponse,omitempty"` @@ -29755,74 +31324,59 @@ func (c *ProjectsLocationsAgentsIntentsPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsAgentsSessionsDetectIntentCall struct { - s *Service - sessionid string - googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsPlaybooksCreateCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1playbook *GoogleCloudDialogflowCxV3beta1Playbook + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DetectIntent: Processes a natural language query and returns structured, -// actionable data as a result. This method is not idempotent, because it may -// cause session entity types to be updated, which in turn might affect results -// of future queries. Note: Always use agent versions for production traffic. -// See Versions and environments -// (https://cloud.google.com/dialogflow/cx/docs/concept/version). +// Create: Creates a playbook in a specified agent. // -// - session: The name of the session this query is sent to. Format: -// `projects//locations//agents//sessions/` or -// `projects//locations//agents//environments//sessions/`. If `Environment -// ID` is not specified, we assume default 'draft' environment. It's up to -// the API caller to choose an appropriate `Session ID`. It can be a random -// number or some type of session identifiers (preferably hashed). The length -// of the `Session ID` must not exceed 36 characters. For more information, -// see the sessions guide -// (https://cloud.google.com/dialogflow/cx/docs/concept/session). Note: -// Always use agent versions for production traffic. See Versions and -// environments -// (https://cloud.google.com/dialogflow/cx/docs/concept/version). -func (r *ProjectsLocationsAgentsSessionsService) DetectIntent(sessionid string, googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest) *ProjectsLocationsAgentsSessionsDetectIntentCall { - c := &ProjectsLocationsAgentsSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sessionid = sessionid - c.googleclouddialogflowcxv3beta1detectintentrequest = googleclouddialogflowcxv3beta1detectintentrequest +// - parent: The agent to create a playbook for. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsPlaybooksService) Create(parent string, googleclouddialogflowcxv3beta1playbook *GoogleCloudDialogflowCxV3beta1Playbook) *ProjectsLocationsAgentsPlaybooksCreateCall { + c := &ProjectsLocationsAgentsPlaybooksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1playbook = googleclouddialogflowcxv3beta1playbook 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 *ProjectsLocationsAgentsSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsDetectIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsDetectIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksCreateCall { 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 *ProjectsLocationsAgentsSessionsDetectIntentCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1detectintentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1playbook) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:detectIntent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/playbooks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29830,18 +31384,18 @@ func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "session": c.sessionid, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.detectIntent" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1DetectIntentResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDialogflowCxV3beta1Playbook.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 *ProjectsLocationsAgentsSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1DetectIntentResponse, error) { +func (c *ProjectsLocationsAgentsPlaybooksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Playbook, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29860,7 +31414,7 @@ func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1DetectIntentResponse{ + ret := &GoogleCloudDialogflowCxV3beta1Playbook{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29873,87 +31427,72 @@ func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsAgentsSessionsFulfillIntentCall struct { - s *Service - sessionid string - googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsPlaybooksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FulfillIntent: Fulfills a matched intent returned by MatchIntent. Must be -// called after MatchIntent, with input from MatchIntentResponse. Otherwise, -// the behavior is undefined. +// Delete: Deletes a specified playbook. // -// - session: The name of the session this query is sent to. Format: -// `projects//locations//agents//sessions/` or -// `projects//locations//agents//environments//sessions/`. If `Environment -// ID` is not specified, we assume default 'draft' environment. It's up to -// the API caller to choose an appropriate `Session ID`. It can be a random -// number or some type of session identifiers (preferably hashed). The length -// of the `Session ID` must not exceed 36 characters. For more information, -// see the sessions guide -// (https://cloud.google.com/dialogflow/cx/docs/concept/session). -func (r *ProjectsLocationsAgentsSessionsService) FulfillIntent(sessionid string, googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest) *ProjectsLocationsAgentsSessionsFulfillIntentCall { - c := &ProjectsLocationsAgentsSessionsFulfillIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sessionid = sessionid - c.googleclouddialogflowcxv3beta1fulfillintentrequest = googleclouddialogflowcxv3beta1fulfillintentrequest +// - name: The name of the playbook to delete. Format: +// `projects//locations//agents//playbooks/`. +func (r *ProjectsLocationsAgentsPlaybooksService) Delete(name string) *ProjectsLocationsAgentsPlaybooksDeleteCall { + c := &ProjectsLocationsAgentsPlaybooksDeleteCall{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 *ProjectsLocationsAgentsSessionsFulfillIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsFulfillIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsFulfillIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksDeleteCall { 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 *ProjectsLocationsAgentsSessionsFulfillIntentCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsAgentsPlaybooksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1fulfillintentrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:fulfillIntent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "session": c.sessionid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.fulfillIntent" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse.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 *ProjectsLocationsAgentsSessionsFulfillIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1FulfillIntentResponse, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsPlaybooksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29972,7 +31511,7 @@ func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1FulfillIntentResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29985,86 +31524,84 @@ func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsAgentsSessionsMatchIntentCall struct { - s *Service - sessionid string - googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsPlaybooksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// MatchIntent: Returns preliminary intent match results, doesn't change the -// session status. +// Get: Retrieves the specified Playbook. // -// - session: The name of the session this query is sent to. Format: -// `projects//locations//agents//sessions/` or -// `projects//locations//agents//environments//sessions/`. If `Environment -// ID` is not specified, we assume default 'draft' environment. It's up to -// the API caller to choose an appropriate `Session ID`. It can be a random -// number or some type of session identifiers (preferably hashed). The length -// of the `Session ID` must not exceed 36 characters. For more information, -// see the sessions guide -// (https://cloud.google.com/dialogflow/cx/docs/concept/session). -func (r *ProjectsLocationsAgentsSessionsService) MatchIntent(sessionid string, googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest) *ProjectsLocationsAgentsSessionsMatchIntentCall { - c := &ProjectsLocationsAgentsSessionsMatchIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sessionid = sessionid - c.googleclouddialogflowcxv3beta1matchintentrequest = googleclouddialogflowcxv3beta1matchintentrequest +// - name: The name of the playbook. Format: +// `projects//locations//agents//playbooks/`. +func (r *ProjectsLocationsAgentsPlaybooksService) Get(name string) *ProjectsLocationsAgentsPlaybooksGetCall { + c := &ProjectsLocationsAgentsPlaybooksGetCall{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 *ProjectsLocationsAgentsSessionsMatchIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsMatchIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksGetCall { 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 *ProjectsLocationsAgentsPlaybooksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsPlaybooksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsMatchIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksGetCall { 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 *ProjectsLocationsAgentsSessionsMatchIntentCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1matchintentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsAgentsPlaybooksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:matchIntent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "session": c.sessionid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.matchIntent" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1MatchIntentResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDialogflowCxV3beta1Playbook.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 *ProjectsLocationsAgentsSessionsMatchIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1MatchIntentResponse, error) { +func (c *ProjectsLocationsAgentsPlaybooksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Playbook, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30083,7 +31620,7 @@ func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1MatchIntentResponse{ + ret := &GoogleCloudDialogflowCxV3beta1Playbook{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30096,92 +31633,98 @@ func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall struct { - s *Service - sessionid string - googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsPlaybooksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ServerStreamingDetectIntent: Processes a natural language query and returns -// structured, actionable data as a result through server-side streaming. -// Server-side streaming allows Dialogflow to send partial responses -// (https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) -// earlier in a single request. +// List: Returns a list of playbooks in the specified agent. // -// - session: The name of the session this query is sent to. Format: -// `projects//locations//agents//sessions/` or -// `projects//locations//agents//environments//sessions/`. If `Environment -// ID` is not specified, we assume default 'draft' environment. It's up to -// the API caller to choose an appropriate `Session ID`. It can be a random -// number or some type of session identifiers (preferably hashed). The length -// of the `Session ID` must not exceed 36 characters. For more information, -// see the sessions guide -// (https://cloud.google.com/dialogflow/cx/docs/concept/session). Note: -// Always use agent versions for production traffic. See Versions and -// environments -// (https://cloud.google.com/dialogflow/cx/docs/concept/version). -func (r *ProjectsLocationsAgentsSessionsService) ServerStreamingDetectIntent(sessionid string, googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest) *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall { - c := &ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sessionid = sessionid - c.googleclouddialogflowcxv3beta1detectintentrequest = googleclouddialogflowcxv3beta1detectintentrequest +// - parent: The agent to list playbooks from. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsPlaybooksService) List(parent string) *ProjectsLocationsAgentsPlaybooksListCall { + c := &ProjectsLocationsAgentsPlaybooksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return in a single page. By default 100 and at most 1000. +func (c *ProjectsLocationsAgentsPlaybooksListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsPlaybooksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous list request. +func (c *ProjectsLocationsAgentsPlaybooksListCall) PageToken(pageToken string) *ProjectsLocationsAgentsPlaybooksListCall { + 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 *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksListCall { 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 *ProjectsLocationsAgentsPlaybooksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsPlaybooksListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall { +func (c *ProjectsLocationsAgentsPlaybooksListCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksListCall { 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 *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1detectintentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsAgentsPlaybooksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:serverStreamingDetectIntent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/playbooks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "session": c.sessionid, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.serverStreamingDetectIntent" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1DetectIntentResponse.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 +// *GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse.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 *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1DetectIntentResponse, error) { +func (c *ProjectsLocationsAgentsPlaybooksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30200,7 +31743,7 @@ func (c *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1DetectIntentResponse{ + ret := &GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30213,78 +31756,107 @@ func (c *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Do(opts return ret, nil } -type ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall struct { - s *Service - session string - googleclouddialogflowcxv3beta1submitanswerfeedbackrequest *GoogleCloudDialogflowCxV3beta1SubmitAnswerFeedbackRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SubmitAnswerFeedback: Updates the feedback received from the user for a -// single turn of the bot response. +// 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 *ProjectsLocationsAgentsPlaybooksListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListPlaybooksResponse) 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 ProjectsLocationsAgentsPlaybooksPatchCall struct { + s *Service + nameid string + googleclouddialogflowcxv3beta1playbook *GoogleCloudDialogflowCxV3beta1Playbook + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified Playbook. // -// - session: The name of the session the feedback was sent to. -func (r *ProjectsLocationsAgentsSessionsService) SubmitAnswerFeedback(session string, googleclouddialogflowcxv3beta1submitanswerfeedbackrequest *GoogleCloudDialogflowCxV3beta1SubmitAnswerFeedbackRequest) *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall { - c := &ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.session = session - c.googleclouddialogflowcxv3beta1submitanswerfeedbackrequest = googleclouddialogflowcxv3beta1submitanswerfeedbackrequest +// - name: The unique identifier of the playbook. Format: +// `projects//locations//agents//playbooks/`. +func (r *ProjectsLocationsAgentsPlaybooksService) Patch(nameid string, googleclouddialogflowcxv3beta1playbook *GoogleCloudDialogflowCxV3beta1Playbook) *ProjectsLocationsAgentsPlaybooksPatchCall { + c := &ProjectsLocationsAgentsPlaybooksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.googleclouddialogflowcxv3beta1playbook = googleclouddialogflowcxv3beta1playbook + return c +} + +// UpdateMask sets the optional parameter "updateMask": The mask to control +// which fields get updated. If the mask is not present, all fields will be +// updated. +func (c *ProjectsLocationsAgentsPlaybooksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsPlaybooksPatchCall { + 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 *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall { +func (c *ProjectsLocationsAgentsPlaybooksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall { +func (c *ProjectsLocationsAgentsPlaybooksPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksPatchCall { 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 *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1submitanswerfeedbackrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1playbook) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:submitAnswerFeedback") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "session": c.session, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.submitAnswerFeedback" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1AnswerFeedback.ServerResponse.Header or (if a +// *GoogleCloudDialogflowCxV3beta1Playbook.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 *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1AnswerFeedback, error) { +func (c *ProjectsLocationsAgentsPlaybooksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Playbook, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30303,7 +31875,7 @@ func (c *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1AnswerFeedback{ + ret := &GoogleCloudDialogflowCxV3beta1Playbook{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30316,61 +31888,59 @@ func (c *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsAgentsSessionsEntityTypesCreateCall struct { - s *Service - parent string - googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsPlaybooksExamplesCreateCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1example *GoogleCloudDialogflowCxV3beta1Example + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a session entity type. +// Create: Creates an example in the specified playbook. // -// - parent: The session to create a session entity type for. Format: -// `projects//locations//agents//sessions/` or -// `projects//locations//agents//environments//sessions/`. If `Environment -// ID` is not specified, we assume default 'draft' environment. -func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Create(parent string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { - c := &ProjectsLocationsAgentsSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The playbook to create an example for. Format: +// `projects//locations//agents//playbooks/`. +func (r *ProjectsLocationsAgentsPlaybooksExamplesService) Create(parent string, googleclouddialogflowcxv3beta1example *GoogleCloudDialogflowCxV3beta1Example) *ProjectsLocationsAgentsPlaybooksExamplesCreateCall { + c := &ProjectsLocationsAgentsPlaybooksExamplesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype + c.googleclouddialogflowcxv3beta1example = googleclouddialogflowcxv3beta1example 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 *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksExamplesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksExamplesCreateCall { 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 *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksExamplesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1example) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/examples") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -30383,13 +31953,13 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.create" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.examples.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDialogflowCxV3beta1Example.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 *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Example, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30408,7 +31978,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ + ret := &GoogleCloudDialogflowCxV3beta1Example{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30421,7 +31991,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Do(opts ...google return ret, nil } -type ProjectsLocationsAgentsSessionsEntityTypesDeleteCall struct { +type ProjectsLocationsAgentsPlaybooksExamplesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30429,14 +31999,12 @@ type ProjectsLocationsAgentsSessionsEntityTypesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified session entity type. +// Delete: Deletes the specified example. // -// - name: The name of the session entity type to delete. Format: -// `projects//locations//agents//sessions//entityTypes/` or -// `projects//locations//agents//environments//sessions//entityTypes/`. If -// `Environment ID` is not specified, we assume default 'draft' environment. -func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { - c := &ProjectsLocationsAgentsSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the example to delete. Format: +// `projects//locations//agents//playbooks//examples/`. +func (r *ProjectsLocationsAgentsPlaybooksExamplesService) Delete(name string) *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall { + c := &ProjectsLocationsAgentsPlaybooksExamplesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30444,27 +32012,27 @@ func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall { 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 *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -30482,13 +32050,13 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.delete" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.examples.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30520,7 +32088,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Do(opts ...google return ret, nil } -type ProjectsLocationsAgentsSessionsEntityTypesGetCall struct { +type ProjectsLocationsAgentsPlaybooksExamplesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30529,14 +32097,12 @@ type ProjectsLocationsAgentsSessionsEntityTypesGetCall struct { header_ http.Header } -// Get: Retrieves the specified session entity type. +// Get: Retrieves the specified example. // -// - name: The name of the session entity type. Format: -// `projects//locations//agents//sessions//entityTypes/` or -// `projects//locations//agents//environments//sessions//entityTypes/`. If -// `Environment ID` is not specified, we assume default 'draft' environment. -func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { - c := &ProjectsLocationsAgentsSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the example. Format: +// `projects//locations//agents//playbooks//examples/`. +func (r *ProjectsLocationsAgentsPlaybooksExamplesService) Get(name string) *ProjectsLocationsAgentsPlaybooksExamplesGetCall { + c := &ProjectsLocationsAgentsPlaybooksExamplesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30544,7 +32110,7 @@ func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Get(name string) *Pr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksExamplesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30552,27 +32118,27 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Fields(s ...googleap // 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 *ProjectsLocationsAgentsSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsPlaybooksExamplesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksExamplesGetCall { 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 *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksExamplesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30593,13 +32159,13 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.get" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.examples.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDialogflowCxV3beta1Example.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 *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Example, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30618,7 +32184,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ + ret := &GoogleCloudDialogflowCxV3beta1Example{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30631,7 +32197,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsAgentsSessionsEntityTypesListCall struct { +type ProjectsLocationsAgentsPlaybooksExamplesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -30640,28 +32206,34 @@ type ProjectsLocationsAgentsSessionsEntityTypesListCall struct { header_ http.Header } -// List: Returns the list of all session entity types in the specified session. +// List: Returns a list of examples in the specified playbook. // -// - parent: The session to list all session entity types from. Format: -// `projects//locations//agents//sessions/` or -// `projects//locations//agents//environments//sessions/`. If `Environment -// ID` is not specified, we assume default 'draft' environment. -func (r *ProjectsLocationsAgentsSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { - c := &ProjectsLocationsAgentsSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The playbook to list the examples from. Format: +// `projects//locations//agents//playbooks/`. +func (r *ProjectsLocationsAgentsPlaybooksExamplesService) List(parent string) *ProjectsLocationsAgentsPlaybooksExamplesListCall { + c := &ProjectsLocationsAgentsPlaybooksExamplesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// LanguageCode sets the optional parameter "languageCode": The language to +// list examples for. If not specified, the agent's default language is used. +// Note: languages must be enabled in the agent before they can be used. +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsPlaybooksExamplesListCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of items // to return in a single page. By default 100 and at most 1000. -func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsSessionsEntityTypesListCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsPlaybooksExamplesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The next_page_token value // returned from a previous list request. -func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsPlaybooksExamplesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -30669,7 +32241,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesListCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksExamplesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30677,27 +32249,27 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Fields(s ...googlea // 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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsPlaybooksExamplesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesListCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksExamplesListCall { 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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30705,7 +32277,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) doRequest(alt strin var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/examples") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30718,13 +32290,13 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.list" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.examples.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse.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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse, error) { +// *GoogleCloudDialogflowCxV3beta1ListExamplesResponse.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 *ProjectsLocationsAgentsPlaybooksExamplesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListExamplesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30743,7 +32315,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse{ + ret := &GoogleCloudDialogflowCxV3beta1ListExamplesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30759,7 +32331,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Do(opts ...googleap // 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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse) error) error { +func (c *ProjectsLocationsAgentsPlaybooksExamplesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListExamplesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -30777,31 +32349,30 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Pages(ctx context.C } } -type ProjectsLocationsAgentsSessionsEntityTypesPatchCall struct { - s *Service - nameid string - googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsPlaybooksExamplesPatchCall struct { + s *Service + nameid string + googleclouddialogflowcxv3beta1example *GoogleCloudDialogflowCxV3beta1Example + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified session entity type. +// Patch: Update the specified example. // -// - name: The unique identifier of the session entity type. Format: -// `projects//locations//agents//sessions//entityTypes/` or -// `projects//locations//agents//environments//sessions//entityTypes/`. If -// `Environment ID` is not specified, we assume default 'draft' environment. -func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { - c := &ProjectsLocationsAgentsSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The unique identifier of the playbook example. Format: +// `projects//locations//agents//playbooks//examples/`. +func (r *ProjectsLocationsAgentsPlaybooksExamplesService) Patch(nameid string, googleclouddialogflowcxv3beta1example *GoogleCloudDialogflowCxV3beta1Example) *ProjectsLocationsAgentsPlaybooksExamplesPatchCall { + c := &ProjectsLocationsAgentsPlaybooksExamplesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.nameid = nameid - c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype + c.googleclouddialogflowcxv3beta1example = googleclouddialogflowcxv3beta1example return c } // UpdateMask sets the optional parameter "updateMask": The mask to control -// which fields get updated. -func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { +// which fields get updated. If the mask is not present, all fields will be +// updated. +func (c *ProjectsLocationsAgentsPlaybooksExamplesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsPlaybooksExamplesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -30809,30 +32380,30 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) UpdateMask(updateM // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksExamplesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { +func (c *ProjectsLocationsAgentsPlaybooksExamplesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksExamplesPatchCall { 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 *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksExamplesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1example) if err != nil { return nil, err } @@ -30851,13 +32422,13 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.patch" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.examples.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDialogflowCxV3beta1Example.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 *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { +func (c *ProjectsLocationsAgentsPlaybooksExamplesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Example, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30876,7 +32447,7 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ + ret := &GoogleCloudDialogflowCxV3beta1Example{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30889,59 +32460,59 @@ func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsAgentsTestCasesBatchDeleteCall struct { - s *Service - parent string - googleclouddialogflowcxv3beta1batchdeletetestcasesrequest *GoogleCloudDialogflowCxV3beta1BatchDeleteTestCasesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsPlaybooksVersionsCreateCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1playbookversion *GoogleCloudDialogflowCxV3beta1PlaybookVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchDelete: Batch deletes test cases. +// Create: Creates a version for the specified Playbook. // -// - parent: The agent to delete test cases from. Format: -// `projects//locations//agents/`. -func (r *ProjectsLocationsAgentsTestCasesService) BatchDelete(parent string, googleclouddialogflowcxv3beta1batchdeletetestcasesrequest *GoogleCloudDialogflowCxV3beta1BatchDeleteTestCasesRequest) *ProjectsLocationsAgentsTestCasesBatchDeleteCall { - c := &ProjectsLocationsAgentsTestCasesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The playbook to create a version for. Format: +// `projects//locations//agents//playbooks/`. +func (r *ProjectsLocationsAgentsPlaybooksVersionsService) Create(parent string, googleclouddialogflowcxv3beta1playbookversion *GoogleCloudDialogflowCxV3beta1PlaybookVersion) *ProjectsLocationsAgentsPlaybooksVersionsCreateCall { + c := &ProjectsLocationsAgentsPlaybooksVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddialogflowcxv3beta1batchdeletetestcasesrequest = googleclouddialogflowcxv3beta1batchdeletetestcasesrequest + c.googleclouddialogflowcxv3beta1playbookversion = googleclouddialogflowcxv3beta1playbookversion 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 *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesBatchDeleteCall { +func (c *ProjectsLocationsAgentsPlaybooksVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksVersionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesBatchDeleteCall { +func (c *ProjectsLocationsAgentsPlaybooksVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksVersionsCreateCall { 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 *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Header() http.Header { +func (c *ProjectsLocationsAgentsPlaybooksVersionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesBatchDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsPlaybooksVersionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1batchdeletetestcasesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1playbookversion) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:batchDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/versions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -30954,13 +32525,1600 @@ func (c *ProjectsLocationsAgentsTestCasesBatchDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.batchDelete" call. +// Do executes the "dialogflow.projects.locations.agents.playbooks.versions.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1PlaybookVersion.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 *ProjectsLocationsAgentsPlaybooksVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1PlaybookVersion, 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 := &GoogleCloudDialogflowCxV3beta1PlaybookVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsPlaybooksVersionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified version of the Playbook. +// +// - name: The name of the playbook version to delete. Format: +// `projects//locations//agents//playbooks//versions/`. +func (r *ProjectsLocationsAgentsPlaybooksVersionsService) Delete(name string) *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall { + c := &ProjectsLocationsAgentsPlaybooksVersionsDeleteCall{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 *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall { + 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 *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.playbooks.versions.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsAgentsPlaybooksVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsPlaybooksVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves the specified version of the Playbook. +// +// - name: The name of the playbook version. Format: +// `projects//locations//agents//playbooks//versions/`. +func (r *ProjectsLocationsAgentsPlaybooksVersionsService) Get(name string) *ProjectsLocationsAgentsPlaybooksVersionsGetCall { + c := &ProjectsLocationsAgentsPlaybooksVersionsGetCall{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 *ProjectsLocationsAgentsPlaybooksVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksVersionsGetCall { + 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 *ProjectsLocationsAgentsPlaybooksVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsPlaybooksVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsPlaybooksVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksVersionsGetCall { + 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 *ProjectsLocationsAgentsPlaybooksVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsPlaybooksVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.playbooks.versions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1PlaybookVersion.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 *ProjectsLocationsAgentsPlaybooksVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1PlaybookVersion, 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 := &GoogleCloudDialogflowCxV3beta1PlaybookVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsPlaybooksVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists versions for the specified Playbook. +// +// - parent: The playbook to list versions for. Format: +// `projects//locations//agents//playbooks/`. +func (r *ProjectsLocationsAgentsPlaybooksVersionsService) List(parent string) *ProjectsLocationsAgentsPlaybooksVersionsListCall { + c := &ProjectsLocationsAgentsPlaybooksVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return in a single page. By default 100 and at most 1000. +func (c *ProjectsLocationsAgentsPlaybooksVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsPlaybooksVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous list request. +func (c *ProjectsLocationsAgentsPlaybooksVersionsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsPlaybooksVersionsListCall { + 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 *ProjectsLocationsAgentsPlaybooksVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPlaybooksVersionsListCall { + 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 *ProjectsLocationsAgentsPlaybooksVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsPlaybooksVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsPlaybooksVersionsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsPlaybooksVersionsListCall { + 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 *ProjectsLocationsAgentsPlaybooksVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsPlaybooksVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/versions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.playbooks.versions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsAgentsPlaybooksVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse, 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 := &GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsAgentsPlaybooksVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListPlaybookVersionsResponse) 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 ProjectsLocationsAgentsSessionsDetectIntentCall struct { + s *Service + sessionid string + googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DetectIntent: Processes a natural language query and returns structured, +// actionable data as a result. This method is not idempotent, because it may +// cause session entity types to be updated, which in turn might affect results +// of future queries. Note: Always use agent versions for production traffic. +// See Versions and environments +// (https://cloud.google.com/dialogflow/cx/docs/concept/version). +// +// - session: The name of the session this query is sent to. Format: +// `projects//locations//agents//sessions/` or +// `projects//locations//agents//environments//sessions/`. If `Environment +// ID` is not specified, we assume default 'draft' environment. It's up to +// the API caller to choose an appropriate `Session ID`. It can be a random +// number or some type of session identifiers (preferably hashed). The length +// of the `Session ID` must not exceed 36 characters. For more information, +// see the sessions guide +// (https://cloud.google.com/dialogflow/cx/docs/concept/session). Note: +// Always use agent versions for production traffic. See Versions and +// environments +// (https://cloud.google.com/dialogflow/cx/docs/concept/version). +func (r *ProjectsLocationsAgentsSessionsService) DetectIntent(sessionid string, googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest) *ProjectsLocationsAgentsSessionsDetectIntentCall { + c := &ProjectsLocationsAgentsSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sessionid = sessionid + c.googleclouddialogflowcxv3beta1detectintentrequest = googleclouddialogflowcxv3beta1detectintentrequest + 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 *ProjectsLocationsAgentsSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsDetectIntentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsDetectIntentCall { + 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 *ProjectsLocationsAgentsSessionsDetectIntentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1detectintentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:detectIntent") + 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{ + "session": c.sessionid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.detectIntent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1DetectIntentResponse.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 *ProjectsLocationsAgentsSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1DetectIntentResponse, 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 := &GoogleCloudDialogflowCxV3beta1DetectIntentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsFulfillIntentCall struct { + s *Service + sessionid string + googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// FulfillIntent: Fulfills a matched intent returned by MatchIntent. Must be +// called after MatchIntent, with input from MatchIntentResponse. Otherwise, +// the behavior is undefined. +// +// - session: The name of the session this query is sent to. Format: +// `projects//locations//agents//sessions/` or +// `projects//locations//agents//environments//sessions/`. If `Environment +// ID` is not specified, we assume default 'draft' environment. It's up to +// the API caller to choose an appropriate `Session ID`. It can be a random +// number or some type of session identifiers (preferably hashed). The length +// of the `Session ID` must not exceed 36 characters. For more information, +// see the sessions guide +// (https://cloud.google.com/dialogflow/cx/docs/concept/session). +func (r *ProjectsLocationsAgentsSessionsService) FulfillIntent(sessionid string, googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest) *ProjectsLocationsAgentsSessionsFulfillIntentCall { + c := &ProjectsLocationsAgentsSessionsFulfillIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sessionid = sessionid + c.googleclouddialogflowcxv3beta1fulfillintentrequest = googleclouddialogflowcxv3beta1fulfillintentrequest + 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 *ProjectsLocationsAgentsSessionsFulfillIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsFulfillIntentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsFulfillIntentCall { + 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 *ProjectsLocationsAgentsSessionsFulfillIntentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1fulfillintentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:fulfillIntent") + 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{ + "session": c.sessionid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.fulfillIntent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse.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 *ProjectsLocationsAgentsSessionsFulfillIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1FulfillIntentResponse, 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 := &GoogleCloudDialogflowCxV3beta1FulfillIntentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsMatchIntentCall struct { + s *Service + sessionid string + googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MatchIntent: Returns preliminary intent match results, doesn't change the +// session status. +// +// - session: The name of the session this query is sent to. Format: +// `projects//locations//agents//sessions/` or +// `projects//locations//agents//environments//sessions/`. If `Environment +// ID` is not specified, we assume default 'draft' environment. It's up to +// the API caller to choose an appropriate `Session ID`. It can be a random +// number or some type of session identifiers (preferably hashed). The length +// of the `Session ID` must not exceed 36 characters. For more information, +// see the sessions guide +// (https://cloud.google.com/dialogflow/cx/docs/concept/session). +func (r *ProjectsLocationsAgentsSessionsService) MatchIntent(sessionid string, googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest) *ProjectsLocationsAgentsSessionsMatchIntentCall { + c := &ProjectsLocationsAgentsSessionsMatchIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sessionid = sessionid + c.googleclouddialogflowcxv3beta1matchintentrequest = googleclouddialogflowcxv3beta1matchintentrequest + 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 *ProjectsLocationsAgentsSessionsMatchIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsMatchIntentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsMatchIntentCall { + 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 *ProjectsLocationsAgentsSessionsMatchIntentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1matchintentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:matchIntent") + 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{ + "session": c.sessionid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.matchIntent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1MatchIntentResponse.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 *ProjectsLocationsAgentsSessionsMatchIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1MatchIntentResponse, 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 := &GoogleCloudDialogflowCxV3beta1MatchIntentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall struct { + s *Service + sessionid string + googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ServerStreamingDetectIntent: Processes a natural language query and returns +// structured, actionable data as a result through server-side streaming. +// Server-side streaming allows Dialogflow to send partial responses +// (https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) +// earlier in a single request. +// +// - session: The name of the session this query is sent to. Format: +// `projects//locations//agents//sessions/` or +// `projects//locations//agents//environments//sessions/`. If `Environment +// ID` is not specified, we assume default 'draft' environment. It's up to +// the API caller to choose an appropriate `Session ID`. It can be a random +// number or some type of session identifiers (preferably hashed). The length +// of the `Session ID` must not exceed 36 characters. For more information, +// see the sessions guide +// (https://cloud.google.com/dialogflow/cx/docs/concept/session). Note: +// Always use agent versions for production traffic. See Versions and +// environments +// (https://cloud.google.com/dialogflow/cx/docs/concept/version). +func (r *ProjectsLocationsAgentsSessionsService) ServerStreamingDetectIntent(sessionid string, googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest) *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall { + c := &ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sessionid = sessionid + c.googleclouddialogflowcxv3beta1detectintentrequest = googleclouddialogflowcxv3beta1detectintentrequest + 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 *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall { + 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 *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1detectintentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:serverStreamingDetectIntent") + 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{ + "session": c.sessionid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.serverStreamingDetectIntent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1DetectIntentResponse.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 *ProjectsLocationsAgentsSessionsServerStreamingDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1DetectIntentResponse, 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 := &GoogleCloudDialogflowCxV3beta1DetectIntentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall struct { + s *Service + session string + googleclouddialogflowcxv3beta1submitanswerfeedbackrequest *GoogleCloudDialogflowCxV3beta1SubmitAnswerFeedbackRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SubmitAnswerFeedback: Updates the feedback received from the user for a +// single turn of the bot response. +// +// - session: The name of the session the feedback was sent to. +func (r *ProjectsLocationsAgentsSessionsService) SubmitAnswerFeedback(session string, googleclouddialogflowcxv3beta1submitanswerfeedbackrequest *GoogleCloudDialogflowCxV3beta1SubmitAnswerFeedbackRequest) *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall { + c := &ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.session = session + c.googleclouddialogflowcxv3beta1submitanswerfeedbackrequest = googleclouddialogflowcxv3beta1submitanswerfeedbackrequest + 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 *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall { + 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 *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1submitanswerfeedbackrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:submitAnswerFeedback") + 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{ + "session": c.session, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.submitAnswerFeedback" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1AnswerFeedback.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 *ProjectsLocationsAgentsSessionsSubmitAnswerFeedbackCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1AnswerFeedback, 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 := &GoogleCloudDialogflowCxV3beta1AnswerFeedback{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsEntityTypesCreateCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a session entity type. +// +// - parent: The session to create a session entity type for. Format: +// `projects//locations//agents//sessions/` or +// `projects//locations//agents//environments//sessions/`. If `Environment +// ID` is not specified, we assume default 'draft' environment. +func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Create(parent string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { + c := &ProjectsLocationsAgentsSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype + 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 *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1SessionEntityType.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 *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, 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 := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsEntityTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified session entity type. +// +// - name: The name of the session entity type to delete. Format: +// `projects//locations//agents//sessions//entityTypes/` or +// `projects//locations//agents//environments//sessions//entityTypes/`. If +// `Environment ID` is not specified, we assume default 'draft' environment. +func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { + c := &ProjectsLocationsAgentsSessionsEntityTypesDeleteCall{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 *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsEntityTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves the specified session entity type. +// +// - name: The name of the session entity type. Format: +// `projects//locations//agents//sessions//entityTypes/` or +// `projects//locations//agents//environments//sessions//entityTypes/`. If +// `Environment ID` is not specified, we assume default 'draft' environment. +func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { + c := &ProjectsLocationsAgentsSessionsEntityTypesGetCall{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 *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1SessionEntityType.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 *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, 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 := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsSessionsEntityTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns the list of all session entity types in the specified session. +// +// - parent: The session to list all session entity types from. Format: +// `projects//locations//agents//sessions/` or +// `projects//locations//agents//environments//sessions/`. If `Environment +// ID` is not specified, we assume default 'draft' environment. +func (r *ProjectsLocationsAgentsSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { + c := &ProjectsLocationsAgentsSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return in a single page. By default 100 and at most 1000. +func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsSessionsEntityTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous list request. +func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesListCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesListCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse.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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse, 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 := &GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ProjectsLocationsAgentsSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse) 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 ProjectsLocationsAgentsSessionsEntityTypesPatchCall struct { + s *Service + nameid string + googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified session entity type. +// +// - name: The unique identifier of the session entity type. Format: +// `projects//locations//agents//sessions//entityTypes/` or +// `projects//locations//agents//environments//sessions//entityTypes/`. If +// `Environment ID` is not specified, we assume default 'draft' environment. +func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { + c := &ProjectsLocationsAgentsSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype + return c +} + +// UpdateMask sets the optional parameter "updateMask": The mask to control +// which fields get updated. +func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { + 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 *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1SessionEntityType.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 *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, 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 := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsTestCasesBatchDeleteCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1batchdeletetestcasesrequest *GoogleCloudDialogflowCxV3beta1BatchDeleteTestCasesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchDelete: Batch deletes test cases. +// +// - parent: The agent to delete test cases from. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsTestCasesService) BatchDelete(parent string, googleclouddialogflowcxv3beta1batchdeletetestcasesrequest *GoogleCloudDialogflowCxV3beta1BatchDeleteTestCasesRequest) *ProjectsLocationsAgentsTestCasesBatchDeleteCall { + c := &ProjectsLocationsAgentsTestCasesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1batchdeletetestcasesrequest = googleclouddialogflowcxv3beta1batchdeletetestcasesrequest + 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 *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesBatchDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesBatchDeleteCall { + 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 *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsTestCasesBatchDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1batchdeletetestcasesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:batchDelete") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.testCases.batchDelete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsTestCasesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31001,54 +34159,388 @@ type ProjectsLocationsAgentsTestCasesBatchRunCall struct { header_ http.Header } -// BatchRun: Kicks off a batch run of test cases. This method is a long-running -// operation +// BatchRun: Kicks off a batch run of test cases. This method is a long-running +// operation +// (https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned `Operation` type has the following method-specific fields: - +// `metadata`: BatchRunTestCasesMetadata - `response`: +// BatchRunTestCasesResponse +// +// - parent: Agent name. Format: `projects//locations//agents/ `. +func (r *ProjectsLocationsAgentsTestCasesService) BatchRun(parent string, googleclouddialogflowcxv3beta1batchruntestcasesrequest *GoogleCloudDialogflowCxV3beta1BatchRunTestCasesRequest) *ProjectsLocationsAgentsTestCasesBatchRunCall { + c := &ProjectsLocationsAgentsTestCasesBatchRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1batchruntestcasesrequest = googleclouddialogflowcxv3beta1batchruntestcasesrequest + 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 *ProjectsLocationsAgentsTestCasesBatchRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesBatchRunCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsTestCasesBatchRunCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesBatchRunCall { + 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 *ProjectsLocationsAgentsTestCasesBatchRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsTestCasesBatchRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1batchruntestcasesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:batchRun") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.testCases.batchRun" 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 *ProjectsLocationsAgentsTestCasesBatchRunCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsTestCasesCalculateCoverageCall struct { + s *Service + agent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CalculateCoverage: Calculates the test coverage for an agent. +// +// - agent: The agent to calculate coverage for. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsTestCasesService) CalculateCoverage(agent string) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { + c := &ProjectsLocationsAgentsTestCasesCalculateCoverageCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.agent = agent + return c +} + +// Type sets the optional parameter "type": Required. The type of coverage +// requested. +// +// Possible values: +// +// "COVERAGE_TYPE_UNSPECIFIED" - Should never be used. +// "INTENT" - Intent coverage. +// "PAGE_TRANSITION" - Page transition coverage. +// "TRANSITION_ROUTE_GROUP" - Transition route group coverage. +func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Type(type_ string) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { + c.urlParams_.Set("type", type_) + 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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { + 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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { + 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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+agent}/testCases:calculateCoverage") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "agent": c.agent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.testCases.calculateCoverage" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1CalculateCoverageResponse.ServerResponse.Heade +// r or (if a response was 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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1CalculateCoverageResponse, 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 := &GoogleCloudDialogflowCxV3beta1CalculateCoverageResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsTestCasesCreateCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1testcase *GoogleCloudDialogflowCxV3beta1TestCase + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a test case for the given agent. +// +// - parent: The agent to create the test case for. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsTestCasesService) Create(parent string, googleclouddialogflowcxv3beta1testcase *GoogleCloudDialogflowCxV3beta1TestCase) *ProjectsLocationsAgentsTestCasesCreateCall { + c := &ProjectsLocationsAgentsTestCasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1testcase = googleclouddialogflowcxv3beta1testcase + 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 *ProjectsLocationsAgentsTestCasesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsTestCasesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesCreateCall { + 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 *ProjectsLocationsAgentsTestCasesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsTestCasesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1testcase) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.testCases.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1TestCase.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 *ProjectsLocationsAgentsTestCasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCase, 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 := &GoogleCloudDialogflowCxV3beta1TestCase{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsTestCasesExportCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1exporttestcasesrequest *GoogleCloudDialogflowCxV3beta1ExportTestCasesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports the test cases under the agent to a Cloud Storage bucket or +// a local file. Filter can be applied to export a subset of test cases. This +// method is a long-running operation // (https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned `Operation` type has the following method-specific fields: - -// `metadata`: BatchRunTestCasesMetadata - `response`: -// BatchRunTestCasesResponse +// `metadata`: ExportTestCasesMetadata - `response`: ExportTestCasesResponse // -// - parent: Agent name. Format: `projects//locations//agents/ `. -func (r *ProjectsLocationsAgentsTestCasesService) BatchRun(parent string, googleclouddialogflowcxv3beta1batchruntestcasesrequest *GoogleCloudDialogflowCxV3beta1BatchRunTestCasesRequest) *ProjectsLocationsAgentsTestCasesBatchRunCall { - c := &ProjectsLocationsAgentsTestCasesBatchRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The agent where to export test cases from. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsTestCasesService) Export(parent string, googleclouddialogflowcxv3beta1exporttestcasesrequest *GoogleCloudDialogflowCxV3beta1ExportTestCasesRequest) *ProjectsLocationsAgentsTestCasesExportCall { + c := &ProjectsLocationsAgentsTestCasesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddialogflowcxv3beta1batchruntestcasesrequest = googleclouddialogflowcxv3beta1batchruntestcasesrequest + c.googleclouddialogflowcxv3beta1exporttestcasesrequest = googleclouddialogflowcxv3beta1exporttestcasesrequest 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 *ProjectsLocationsAgentsTestCasesBatchRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesBatchRunCall { +func (c *ProjectsLocationsAgentsTestCasesExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesExportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesBatchRunCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesBatchRunCall { +func (c *ProjectsLocationsAgentsTestCasesExportCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesExportCall { 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 *ProjectsLocationsAgentsTestCasesBatchRunCall) Header() http.Header { +func (c *ProjectsLocationsAgentsTestCasesExportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesBatchRunCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsTestCasesExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1batchruntestcasesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1exporttestcasesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:batchRun") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:export") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31061,13 +34553,13 @@ func (c *ProjectsLocationsAgentsTestCasesBatchRunCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.batchRun" call. +// Do executes the "dialogflow.projects.locations.agents.testCases.export" 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 *ProjectsLocationsAgentsTestCasesBatchRunCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAgentsTestCasesExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31099,43 +34591,282 @@ func (c *ProjectsLocationsAgentsTestCasesBatchRunCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsAgentsTestCasesCalculateCoverageCall struct { +type ProjectsLocationsAgentsTestCasesGetCall struct { s *Service - agent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CalculateCoverage: Calculates the test coverage for an agent. +// Get: Gets a test case. // -// - agent: The agent to calculate coverage for. Format: +// - name: The name of the testcase. Format: +// `projects//locations//agents//testCases/`. +func (r *ProjectsLocationsAgentsTestCasesService) Get(name string) *ProjectsLocationsAgentsTestCasesGetCall { + c := &ProjectsLocationsAgentsTestCasesGetCall{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 *ProjectsLocationsAgentsTestCasesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesGetCall { + 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 *ProjectsLocationsAgentsTestCasesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsTestCasesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesGetCall { + 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 *ProjectsLocationsAgentsTestCasesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsTestCasesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.testCases.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1TestCase.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 *ProjectsLocationsAgentsTestCasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCase, 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 := &GoogleCloudDialogflowCxV3beta1TestCase{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsTestCasesImportCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1importtestcasesrequest *GoogleCloudDialogflowCxV3beta1ImportTestCasesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports the test cases from a Cloud Storage bucket or a local file. +// It always creates new test cases and won't overwrite any existing ones. The +// provided ID in the imported test case is neglected. This method is a +// long-running operation +// (https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned `Operation` type has the following method-specific fields: - +// `metadata`: ImportTestCasesMetadata - `response`: ImportTestCasesResponse +// +// - parent: The agent to import test cases to. Format: // `projects//locations//agents/`. -func (r *ProjectsLocationsAgentsTestCasesService) CalculateCoverage(agent string) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { - c := &ProjectsLocationsAgentsTestCasesCalculateCoverageCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.agent = agent +func (r *ProjectsLocationsAgentsTestCasesService) Import(parent string, googleclouddialogflowcxv3beta1importtestcasesrequest *GoogleCloudDialogflowCxV3beta1ImportTestCasesRequest) *ProjectsLocationsAgentsTestCasesImportCall { + c := &ProjectsLocationsAgentsTestCasesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1importtestcasesrequest = googleclouddialogflowcxv3beta1importtestcasesrequest return c } -// Type sets the optional parameter "type": Required. The type of coverage -// requested. +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAgentsTestCasesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsTestCasesImportCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesImportCall { + 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 *ProjectsLocationsAgentsTestCasesImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsTestCasesImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1importtestcasesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:import") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.testCases.import" 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 *ProjectsLocationsAgentsTestCasesImportCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAgentsTestCasesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Fetches a list of test cases for a given agent. +// +// - parent: The agent to list all pages for. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsTestCasesService) List(parent string) *ProjectsLocationsAgentsTestCasesListCall { + c := &ProjectsLocationsAgentsTestCasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return in a single page. By default 20. Note that when TestCaseView = +// FULL, the maximum page size allowed is 20. When TestCaseView = BASIC, the +// maximum page size allowed is 500. +func (c *ProjectsLocationsAgentsTestCasesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsTestCasesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous list request. +func (c *ProjectsLocationsAgentsTestCasesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsTestCasesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": Specifies whether response should +// include all fields or just the metadata. // // Possible values: // -// "COVERAGE_TYPE_UNSPECIFIED" - Should never be used. -// "INTENT" - Intent coverage. -// "PAGE_TRANSITION" - Page transition coverage. -// "TRANSITION_ROUTE_GROUP" - Transition route group coverage. -func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Type(type_ string) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { - c.urlParams_.Set("type", type_) +// "TEST_CASE_VIEW_UNSPECIFIED" - The default / unset value. The API will +// +// default to the BASIC view. +// +// "BASIC" - Include basic metadata about the test case, but not the +// +// conversation turns. This is the default value. +// +// "FULL" - Include everything. +func (c *ProjectsLocationsAgentsTestCasesListCall) View(view string) *ProjectsLocationsAgentsTestCasesListCall { + 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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { +func (c *ProjectsLocationsAgentsTestCasesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31143,27 +34874,27 @@ func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Fields(s ...goog // 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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { +func (c *ProjectsLocationsAgentsTestCasesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesCalculateCoverageCall { +func (c *ProjectsLocationsAgentsTestCasesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesListCall { 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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Header() http.Header { +func (c *ProjectsLocationsAgentsTestCasesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsTestCasesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31171,7 +34902,7 @@ func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+agent}/testCases:calculateCoverage") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31179,18 +34910,18 @@ func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "agent": c.agent, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.calculateCoverage" call. +// Do executes the "dialogflow.projects.locations.agents.testCases.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1CalculateCoverageResponse.ServerResponse.Heade -// r or (if a response was returned at all) in error.(*googleapi.Error).Header. +// *GoogleCloudDialogflowCxV3beta1ListTestCasesResponse.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 *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1CalculateCoverageResponse, error) { +func (c *ProjectsLocationsAgentsTestCasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListTestCasesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31209,7 +34940,7 @@ func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1CalculateCoverageResponse{ + ret := &GoogleCloudDialogflowCxV3beta1ListTestCasesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31222,50 +34953,80 @@ func (c *ProjectsLocationsAgentsTestCasesCalculateCoverageCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsAgentsTestCasesCreateCall 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 *ProjectsLocationsAgentsTestCasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListTestCasesResponse) 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 ProjectsLocationsAgentsTestCasesPatchCall struct { s *Service - parent string + nameid string googleclouddialogflowcxv3beta1testcase *GoogleCloudDialogflowCxV3beta1TestCase urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a test case for the given agent. +// Patch: Updates the specified test case. // -// - parent: The agent to create the test case for. Format: -// `projects//locations//agents/`. -func (r *ProjectsLocationsAgentsTestCasesService) Create(parent string, googleclouddialogflowcxv3beta1testcase *GoogleCloudDialogflowCxV3beta1TestCase) *ProjectsLocationsAgentsTestCasesCreateCall { - c := &ProjectsLocationsAgentsTestCasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The unique identifier of the test case. TestCases.CreateTestCase +// will populate the name automatically. Otherwise use format: +// `projects//locations//agents/ /testCases/`. +func (r *ProjectsLocationsAgentsTestCasesService) Patch(nameid string, googleclouddialogflowcxv3beta1testcase *GoogleCloudDialogflowCxV3beta1TestCase) *ProjectsLocationsAgentsTestCasesPatchCall { + c := &ProjectsLocationsAgentsTestCasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid c.googleclouddialogflowcxv3beta1testcase = googleclouddialogflowcxv3beta1testcase return c } +// UpdateMask sets the optional parameter "updateMask": Required. The mask to +// specify which fields should be updated. The `creationTime` and +// `lastTestResult` cannot be updated. +func (c *ProjectsLocationsAgentsTestCasesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsTestCasesPatchCall { + 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 *ProjectsLocationsAgentsTestCasesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesCreateCall { +func (c *ProjectsLocationsAgentsTestCasesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesCreateCall { +func (c *ProjectsLocationsAgentsTestCasesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesPatchCall { 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 *ProjectsLocationsAgentsTestCasesCreateCall) Header() http.Header { +func (c *ProjectsLocationsAgentsTestCasesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsTestCasesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1testcase) @@ -31274,26 +35035,26 @@ func (c *ProjectsLocationsAgentsTestCasesCreateCall) doRequest(alt string) (*htt } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.create" call. +// Do executes the "dialogflow.projects.locations.agents.testCases.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudDialogflowCxV3beta1TestCase.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 *ProjectsLocationsAgentsTestCasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCase, error) { +func (c *ProjectsLocationsAgentsTestCasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCase, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31325,64 +35086,62 @@ func (c *ProjectsLocationsAgentsTestCasesCreateCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsAgentsTestCasesExportCall struct { - s *Service - parent string - googleclouddialogflowcxv3beta1exporttestcasesrequest *GoogleCloudDialogflowCxV3beta1ExportTestCasesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsTestCasesRunCall struct { + s *Service + name string + googleclouddialogflowcxv3beta1runtestcaserequest *GoogleCloudDialogflowCxV3beta1RunTestCaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Export: Exports the test cases under the agent to a Cloud Storage bucket or -// a local file. Filter can be applied to export a subset of test cases. This -// method is a long-running operation +// Run: Kicks off a test case run. This method is a long-running operation // (https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned `Operation` type has the following method-specific fields: - -// `metadata`: ExportTestCasesMetadata - `response`: ExportTestCasesResponse +// `metadata`: RunTestCaseMetadata - `response`: RunTestCaseResponse // -// - parent: The agent where to export test cases from. Format: -// `projects//locations//agents/`. -func (r *ProjectsLocationsAgentsTestCasesService) Export(parent string, googleclouddialogflowcxv3beta1exporttestcasesrequest *GoogleCloudDialogflowCxV3beta1ExportTestCasesRequest) *ProjectsLocationsAgentsTestCasesExportCall { - c := &ProjectsLocationsAgentsTestCasesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddialogflowcxv3beta1exporttestcasesrequest = googleclouddialogflowcxv3beta1exporttestcasesrequest +// - name: Format of test case name to run: `projects//locations/ +// /agents//testCases/`. +func (r *ProjectsLocationsAgentsTestCasesService) Run(name string, googleclouddialogflowcxv3beta1runtestcaserequest *GoogleCloudDialogflowCxV3beta1RunTestCaseRequest) *ProjectsLocationsAgentsTestCasesRunCall { + c := &ProjectsLocationsAgentsTestCasesRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddialogflowcxv3beta1runtestcaserequest = googleclouddialogflowcxv3beta1runtestcaserequest 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 *ProjectsLocationsAgentsTestCasesExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesExportCall { +func (c *ProjectsLocationsAgentsTestCasesRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesRunCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesExportCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesExportCall { +func (c *ProjectsLocationsAgentsTestCasesRunCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesRunCall { 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 *ProjectsLocationsAgentsTestCasesExportCall) Header() http.Header { +func (c *ProjectsLocationsAgentsTestCasesRunCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesExportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsTestCasesRunCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1exporttestcasesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1runtestcaserequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:export") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:run") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31390,18 +35149,18 @@ func (c *ProjectsLocationsAgentsTestCasesExportCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.export" call. +// Do executes the "dialogflow.projects.locations.agents.testCases.run" 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 *ProjectsLocationsAgentsTestCasesExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAgentsTestCasesRunCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31433,7 +35192,7 @@ func (c *ProjectsLocationsAgentsTestCasesExportCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsAgentsTestCasesGetCall struct { +type ProjectsLocationsAgentsTestCasesResultsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -31442,12 +35201,12 @@ type ProjectsLocationsAgentsTestCasesGetCall struct { header_ http.Header } -// Get: Gets a test case. +// Get: Gets a test case result. // // - name: The name of the testcase. Format: -// `projects//locations//agents//testCases/`. -func (r *ProjectsLocationsAgentsTestCasesService) Get(name string) *ProjectsLocationsAgentsTestCasesGetCall { - c := &ProjectsLocationsAgentsTestCasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects//locations//agents//testCases//results/`. +func (r *ProjectsLocationsAgentsTestCasesResultsService) Get(name string) *ProjectsLocationsAgentsTestCasesResultsGetCall { + c := &ProjectsLocationsAgentsTestCasesResultsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -31455,7 +35214,7 @@ func (r *ProjectsLocationsAgentsTestCasesService) Get(name string) *ProjectsLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAgentsTestCasesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesGetCall { +func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesResultsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31463,27 +35222,27 @@ func (c *ProjectsLocationsAgentsTestCasesGetCall) 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 *ProjectsLocationsAgentsTestCasesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesGetCall { +func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesResultsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesGetCall { +func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesResultsGetCall { 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 *ProjectsLocationsAgentsTestCasesGetCall) Header() http.Header { +func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31504,13 +35263,13 @@ func (c *ProjectsLocationsAgentsTestCasesGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.get" call. +// Do executes the "dialogflow.projects.locations.agents.testCases.results.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1TestCase.ServerResponse.Header or (if a +// *GoogleCloudDialogflowCxV3beta1TestCaseResult.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 *ProjectsLocationsAgentsTestCasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCase, error) { +func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCaseResult, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31529,7 +35288,7 @@ func (c *ProjectsLocationsAgentsTestCasesGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1TestCase{ + ret := &GoogleCloudDialogflowCxV3beta1TestCaseResult{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31542,67 +35301,100 @@ func (c *ProjectsLocationsAgentsTestCasesGetCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsAgentsTestCasesImportCall struct { - s *Service - parent string - googleclouddialogflowcxv3beta1importtestcasesrequest *GoogleCloudDialogflowCxV3beta1ImportTestCasesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsTestCasesResultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports the test cases from a Cloud Storage bucket or a local file. -// It always creates new test cases and won't overwrite any existing ones. The -// provided ID in the imported test case is neglected. This method is a -// long-running operation -// (https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). -// The returned `Operation` type has the following method-specific fields: - -// `metadata`: ImportTestCasesMetadata - `response`: ImportTestCasesResponse +// List: Fetches the list of run results for the given test case. A maximum of +// 100 results are kept for each test case. // -// - parent: The agent to import test cases to. Format: -// `projects//locations//agents/`. -func (r *ProjectsLocationsAgentsTestCasesService) Import(parent string, googleclouddialogflowcxv3beta1importtestcasesrequest *GoogleCloudDialogflowCxV3beta1ImportTestCasesRequest) *ProjectsLocationsAgentsTestCasesImportCall { - c := &ProjectsLocationsAgentsTestCasesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The test case to list results for. Format: +// `projects//locations//agents// testCases/`. Specify a `-` as a wildcard +// for TestCase ID to list results across multiple test cases. +func (r *ProjectsLocationsAgentsTestCasesResultsService) List(parent string) *ProjectsLocationsAgentsTestCasesResultsListCall { + c := &ProjectsLocationsAgentsTestCasesResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddialogflowcxv3beta1importtestcasesrequest = googleclouddialogflowcxv3beta1importtestcasesrequest + return c +} + +// Filter sets the optional parameter "filter": The filter expression used to +// filter test case results. See API Filtering (https://aip.dev/160). The +// expression is case insensitive. Only 'AND' is supported for logical +// operators. The supported syntax is listed below in detail: [AND ] ... [AND +// latest] The supported fields and operators are: field operator `environment` +// `=`, `IN` (Use value `draft` for draft environment) `test_time` `>`, `<` +// `latest` only returns the latest test result in all results for each test +// case. Examples: * "environment=draft AND latest" matches the latest test +// result for each test case in the draft environment. * "environment IN +// (e1,e2)" matches any test case results with an environment resource name of +// either "e1" or "e2". * "test_time > 1602540713" matches any test case +// results with test time later than a unix timestamp in seconds 1602540713. +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Filter(filter string) *ProjectsLocationsAgentsTestCasesResultsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return in a single page. By default 100 and at most 1000. +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsTestCasesResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous list request. +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsTestCasesResultsListCall { + 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 *ProjectsLocationsAgentsTestCasesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesImportCall { +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesResultsListCall { 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 *ProjectsLocationsAgentsTestCasesResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesResultsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesImportCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesImportCall { +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesResultsListCall { 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 *ProjectsLocationsAgentsTestCasesImportCall) Header() http.Header { +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1importtestcasesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/results") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -31613,13 +35405,13 @@ func (c *ProjectsLocationsAgentsTestCasesImportCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.import" call. +// Do executes the "dialogflow.projects.locations.agents.testCases.results.list" 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 *ProjectsLocationsAgentsTestCasesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31638,7 +35430,7 @@ func (c *ProjectsLocationsAgentsTestCasesImportCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31651,102 +35443,82 @@ func (c *ProjectsLocationsAgentsTestCasesImportCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsAgentsTestCasesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Fetches a list of test cases for a given agent. -// -// - parent: The agent to list all pages for. Format: -// `projects//locations//agents/`. -func (r *ProjectsLocationsAgentsTestCasesService) List(parent string) *ProjectsLocationsAgentsTestCasesListCall { - c := &ProjectsLocationsAgentsTestCasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of items -// to return in a single page. By default 20. Note that when TestCaseView = -// FULL, the maximum page size allowed is 20. When TestCaseView = BASIC, the -// maximum page size allowed is 500. -func (c *ProjectsLocationsAgentsTestCasesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsTestCasesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - 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 *ProjectsLocationsAgentsTestCasesResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse) 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) + } } -// PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous list request. -func (c *ProjectsLocationsAgentsTestCasesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsTestCasesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProjectsLocationsAgentsToolsCreateCall struct { + s *Service + parent string + googleclouddialogflowcxv3beta1tool *GoogleCloudDialogflowCxV3beta1Tool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Specifies whether response should -// include all fields or just the metadata. -// -// Possible values: -// -// "TEST_CASE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -// -// "BASIC" - Include basic metadata about the test case, but not the -// -// conversation turns. This is the default value. +// Create: Creates a Tool in the specified agent. // -// "FULL" - Include everything. -func (c *ProjectsLocationsAgentsTestCasesListCall) View(view string) *ProjectsLocationsAgentsTestCasesListCall { - c.urlParams_.Set("view", view) +// - parent: The agent to create a Tool for. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsToolsService) Create(parent string, googleclouddialogflowcxv3beta1tool *GoogleCloudDialogflowCxV3beta1Tool) *ProjectsLocationsAgentsToolsCreateCall { + c := &ProjectsLocationsAgentsToolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1tool = googleclouddialogflowcxv3beta1tool 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 *ProjectsLocationsAgentsTestCasesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesListCall { +func (c *ProjectsLocationsAgentsToolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsToolsCreateCall { 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 *ProjectsLocationsAgentsTestCasesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesListCall { +func (c *ProjectsLocationsAgentsToolsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsToolsCreateCall { 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 *ProjectsLocationsAgentsTestCasesListCall) Header() http.Header { +func (c *ProjectsLocationsAgentsToolsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesListCall) 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 *ProjectsLocationsAgentsToolsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1tool) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/testCases") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/tools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -31757,13 +35529,13 @@ func (c *ProjectsLocationsAgentsTestCasesListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.list" call. +// Do executes the "dialogflow.projects.locations.agents.tools.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1ListTestCasesResponse.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 +// *GoogleCloudDialogflowCxV3beta1Tool.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 *ProjectsLocationsAgentsTestCasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListTestCasesResponse, error) { +func (c *ProjectsLocationsAgentsToolsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Tool, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31782,7 +35554,7 @@ func (c *ProjectsLocationsAgentsTestCasesListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1ListTestCasesResponse{ + ret := &GoogleCloudDialogflowCxV3beta1Tool{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31795,108 +35567,82 @@ func (c *ProjectsLocationsAgentsTestCasesListCall) Do(opts ...googleapi.CallOpti 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 *ProjectsLocationsAgentsTestCasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListTestCasesResponse) 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 ProjectsLocationsAgentsTestCasesPatchCall struct { - s *Service - nameid string - googleclouddialogflowcxv3beta1testcase *GoogleCloudDialogflowCxV3beta1TestCase - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAgentsToolsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified test case. +// Delete: Deletes a specified Tool. // -// - name: The unique identifier of the test case. TestCases.CreateTestCase -// will populate the name automatically. Otherwise use format: -// `projects//locations//agents/ /testCases/`. -func (r *ProjectsLocationsAgentsTestCasesService) Patch(nameid string, googleclouddialogflowcxv3beta1testcase *GoogleCloudDialogflowCxV3beta1TestCase) *ProjectsLocationsAgentsTestCasesPatchCall { - c := &ProjectsLocationsAgentsTestCasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.nameid = nameid - c.googleclouddialogflowcxv3beta1testcase = googleclouddialogflowcxv3beta1testcase +// - name: The name of the Tool to be deleted. Format: +// `projects//locations//agents//tools/`. +func (r *ProjectsLocationsAgentsToolsService) Delete(name string) *ProjectsLocationsAgentsToolsDeleteCall { + c := &ProjectsLocationsAgentsToolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// UpdateMask sets the optional parameter "updateMask": Required. The mask to -// specify which fields should be updated. The `creationTime` and -// `lastTestResult` cannot be updated. -func (c *ProjectsLocationsAgentsTestCasesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsTestCasesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Force sets the optional parameter "force": This field has no effect for +// Tools not being used. For Tools that are used: * If `force` is set to false, +// an error will be returned with message indicating the referenced resources. +// * If `force` is set to true, Dialogflow will remove the tool, as well as any +// references to the tool. +func (c *ProjectsLocationsAgentsToolsDeleteCall) Force(force bool) *ProjectsLocationsAgentsToolsDeleteCall { + 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 *ProjectsLocationsAgentsTestCasesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesPatchCall { +func (c *ProjectsLocationsAgentsToolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsToolsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesPatchCall { +func (c *ProjectsLocationsAgentsToolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsToolsDeleteCall { 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 *ProjectsLocationsAgentsTestCasesPatchCall) Header() http.Header { +func (c *ProjectsLocationsAgentsToolsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsAgentsToolsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1testcase) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.nameid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.patch" call. +// Do executes the "dialogflow.projects.locations.agents.tools.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1TestCase.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 *ProjectsLocationsAgentsTestCasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCase, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsToolsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31915,7 +35661,7 @@ func (c *ProjectsLocationsAgentsTestCasesPatchCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1TestCase{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31928,62 +35674,59 @@ func (c *ProjectsLocationsAgentsTestCasesPatchCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsAgentsTestCasesRunCall struct { +type ProjectsLocationsAgentsToolsExportCall struct { s *Service - name string - googleclouddialogflowcxv3beta1runtestcaserequest *GoogleCloudDialogflowCxV3beta1RunTestCaseRequest + parent string + googleclouddialogflowcxv3beta1exporttoolsrequest *GoogleCloudDialogflowCxV3beta1ExportToolsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Run: Kicks off a test case run. This method is a long-running operation -// (https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). -// The returned `Operation` type has the following method-specific fields: - -// `metadata`: RunTestCaseMetadata - `response`: RunTestCaseResponse +// Export: Exports the selected tools. // -// - name: Format of test case name to run: `projects//locations/ -// /agents//testCases/`. -func (r *ProjectsLocationsAgentsTestCasesService) Run(name string, googleclouddialogflowcxv3beta1runtestcaserequest *GoogleCloudDialogflowCxV3beta1RunTestCaseRequest) *ProjectsLocationsAgentsTestCasesRunCall { - c := &ProjectsLocationsAgentsTestCasesRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddialogflowcxv3beta1runtestcaserequest = googleclouddialogflowcxv3beta1runtestcaserequest +// - parent: The agent to export tools from. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsToolsService) Export(parent string, googleclouddialogflowcxv3beta1exporttoolsrequest *GoogleCloudDialogflowCxV3beta1ExportToolsRequest) *ProjectsLocationsAgentsToolsExportCall { + c := &ProjectsLocationsAgentsToolsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowcxv3beta1exporttoolsrequest = googleclouddialogflowcxv3beta1exporttoolsrequest 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 *ProjectsLocationsAgentsTestCasesRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesRunCall { +func (c *ProjectsLocationsAgentsToolsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsToolsExportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesRunCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesRunCall { +func (c *ProjectsLocationsAgentsToolsExportCall) Context(ctx context.Context) *ProjectsLocationsAgentsToolsExportCall { 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 *ProjectsLocationsAgentsTestCasesRunCall) Header() http.Header { +func (c *ProjectsLocationsAgentsToolsExportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesRunCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsToolsExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1runtestcaserequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1exporttoolsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:run") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/tools:export") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31991,18 +35734,18 @@ func (c *ProjectsLocationsAgentsTestCasesRunCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.run" call. +// Do executes the "dialogflow.projects.locations.agents.tools.export" 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 *ProjectsLocationsAgentsTestCasesRunCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAgentsToolsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32034,7 +35777,7 @@ func (c *ProjectsLocationsAgentsTestCasesRunCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsAgentsTestCasesResultsGetCall struct { +type ProjectsLocationsAgentsToolsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32043,12 +35786,11 @@ type ProjectsLocationsAgentsTestCasesResultsGetCall struct { header_ http.Header } -// Get: Gets a test case result. +// Get: Retrieves the specified Tool. // -// - name: The name of the testcase. Format: -// `projects//locations//agents//testCases//results/`. -func (r *ProjectsLocationsAgentsTestCasesResultsService) Get(name string) *ProjectsLocationsAgentsTestCasesResultsGetCall { - c := &ProjectsLocationsAgentsTestCasesResultsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Tool. Format: `projects//locations//agents//tools/`. +func (r *ProjectsLocationsAgentsToolsService) Get(name string) *ProjectsLocationsAgentsToolsGetCall { + c := &ProjectsLocationsAgentsToolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32056,7 +35798,7 @@ func (r *ProjectsLocationsAgentsTestCasesResultsService) Get(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesResultsGetCall { +func (c *ProjectsLocationsAgentsToolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsToolsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32064,27 +35806,27 @@ func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Fields(s ...googleapi.F // 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 *ProjectsLocationsAgentsTestCasesResultsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesResultsGetCall { +func (c *ProjectsLocationsAgentsToolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsToolsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesResultsGetCall { +func (c *ProjectsLocationsAgentsToolsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsToolsGetCall { 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 *ProjectsLocationsAgentsTestCasesResultsGetCall) Header() http.Header { +func (c *ProjectsLocationsAgentsToolsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsToolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32105,13 +35847,13 @@ func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.results.get" call. +// Do executes the "dialogflow.projects.locations.agents.tools.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1TestCaseResult.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDialogflowCxV3beta1Tool.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 *ProjectsLocationsAgentsTestCasesResultsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TestCaseResult, error) { +func (c *ProjectsLocationsAgentsToolsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Tool, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32130,7 +35872,7 @@ func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1TestCaseResult{ + ret := &GoogleCloudDialogflowCxV3beta1Tool{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32143,7 +35885,7 @@ func (c *ProjectsLocationsAgentsTestCasesResultsGetCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsAgentsTestCasesResultsListCall struct { +type ProjectsLocationsAgentsToolsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -32152,45 +35894,26 @@ type ProjectsLocationsAgentsTestCasesResultsListCall struct { header_ http.Header } -// List: Fetches the list of run results for the given test case. A maximum of -// 100 results are kept for each test case. +// List: Returns a list of Tools in the specified agent. // -// - parent: The test case to list results for. Format: -// `projects//locations//agents// testCases/`. Specify a `-` as a wildcard -// for TestCase ID to list results across multiple test cases. -func (r *ProjectsLocationsAgentsTestCasesResultsService) List(parent string) *ProjectsLocationsAgentsTestCasesResultsListCall { - c := &ProjectsLocationsAgentsTestCasesResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The agent to list the Tools from. Format: +// `projects//locations//agents/`. +func (r *ProjectsLocationsAgentsToolsService) List(parent string) *ProjectsLocationsAgentsToolsListCall { + c := &ProjectsLocationsAgentsToolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The filter expression used to -// filter test case results. See API Filtering (https://aip.dev/160). The -// expression is case insensitive. Only 'AND' is supported for logical -// operators. The supported syntax is listed below in detail: [AND ] ... [AND -// latest] The supported fields and operators are: field operator `environment` -// `=`, `IN` (Use value `draft` for draft environment) `test_time` `>`, `<` -// `latest` only returns the latest test result in all results for each test -// case. Examples: * "environment=draft AND latest" matches the latest test -// result for each test case in the draft environment. * "environment IN -// (e1,e2)" matches any test case results with an environment resource name of -// either "e1" or "e2". * "test_time > 1602540713" matches any test case -// results with test time later than a unix timestamp in seconds 1602540713. -func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Filter(filter string) *ProjectsLocationsAgentsTestCasesResultsListCall { - c.urlParams_.Set("filter", filter) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of items // to return in a single page. By default 100 and at most 1000. -func (c *ProjectsLocationsAgentsTestCasesResultsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsTestCasesResultsListCall { +func (c *ProjectsLocationsAgentsToolsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsToolsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The next_page_token value // returned from a previous list request. -func (c *ProjectsLocationsAgentsTestCasesResultsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsTestCasesResultsListCall { +func (c *ProjectsLocationsAgentsToolsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsToolsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -32198,7 +35921,7 @@ func (c *ProjectsLocationsAgentsTestCasesResultsListCall) PageToken(pageToken st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsTestCasesResultsListCall { +func (c *ProjectsLocationsAgentsToolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsToolsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32206,27 +35929,27 @@ func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Fields(s ...googleapi. // 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 *ProjectsLocationsAgentsTestCasesResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsTestCasesResultsListCall { +func (c *ProjectsLocationsAgentsToolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsToolsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsTestCasesResultsListCall { +func (c *ProjectsLocationsAgentsToolsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsToolsListCall { 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 *ProjectsLocationsAgentsTestCasesResultsListCall) Header() http.Header { +func (c *ProjectsLocationsAgentsToolsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAgentsTestCasesResultsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAgentsToolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32234,7 +35957,7 @@ func (c *ProjectsLocationsAgentsTestCasesResultsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/results") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/tools") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32247,13 +35970,13 @@ func (c *ProjectsLocationsAgentsTestCasesResultsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dialogflow.projects.locations.agents.testCases.results.list" call. +// Do executes the "dialogflow.projects.locations.agents.tools.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse, error) { +// *GoogleCloudDialogflowCxV3beta1ListToolsResponse.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 *ProjectsLocationsAgentsToolsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListToolsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32272,7 +35995,7 @@ func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse{ + ret := &GoogleCloudDialogflowCxV3beta1ListToolsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32288,7 +36011,7 @@ func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Do(opts ...googleapi.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 *ProjectsLocationsAgentsTestCasesResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListTestCaseResultsResponse) error) error { +func (c *ProjectsLocationsAgentsToolsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListToolsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -32306,6 +36029,117 @@ func (c *ProjectsLocationsAgentsTestCasesResultsListCall) Pages(ctx context.Cont } } +type ProjectsLocationsAgentsToolsPatchCall struct { + s *Service + nameid string + googleclouddialogflowcxv3beta1tool *GoogleCloudDialogflowCxV3beta1Tool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the specified Tool. +// +// - name: The unique identifier of the Tool. Format: +// `projects//locations//agents//tools/`. +func (r *ProjectsLocationsAgentsToolsService) Patch(nameid string, googleclouddialogflowcxv3beta1tool *GoogleCloudDialogflowCxV3beta1Tool) *ProjectsLocationsAgentsToolsPatchCall { + c := &ProjectsLocationsAgentsToolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.googleclouddialogflowcxv3beta1tool = googleclouddialogflowcxv3beta1tool + return c +} + +// UpdateMask sets the optional parameter "updateMask": The mask to control +// which fields get updated. If the mask is not present, all fields will be +// updated. +func (c *ProjectsLocationsAgentsToolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsToolsPatchCall { + 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 *ProjectsLocationsAgentsToolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsToolsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAgentsToolsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsToolsPatchCall { + 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 *ProjectsLocationsAgentsToolsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsToolsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1tool) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.tools.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDialogflowCxV3beta1Tool.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 *ProjectsLocationsAgentsToolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Tool, 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 := &GoogleCloudDialogflowCxV3beta1Tool{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsAgentsTransitionRouteGroupsCreateCall struct { s *Service parent string diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index d2e36428143..50e6ef3bda8 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -5412,6 +5412,47 @@ }, "userEvents": { "methods": { + "collect": { + "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/userEvents:collect", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userEvents.collect", + "parameterOrder": [ + "parent" + ], + "parameters": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + "location": "query", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/userEvents:collect", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/userEvents:write", @@ -5550,7 +5591,7 @@ } } }, - "revision": "20240530", + "revision": "20240607", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6082,6 +6123,20 @@ "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" } }, "type": "object" @@ -6870,6 +6925,114 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Chunk": { + "description": "Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.", + "id": "GoogleCloudDiscoveryengineV1Chunk", + "properties": { + "chunkMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1ChunkChunkMetadata", + "description": "Output only. Metadata of the current chunk.", + "readOnly": true + }, + "content": { + "description": "Content is a string from a document (parsed content).", + "type": "string" + }, + "derivedStructData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.", + "readOnly": true, + "type": "object" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1ChunkDocumentMetadata", + "description": "Metadata of the document from the current chunk." + }, + "id": { + "description": "Unique chunk ID of the current chunk.", + "type": "string" + }, + "name": { + "description": "The full resource name of the chunk. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "pageSpan": { + "$ref": "GoogleCloudDiscoveryengineV1ChunkPageSpan", + "description": "Page span of the chunk." + }, + "relevanceScore": { + "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ChunkChunkMetadata": { + "description": "Metadata of the current chunk. This field is only populated on SearchService.Search API.", + "id": "GoogleCloudDiscoveryengineV1ChunkChunkMetadata", + "properties": { + "nextChunks": { + "description": "The next chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is only populated on SearchService.Search API.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Chunk" + }, + "type": "array" + }, + "previousChunks": { + "description": "The previous chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field is only populated on SearchService.Search API.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Chunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ChunkDocumentMetadata": { + "description": "Document metadata contains the information of the document of the current chunk.", + "id": "GoogleCloudDiscoveryengineV1ChunkDocumentMetadata", + "properties": { + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", + "type": "object" + }, + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "Uri of the document.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ChunkPageSpan": { + "description": "Page span of the chunk.", + "id": "GoogleCloudDiscoveryengineV1ChunkPageSpan", + "properties": { + "pageEnd": { + "description": "The end page of the chunk.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "The start page of the chunk.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1CloudSqlSource": { "description": "Cloud SQL source import data from.", "id": "GoogleCloudDiscoveryengineV1CloudSqlSource", @@ -9266,10 +9429,28 @@ "description": "A specification for configuring the behavior of content search.", "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", "properties": { + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" + }, "extractiveContentSpec": { "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + }, "snippetSpec": { "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", "description": "If `snippetSpec` is not specified, snippets are not included in the search response." @@ -9281,6 +9462,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "properties": { + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" + }, + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec": { "description": "A specification for configuring the extractive content in a search response.", "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", @@ -9650,6 +9848,10 @@ "description": "Represents the search results.", "id": "GoogleCloudDiscoveryengineV1SearchResponseSearchResult", "properties": { + "chunk": { + "$ref": "GoogleCloudDiscoveryengineV1Chunk", + "description": "The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS." + }, "document": { "$ref": "GoogleCloudDiscoveryengineV1Document", "description": "The document data snippet in the search response. Only fields that are marked as `retrievable` are populated." diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index f4f632d21d8..4e279843e2e 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1544,6 +1544,20 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams struct // see Ordering (https://cloud.google.com/retail/docs/filter-and-order#order) // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. OrderBy string `json:"orderBy,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode is based on + // DataStore.DocumentProcessingConfig.chunking_config: * If + // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults + // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See parse and chunk + // documents + // (https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2660,6 +2674,146 @@ func (s *GoogleCloudDiscoveryengineV1CheckGroundingSpec) UnmarshalJSON(data []by return nil } +// GoogleCloudDiscoveryengineV1Chunk: Chunk captures all raw metadata +// information of items to be recommended or searched in the chunk mode. +type GoogleCloudDiscoveryengineV1Chunk struct { + // ChunkMetadata: Output only. Metadata of the current chunk. + ChunkMetadata *GoogleCloudDiscoveryengineV1ChunkChunkMetadata `json:"chunkMetadata,omitempty"` + // Content: Content is a string from a document (parsed content). + Content string `json:"content,omitempty"` + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It contains + // derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1ChunkDocumentMetadata `json:"documentMetadata,omitempty"` + // Id: Unique chunk ID of the current chunk. + Id string `json:"id,omitempty"` + // Name: The full resource name of the chunk. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDiscoveryengineV1ChunkPageSpan `json:"pageSpan,omitempty"` + // RelevanceScore: Output only. Represents the relevance score based on + // similarity. Higher score indicates higher chunk relevance. The score is in + // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkMetadata") 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. "ChunkMetadata") 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 *GoogleCloudDiscoveryengineV1Chunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Chunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1Chunk) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1Chunk + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} + +// GoogleCloudDiscoveryengineV1ChunkChunkMetadata: Metadata of the current +// chunk. This field is only populated on SearchService.Search API. +type GoogleCloudDiscoveryengineV1ChunkChunkMetadata struct { + // NextChunks: The next chunks of the current chunk. The number is controlled + // by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is + // only populated on SearchService.Search API. + NextChunks []*GoogleCloudDiscoveryengineV1Chunk `json:"nextChunks,omitempty"` + // PreviousChunks: The previous chunks of the current chunk. The number is + // controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. + // This field is only populated on SearchService.Search API. + PreviousChunks []*GoogleCloudDiscoveryengineV1Chunk `json:"previousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NextChunks") 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. "NextChunks") 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 *GoogleCloudDiscoveryengineV1ChunkChunkMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ChunkChunkMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ChunkDocumentMetadata: Document metadata +// contains the information of the document of the current chunk. +type GoogleCloudDiscoveryengineV1ChunkDocumentMetadata struct { + // StructData: Data representation. The structured JSON data for the document. + // It should conform to the registered Schema or an `INVALID_ARGUMENT` error is + // thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "StructData") 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. "StructData") 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 *GoogleCloudDiscoveryengineV1ChunkDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ChunkDocumentMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ChunkPageSpan: Page span of the chunk. +type GoogleCloudDiscoveryengineV1ChunkPageSpan struct { + // PageEnd: The end page of the chunk. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: The start page of the chunk. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") 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. "PageEnd") 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 *GoogleCloudDiscoveryengineV1ChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ChunkPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1CloudSqlSource: Cloud SQL source import data // from. type GoogleCloudDiscoveryengineV1CloudSqlSource struct { @@ -6184,24 +6338,40 @@ func (s *GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpec) U // GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec: A specification // for configuring the behavior of content search. type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` // ExtractiveContentSpec: If there is no extractive_content_spec provided, // there will be no extractive answer in the search response. ExtractiveContentSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode is based on + // DataStore.DocumentProcessingConfig.chunking_config: * If + // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults + // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. SnippetSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` // SummarySpec: If `summarySpec` is not specified, summaries are not included // in the search response. SummarySpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExtractiveContentSpec") to + // ForceSendFields is a list of field names (e.g. "ChunkSpec") 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. "ExtractiveContentSpec") 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. "ChunkSpec") 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:"-"` } @@ -6211,6 +6381,37 @@ func (s *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec) MarshalJSON return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") 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. "NumNextChunks") 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 *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSp // ec: A specification for configuring the extractive content in a search // response. @@ -6804,18 +7005,21 @@ func (s *GoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo) MarshalJS // GoogleCloudDiscoveryengineV1SearchResponseSearchResult: Represents the // search results. type GoogleCloudDiscoveryengineV1SearchResponseSearchResult struct { + // Chunk: The chunk data in the search response if the + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + Chunk *GoogleCloudDiscoveryengineV1Chunk `json:"chunk,omitempty"` // Document: The document data snippet in the search response. Only fields that // are marked as `retrievable` are populated. Document *GoogleCloudDiscoveryengineV1Document `json:"document,omitempty"` // Id: Document.id of the searched Document. Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") 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. "Chunk") 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. "Document") to include in API + // NullFields is a list of field names (e.g. "Chunk") 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. @@ -32440,6 +32644,143 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { + c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsUserEventsCollectCall) Uri(uri string) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) + 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 *ProjectsLocationsUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserEventsCollectCall { + 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 *ProjectsLocationsUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsUserEventsCollectCall { + 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 *ProjectsLocationsUserEventsCollectCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userEvents:collect") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userEvents.collect" 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 *ProjectsLocationsUserEventsCollectCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsUserEventsWriteCall struct { s *Service parent string diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 4194cc3e440..1120a86053b 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -6423,6 +6423,38 @@ } } }, + "requirements": { + "methods": { + "checkRequirement": { + "description": "Check a particular requirement.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/requirements:checkRequirement", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.requirements.checkRequirement", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. Full resource name of the location. Format `projects/{project_number_or_id}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+location}/requirements:checkRequirement", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "sampleQuerySets": { "resources": { "operations": { @@ -6458,6 +6490,47 @@ }, "userEvents": { "methods": { + "collect": { + "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:collect", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userEvents.collect", + "parameterOrder": [ + "parent" + ], + "parameters": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + "location": "query", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:collect", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:write", @@ -6568,9 +6641,177 @@ } } }, - "revision": "20240530", + "revision": "20240607", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { + "GoogleApiDistribution": { + "description": "`Distribution` contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets. The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths. Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the `mean` and `sum_of_squared_deviation` fields meaningless.", + "id": "GoogleApiDistribution", + "properties": { + "bucketCounts": { + "description": "The number of values in each bucket of the histogram, as described in `bucket_options`. If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in `bucket_counts` must equal the value in the `count` field of the distribution. If present, `bucket_counts` should contain N values, where N is the number of buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering schemes described for the three bucket types. The first value must be the count for the underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number N-1).", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "bucketOptions": { + "$ref": "GoogleApiDistributionBucketOptions", + "description": "Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then omit this field." + }, + "count": { + "description": "The number of values in the population. Must be non-negative. This value must equal the sum of the values in `bucket_counts` if a histogram is provided.", + "format": "int64", + "type": "string" + }, + "exemplars": { + "description": "Must be in increasing order of `value` field.", + "items": { + "$ref": "GoogleApiDistributionExemplar" + }, + "type": "array" + }, + "mean": { + "description": "The arithmetic mean of the values in the population. If `count` is zero then this field must be zero.", + "format": "double", + "type": "number" + }, + "range": { + "$ref": "GoogleApiDistributionRange", + "description": "If specified, contains the range of the population values. The field must not be present if the `count` is zero." + }, + "sumOfSquaredDeviation": { + "description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, \"The Art of Computer Programming\", Vol. 2, page 232, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` is zero then this field must be zero.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionBucketOptions": { + "description": "`BucketOptions` describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. `BucketOptions` does not include the number of values in each bucket. A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i \u003e 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.", + "id": "GoogleApiDistributionBucketOptions", + "properties": { + "explicitBuckets": { + "$ref": "GoogleApiDistributionBucketOptionsExplicit", + "description": "The explicit buckets." + }, + "exponentialBuckets": { + "$ref": "GoogleApiDistributionBucketOptionsExponential", + "description": "The exponential buckets." + }, + "linearBuckets": { + "$ref": "GoogleApiDistributionBucketOptionsLinear", + "description": "The linear bucket." + } + }, + "type": "object" + }, + "GoogleApiDistributionBucketOptionsExplicit": { + "description": "Specifies a set of buckets with arbitrary widths. There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): bounds[i] Lower bound (1 \u003c= i \u003c N); bounds[i - 1] The `bounds` field must contain at least one element. If `bounds` has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.", + "id": "GoogleApiDistributionBucketOptionsExplicit", + "properties": { + "bounds": { + "description": "The values must be monotonically increasing.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleApiDistributionBucketOptionsExponential": { + "description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i). Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).", + "id": "GoogleApiDistributionBucketOptionsExponential", + "properties": { + "growthFactor": { + "description": "Must be greater than 1.", + "format": "double", + "type": "number" + }, + "numFiniteBuckets": { + "description": "Must be greater than 0.", + "format": "int32", + "type": "integer" + }, + "scale": { + "description": "Must be greater than 0.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionBucketOptionsLinear": { + "description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): offset + (width * i). Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).", + "id": "GoogleApiDistributionBucketOptionsLinear", + "properties": { + "numFiniteBuckets": { + "description": "Must be greater than 0.", + "format": "int32", + "type": "integer" + }, + "offset": { + "description": "Lower bound of the first bucket.", + "format": "double", + "type": "number" + }, + "width": { + "description": "Must be greater than 0.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionExemplar": { + "description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.", + "id": "GoogleApiDistributionExemplar", + "properties": { + "attachments": { + "description": "Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "timestamp": { + "description": "The observation (sampling) time of the above value.", + "format": "google-datetime", + "type": "string" + }, + "value": { + "description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionRange": { + "description": "The range of the population values.", + "id": "GoogleApiDistributionRange", + "properties": { + "max": { + "description": "The maximum of the population values.", + "format": "double", + "type": "number" + }, + "min": { + "description": "The minimum of the population values.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleApiHttpBody": { "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", "id": "GoogleApiHttpBody", @@ -6598,6 +6839,24 @@ }, "type": "object" }, + "GoogleApiMonitoredResource": { + "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for `\"gce_instance\"` has labels `\"project_id\"`, `\"instance_id\"` and `\"zone\"`: { \"type\": \"gce_instance\", \"labels\": { \"project_id\": \"my-project\", \"instance_id\": \"12345678901234\", \"zone\": \"us-central1-a\" }}", + "id": "GoogleApiMonitoredResource", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `\"project_id\"`, `\"instance_id\"`, and `\"zone\"`.", + "type": "object" + }, + "type": { + "description": "Required. The monitored resource type. This field must match the `type` field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is `gce_instance`. Some descriptors include the service name in the type; for example, the type of a Datastream stream is `datastream.googleapis.com/Stream`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineLoggingErrorContext": { "description": "A description of the context in which an error occurred.", "id": "GoogleCloudDiscoveryengineLoggingErrorContext", @@ -9214,6 +9473,95 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest": { + "description": "Request for CheckRequirement method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest", + "properties": { + "requirementType": { + "description": "A Requirement.type specifying the requirement to check.", + "type": "string" + }, + "resources": { + "description": "The resources to be checked for this requirement.", + "items": { + "$ref": "GoogleApiMonitoredResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse": { + "description": "Response for CheckRequirement method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse", + "properties": { + "metricResults": { + "description": "Metric results.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult" + }, + "type": "array" + }, + "oldestMetricTimestamp": { + "description": "Timestamp of the oldest calculated metric (i.e. the most stale metric). Indicates that the `requirement_result` may not accurately reflect any Event and Product Catalog updates performed after this time.", + "format": "google-datetime", + "type": "string" + }, + "requirement": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirement", + "description": "Requirement definition." + }, + "requirementCondition": { + "$ref": "GoogleTypeExpr", + "description": "The condition for evaluating the requirement result." + }, + "requirementResult": { + "description": "Requirement result, e.g. pass or fail.", + "enum": [ + "UNKNOWN", + "SUCCESS", + "FAILURE", + "WARNING" + ], + "enumDescriptions": [ + "The requirement is unknown.", + "The requirement check is passed.", + "The requirement check fails to meet at least one blocking threshold.", + "The requirement check fails at least one warning threshold, but passes all blocking thresholds." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult": { + "description": "Metric result. The metric are in the requirement_condition.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult", + "properties": { + "metricType": { + "description": "Type identifier of the metric corresponding to this query result.", + "type": "string" + }, + "name": { + "description": "This metric query name is mapping to variables in the requirement_condition.", + "type": "string" + }, + "timestamp": { + "description": "Time corresponding to when this metric value was calculated.", + "format": "google-datetime", + "type": "string" + }, + "unit": { + "description": "The unit in which this metric is reported. Follows [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard.", + "type": "string" + }, + "value": { + "$ref": "GoogleMonitoringV3TypedValue", + "description": "Value of the metric query." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaChunk": { "description": "Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.", "id": "GoogleCloudDiscoveryengineV1alphaChunk", @@ -12425,6 +12773,121 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaRequirement": { + "description": "A data requirement.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirement", + "properties": { + "condition": { + "$ref": "GoogleTypeExpr", + "description": "The condition for evaluating the requirement result. Variables in the expression should be provided by `metrics_bindings` or `threshold_bindings`. Where `metrics_bindings` are used for computed metrics and `threshold_bindings` are used to define thresholds for corresponding `metric_bindings`." + }, + "description": { + "description": "The description of the requirement.", + "type": "string" + }, + "displayName": { + "description": "The name of the requirement.", + "type": "string" + }, + "metricBindings": { + "description": "A list of the metric bindings to be used in `condition`.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding" + }, + "type": "array" + }, + "thresholdBindings": { + "description": "A list of threshold bindings to be used in `condition`.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding" + }, + "type": "array" + }, + "type": { + "description": "The requirement type, used as an identifier. Must be unique. The type should prefix with service name to avoid possible collision. It's encoraged to use natural hierarchical grouping for similar requirements. Examples: * `library.googleapis.com/books/min_available_books` * `discoveryengine.googleapis.com/media_rec/recommended_for_you/conversion_rate`", + "type": "string" + }, + "violationSamplesBindings": { + "description": "A list of the metric bindings to be used in `condition`.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding": { + "description": "Specifies a metrics query and bind its result to a variable which will be used in the `condition`.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding", + "properties": { + "category": { + "description": "The category of the metric's target resource. Example: \"Events\"", + "type": "string" + }, + "description": { + "description": "Human readable description of the corresponding metric filter.", + "type": "string" + }, + "metricFilter": { + "description": "The filter string used for metrics query. Example: \"metric.type = \\\"discoveryengine.googleapis.com/events/day_count\\\" AND \" \"metric.conditions.time_range = \\\"NINETY_DAYS\\\"\"", + "type": "string" + }, + "resourceType": { + "description": "The resource being monitored for the metric.", + "type": "string" + }, + "variableId": { + "description": "The variable id to be referenced in `condition`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding": { + "description": "Specifies a multi-level threshold to apply to apply to a `metric_bindings` in the `condition` CEL expression.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding", + "properties": { + "blockingThreshold": { + "description": "Threshold to trigger a blocking failure. If not met, the requirement will evaluate as a `FAILURE`.", + "format": "double", + "type": "number" + }, + "description": { + "description": "Human readable description of the corresponding threshold and sub-requirement.", + "type": "string" + }, + "variableId": { + "description": "The variable id to be referenced in `condition`. Must be unique across all `metric_bindings` and `threshold_bindings`.", + "type": "string" + }, + "warningThreshold": { + "description": "Threshold to trigger a warning. If not met, the requirement will evaluate as a `WARNING`.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding": { + "description": "Specifies a samples query and bind its result to a variable which will be used in the `condition`.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding", + "properties": { + "description": { + "description": "Description of this sample binding. Used by the UI to render user friendly descriptions for each requirement condition. Should be less than 128 characters long.", + "type": "string" + }, + "sampleFilter": { + "description": "The filter string used for samples query. Example: \"sample.type = \\\"retail.googleapis.com/user_event\\\" AND \" \"sample.labels.event_type = \\\"PURCHASE\\\" \"", + "type": "string" + }, + "variableId": { + "description": "The variable id to be referenced in `condition`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest": { "description": "Request for resuming training of an engine.", "id": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest", @@ -15634,6 +16097,35 @@ }, "type": "object" }, + "GoogleMonitoringV3TypedValue": { + "description": "A single strongly-typed value.", + "id": "GoogleMonitoringV3TypedValue", + "properties": { + "boolValue": { + "description": "A Boolean value: `true` or `false`.", + "type": "boolean" + }, + "distributionValue": { + "$ref": "GoogleApiDistribution", + "description": "A distribution value." + }, + "doubleValue": { + "description": "A 64-bit double-precision floating-point number. Its magnitude is approximately ±10±300 and it has 16 significant digits of precision.", + "format": "double", + "type": "number" + }, + "int64Value": { + "description": "A 64-bit integer. Its range is approximately ±9.2x1018.", + "format": "int64", + "type": "string" + }, + "stringValue": { + "description": "A variable-length string value.", + "type": "string" + } + }, + "type": "object" + }, "GoogleProtobufEmpty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", @@ -15688,6 +16180,29 @@ } }, "type": "object" + }, + "GoogleTypeExpr": { + "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": "GoogleTypeExpr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index c469a444be9..eab29e0c8fa 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -177,6 +177,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.GroundingConfigs = NewProjectsLocationsGroundingConfigsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.RankingConfigs = NewProjectsLocationsRankingConfigsService(s) + rs.Requirements = NewProjectsLocationsRequirementsService(s) rs.SampleQuerySets = NewProjectsLocationsSampleQuerySetsService(s) rs.UserEvents = NewProjectsLocationsUserEventsService(s) return rs @@ -197,6 +198,8 @@ type ProjectsLocationsService struct { RankingConfigs *ProjectsLocationsRankingConfigsService + Requirements *ProjectsLocationsRequirementsService + SampleQuerySets *ProjectsLocationsSampleQuerySetsService UserEvents *ProjectsLocationsUserEventsService @@ -856,6 +859,15 @@ type ProjectsLocationsRankingConfigsService struct { s *Service } +func NewProjectsLocationsRequirementsService(s *Service) *ProjectsLocationsRequirementsService { + rs := &ProjectsLocationsRequirementsService{s: s} + return rs +} + +type ProjectsLocationsRequirementsService struct { + s *Service +} + func NewProjectsLocationsSampleQuerySetsService(s *Service) *ProjectsLocationsSampleQuerySetsService { rs := &ProjectsLocationsSampleQuerySetsService{s: s} rs.Operations = NewProjectsLocationsSampleQuerySetsOperationsService(s) @@ -895,6 +907,355 @@ type ProjectsOperationsService struct { s *Service } +// GoogleApiDistribution: `Distribution` contains summary statistics for a +// population of values. It optionally contains a histogram representing the +// distribution of those values across a set of buckets. The summary statistics +// are the count, mean, sum of the squared deviation from the mean, the +// minimum, and the maximum of the set of population of values. The histogram +// is based on a sequence of buckets and gives a count of values that fall into +// each bucket. The boundaries of the buckets are given either explicitly or by +// formulas for buckets of fixed or exponentially increasing widths. Although +// it is not forbidden, it is generally a bad idea to include non-finite values +// (infinities or NaNs) in the population of values, as this will render the +// `mean` and `sum_of_squared_deviation` fields meaningless. +type GoogleApiDistribution struct { + // BucketCounts: The number of values in each bucket of the histogram, as + // described in `bucket_options`. If the distribution does not have a + // histogram, then omit this field. If there is a histogram, then the sum of + // the values in `bucket_counts` must equal the value in the `count` field of + // the distribution. If present, `bucket_counts` should contain N values, where + // N is the number of buckets specified in `bucket_options`. If you supply + // fewer than N values, the remaining values are assumed to be 0. The order of + // the values in `bucket_counts` follows the bucket numbering schemes described + // for the three bucket types. The first value must be the count for the + // underflow bucket (number 0). The next N-2 values are the counts for the + // finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is + // the count for the overflow bucket (number N-1). + BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"` + // BucketOptions: Defines the histogram bucket boundaries. If the distribution + // does not contain a histogram, then omit this field. + BucketOptions *GoogleApiDistributionBucketOptions `json:"bucketOptions,omitempty"` + // Count: The number of values in the population. Must be non-negative. This + // value must equal the sum of the values in `bucket_counts` if a histogram is + // provided. + Count int64 `json:"count,omitempty,string"` + // Exemplars: Must be in increasing order of `value` field. + Exemplars []*GoogleApiDistributionExemplar `json:"exemplars,omitempty"` + // Mean: The arithmetic mean of the values in the population. If `count` is + // zero then this field must be zero. + Mean float64 `json:"mean,omitempty"` + // Range: If specified, contains the range of the population values. The field + // must not be present if the `count` is zero. + Range *GoogleApiDistributionRange `json:"range,omitempty"` + // SumOfSquaredDeviation: The sum of squared deviations from the mean of the + // values in the population. For values x_i this is: Sumi=1..n ((x_i - mean)^2) + // Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition + // describes Welford's method for accumulating this sum in one pass. If `count` + // is zero then this field must be zero. + SumOfSquaredDeviation float64 `json:"sumOfSquaredDeviation,omitempty"` + // ForceSendFields is a list of field names (e.g. "BucketCounts") 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. "BucketCounts") 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 *GoogleApiDistribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiDistribution + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleApiDistribution) UnmarshalJSON(data []byte) error { + type NoMethod GoogleApiDistribution + var s1 struct { + Mean gensupport.JSONFloat64 `json:"mean"` + SumOfSquaredDeviation gensupport.JSONFloat64 `json:"sumOfSquaredDeviation"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Mean = float64(s1.Mean) + s.SumOfSquaredDeviation = float64(s1.SumOfSquaredDeviation) + return nil +} + +// GoogleApiDistributionBucketOptions: `BucketOptions` describes the bucket +// boundaries used to create a histogram for the distribution. The buckets can +// be in a linear sequence, an exponential sequence, or each bucket can be +// specified explicitly. `BucketOptions` does not include the number of values +// in each bucket. A bucket has an inclusive lower bound and exclusive upper +// bound for the values that are counted for that bucket. The upper bound of a +// bucket must be strictly greater than the lower bound. The sequence of N +// buckets for a distribution consists of an underflow bucket (number 0), zero +// or more finite buckets (number 1 through N - 2) and an overflow bucket +// (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > +// 0) is the same as the upper bound of bucket i - 1. The buckets span the +// whole range of finite values: lower bound of the underflow bucket is +// -infinity and the upper bound of the overflow bucket is +infinity. The +// finite buckets are so-called because both bounds are finite. +type GoogleApiDistributionBucketOptions struct { + // ExplicitBuckets: The explicit buckets. + ExplicitBuckets *GoogleApiDistributionBucketOptionsExplicit `json:"explicitBuckets,omitempty"` + // ExponentialBuckets: The exponential buckets. + ExponentialBuckets *GoogleApiDistributionBucketOptionsExponential `json:"exponentialBuckets,omitempty"` + // LinearBuckets: The linear bucket. + LinearBuckets *GoogleApiDistributionBucketOptionsLinear `json:"linearBuckets,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExplicitBuckets") 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. "ExplicitBuckets") 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 *GoogleApiDistributionBucketOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiDistributionBucketOptions + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleApiDistributionBucketOptionsExplicit: Specifies a set of buckets with +// arbitrary widths. There are `size(bounds) + 1` (= N) buckets. Bucket `i` has +// the following boundaries: Upper bound (0 <= i < N-1): bounds[i] Lower bound +// (1 <= i < N); bounds[i - 1] The `bounds` field must contain at least one +// element. If `bounds` has only one element, then there are no finite buckets, +// and that single element is the common boundary of the overflow and underflow +// buckets. +type GoogleApiDistributionBucketOptionsExplicit struct { + // Bounds: The values must be monotonically increasing. + Bounds []float64 `json:"bounds,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bounds") 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. "Bounds") 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 *GoogleApiDistributionBucketOptionsExplicit) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiDistributionBucketOptionsExplicit + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleApiDistributionBucketOptionsExplicit) UnmarshalJSON(data []byte) error { + type NoMethod GoogleApiDistributionBucketOptionsExplicit + var s1 struct { + Bounds []gensupport.JSONFloat64 `json:"bounds"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Bounds = make([]float64, len(s1.Bounds)) + for i := range s1.Bounds { + s.Bounds[i] = float64(s1.Bounds[i]) + } + return nil +} + +// GoogleApiDistributionBucketOptionsExponential: Specifies an exponential +// sequence of buckets that have a width that is proportional to the value of +// the lower bound. Each bucket represents a constant relative uncertainty on a +// specific value in the bucket. There are `num_finite_buckets + 2` (= N) +// buckets. Bucket `i` has the following boundaries: Upper bound (0 <= i < +// N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * +// (growth_factor ^ (i - 1)). +type GoogleApiDistributionBucketOptionsExponential struct { + // GrowthFactor: Must be greater than 1. + GrowthFactor float64 `json:"growthFactor,omitempty"` + // NumFiniteBuckets: Must be greater than 0. + NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"` + // Scale: Must be greater than 0. + Scale float64 `json:"scale,omitempty"` + // ForceSendFields is a list of field names (e.g. "GrowthFactor") 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. "GrowthFactor") 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 *GoogleApiDistributionBucketOptionsExponential) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiDistributionBucketOptionsExponential + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleApiDistributionBucketOptionsExponential) UnmarshalJSON(data []byte) error { + type NoMethod GoogleApiDistributionBucketOptionsExponential + var s1 struct { + GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"` + Scale gensupport.JSONFloat64 `json:"scale"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GrowthFactor = float64(s1.GrowthFactor) + s.Scale = float64(s1.Scale) + return nil +} + +// GoogleApiDistributionBucketOptionsLinear: Specifies a linear sequence of +// buckets that all have the same width (except overflow and underflow). Each +// bucket represents a constant absolute uncertainty on the specific value in +// the bucket. There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has +// the following boundaries: Upper bound (0 <= i < N-1): offset + (width * i). +// Lower bound (1 <= i < N): offset + (width * (i - 1)). +type GoogleApiDistributionBucketOptionsLinear struct { + // NumFiniteBuckets: Must be greater than 0. + NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"` + // Offset: Lower bound of the first bucket. + Offset float64 `json:"offset,omitempty"` + // Width: Must be greater than 0. + Width float64 `json:"width,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumFiniteBuckets") 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. "NumFiniteBuckets") 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 *GoogleApiDistributionBucketOptionsLinear) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiDistributionBucketOptionsLinear + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleApiDistributionBucketOptionsLinear) UnmarshalJSON(data []byte) error { + type NoMethod GoogleApiDistributionBucketOptionsLinear + var s1 struct { + Offset gensupport.JSONFloat64 `json:"offset"` + Width gensupport.JSONFloat64 `json:"width"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Offset = float64(s1.Offset) + s.Width = float64(s1.Width) + return nil +} + +// GoogleApiDistributionExemplar: Exemplars are example points that may be used +// to annotate aggregated distribution values. They are metadata that gives +// information about a particular value added to a Distribution bucket, such as +// a trace ID that was active when a value was added. They may contain further +// information, such as a example values and timestamps, origin, etc. +type GoogleApiDistributionExemplar struct { + // Attachments: Contextual information about the example value. Examples are: + // Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: + // type.googleapis.com/google.protobuf.StringValue Labels dropped during + // aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There + // may be only a single attachment of any given message type in a single + // exemplar, and this is enforced by the system. + Attachments []googleapi.RawMessage `json:"attachments,omitempty"` + // Timestamp: The observation (sampling) time of the above value. + Timestamp string `json:"timestamp,omitempty"` + // Value: Value of the exemplar point. This value determines to which bucket + // the exemplar belongs. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Attachments") 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. "Attachments") 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 *GoogleApiDistributionExemplar) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiDistributionExemplar + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleApiDistributionExemplar) UnmarshalJSON(data []byte) error { + type NoMethod GoogleApiDistributionExemplar + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil +} + +// GoogleApiDistributionRange: The range of the population values. +type GoogleApiDistributionRange struct { + // Max: The maximum of the population values. + Max float64 `json:"max,omitempty"` + // Min: The minimum of the population values. + Min float64 `json:"min,omitempty"` + // ForceSendFields is a list of field names (e.g. "Max") 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. "Max") 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 *GoogleApiDistributionRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiDistributionRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleApiDistributionRange) UnmarshalJSON(data []byte) error { + type NoMethod GoogleApiDistributionRange + var s1 struct { + Max gensupport.JSONFloat64 `json:"max"` + Min gensupport.JSONFloat64 `json:"min"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Max = float64(s1.Max) + s.Min = float64(s1.Min) + return nil +} + // GoogleApiHttpBody: Message that represents an arbitrary HTTP body. It should // only be used for payload formats that can't be represented as JSON, such as // raw binary or an HTML page. This message can be used both in streaming and @@ -942,6 +1303,46 @@ func (s *GoogleApiHttpBody) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleApiMonitoredResource: An object representing a resource that can be +// used for monitoring, logging, billing, or other purposes. Examples include +// virtual machine instances, databases, and storage devices such as disks. The +// `type` field identifies a MonitoredResourceDescriptor object that describes +// the resource's schema. Information in the `labels` field identifies the +// actual resource and its attributes according to the schema. For example, a +// particular Compute Engine VM instance could be represented by the following +// object, because the MonitoredResourceDescriptor for "gce_instance" has +// labels "project_id", "instance_id" and "zone": { "type": +// "gce_instance", "labels": { "project_id": "my-project", "instance_id": +// "12345678901234", "zone": "us-central1-a" }} +type GoogleApiMonitoredResource struct { + // Labels: Required. Values for all of the labels listed in the associated + // monitored resource descriptor. For example, Compute Engine VM instances use + // the labels "project_id", "instance_id", and "zone". + Labels map[string]string `json:"labels,omitempty"` + // Type: Required. The monitored resource type. This field must match the + // `type` field of a MonitoredResourceDescriptor object. For example, the type + // of a Compute Engine VM instance is `gce_instance`. Some descriptors include + // the service name in the type; for example, the type of a Datastream stream + // is `datastream.googleapis.com/Stream`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Labels") 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. "Labels") 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 *GoogleApiMonitoredResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiMonitoredResource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineLoggingErrorContext: A description of the context // in which an error occurred. type GoogleCloudDiscoveryengineLoggingErrorContext struct { @@ -4531,6 +4932,110 @@ func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec) UnmarshalJSON(data return nil } +// GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest: Request for +// CheckRequirement method. +type GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest struct { + // RequirementType: A Requirement.type specifying the requirement to check. + RequirementType string `json:"requirementType,omitempty"` + // Resources: The resources to be checked for this requirement. + Resources []*GoogleApiMonitoredResource `json:"resources,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequirementType") 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. "RequirementType") 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 *GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse: Response for +// CheckRequirement method. +type GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse struct { + // MetricResults: Metric results. + MetricResults []*GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult `json:"metricResults,omitempty"` + // OldestMetricTimestamp: Timestamp of the oldest calculated metric (i.e. the + // most stale metric). Indicates that the `requirement_result` may not + // accurately reflect any Event and Product Catalog updates performed after + // this time. + OldestMetricTimestamp string `json:"oldestMetricTimestamp,omitempty"` + // Requirement: Requirement definition. + Requirement *GoogleCloudDiscoveryengineV1alphaRequirement `json:"requirement,omitempty"` + // RequirementCondition: The condition for evaluating the requirement result. + RequirementCondition *GoogleTypeExpr `json:"requirementCondition,omitempty"` + // RequirementResult: Requirement result, e.g. pass or fail. + // + // Possible values: + // "UNKNOWN" - The requirement is unknown. + // "SUCCESS" - The requirement check is passed. + // "FAILURE" - The requirement check fails to meet at least one blocking + // threshold. + // "WARNING" - The requirement check fails at least one warning threshold, + // but passes all blocking thresholds. + RequirementResult string `json:"requirementResult,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "MetricResults") 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. "MetricResults") 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 *GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult: +// Metric result. The metric are in the requirement_condition. +type GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult struct { + // MetricType: Type identifier of the metric corresponding to this query + // result. + MetricType string `json:"metricType,omitempty"` + // Name: This metric query name is mapping to variables in the + // requirement_condition. + Name string `json:"name,omitempty"` + // Timestamp: Time corresponding to when this metric value was calculated. + Timestamp string `json:"timestamp,omitempty"` + // Unit: The unit in which this metric is reported. Follows The Unified Code + // for Units of Measure (https://unitsofmeasure.org/ucum.html) standard. + Unit string `json:"unit,omitempty"` + // Value: Value of the metric query. + Value *GoogleMonitoringV3TypedValue `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "MetricType") 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. "MetricType") 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 *GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaChunk: Chunk captures all raw metadata // information of items to be recommended or searched in the chunk mode. type GoogleCloudDiscoveryengineV1alphaChunk struct { @@ -9158,6 +9663,166 @@ func (s *GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest) MarshalJSO return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaRequirement: A data requirement. +type GoogleCloudDiscoveryengineV1alphaRequirement struct { + // Condition: The condition for evaluating the requirement result. Variables in + // the expression should be provided by `metrics_bindings` or + // `threshold_bindings`. Where `metrics_bindings` are used for computed metrics + // and `threshold_bindings` are used to define thresholds for corresponding + // `metric_bindings`. + Condition *GoogleTypeExpr `json:"condition,omitempty"` + // Description: The description of the requirement. + Description string `json:"description,omitempty"` + // DisplayName: The name of the requirement. + DisplayName string `json:"displayName,omitempty"` + // MetricBindings: A list of the metric bindings to be used in `condition`. + MetricBindings []*GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding `json:"metricBindings,omitempty"` + // ThresholdBindings: A list of threshold bindings to be used in `condition`. + ThresholdBindings []*GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding `json:"thresholdBindings,omitempty"` + // Type: The requirement type, used as an identifier. Must be unique. The type + // should prefix with service name to avoid possible collision. It's encoraged + // to use natural hierarchical grouping for similar requirements. Examples: * + // `library.googleapis.com/books/min_available_books` * + // `discoveryengine.googleapis.com/media_rec/recommended_for_you/conversion_rate + // ` + Type string `json:"type,omitempty"` + // ViolationSamplesBindings: A list of the metric bindings to be used in + // `condition`. + ViolationSamplesBindings []*GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding `json:"violationSamplesBindings,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 *GoogleCloudDiscoveryengineV1alphaRequirement) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRequirement + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding: Specifies a +// metrics query and bind its result to a variable which will be used in the +// `condition`. +type GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding struct { + // Category: The category of the metric's target resource. Example: "Events" + Category string `json:"category,omitempty"` + // Description: Human readable description of the corresponding metric filter. + Description string `json:"description,omitempty"` + // MetricFilter: The filter string used for metrics query. Example: + // "metric.type = \"discoveryengine.googleapis.com/events/day_count\" AND " + // "metric.conditions.time_range = \"NINETY_DAYS\"" + MetricFilter string `json:"metricFilter,omitempty"` + // ResourceType: The resource being monitored for the metric. + ResourceType string `json:"resourceType,omitempty"` + // VariableId: The variable id to be referenced in `condition`. + VariableId string `json:"variableId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Category") 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. "Category") 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 *GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding: Specifies a +// multi-level threshold to apply to apply to a `metric_bindings` in the +// `condition` CEL expression. +type GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding struct { + // BlockingThreshold: Threshold to trigger a blocking failure. If not met, the + // requirement will evaluate as a `FAILURE`. + BlockingThreshold float64 `json:"blockingThreshold,omitempty"` + // Description: Human readable description of the corresponding threshold and + // sub-requirement. + Description string `json:"description,omitempty"` + // VariableId: The variable id to be referenced in `condition`. Must be unique + // across all `metric_bindings` and `threshold_bindings`. + VariableId string `json:"variableId,omitempty"` + // WarningThreshold: Threshold to trigger a warning. If not met, the + // requirement will evaluate as a `WARNING`. + WarningThreshold float64 `json:"warningThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockingThreshold") 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. "BlockingThreshold") 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 *GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding + var s1 struct { + BlockingThreshold gensupport.JSONFloat64 `json:"blockingThreshold"` + WarningThreshold gensupport.JSONFloat64 `json:"warningThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BlockingThreshold = float64(s1.BlockingThreshold) + s.WarningThreshold = float64(s1.WarningThreshold) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding: +// Specifies a samples query and bind its result to a variable which will be +// used in the `condition`. +type GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding struct { + // Description: Description of this sample binding. Used by the UI to render + // user friendly descriptions for each requirement condition. Should be less + // than 128 characters long. + Description string `json:"description,omitempty"` + // SampleFilter: The filter string used for samples query. Example: + // "sample.type = \"retail.googleapis.com/user_event\" AND " + // "sample.labels.event_type = \"PURCHASE\" " + SampleFilter string `json:"sampleFilter,omitempty"` + // VariableId: The variable id to be referenced in `condition`. + VariableId string `json:"variableId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaResumeEngineRequest: Request for resuming // training of an engine. type GoogleCloudDiscoveryengineV1alphaResumeEngineRequest struct { @@ -13718,6 +14383,51 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleMonitoringV3TypedValue: A single strongly-typed value. +type GoogleMonitoringV3TypedValue struct { + // BoolValue: A Boolean value: `true` or `false`. + BoolValue bool `json:"boolValue,omitempty"` + // DistributionValue: A distribution value. + DistributionValue *GoogleApiDistribution `json:"distributionValue,omitempty"` + // DoubleValue: A 64-bit double-precision floating-point number. Its magnitude + // is approximately ±10±300 and it has 16 significant digits of precision. + DoubleValue float64 `json:"doubleValue,omitempty"` + // Int64Value: A 64-bit integer. Its range is approximately ±9.2x1018. + Int64Value int64 `json:"int64Value,omitempty,string"` + // StringValue: A variable-length string value. + StringValue string `json:"stringValue,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 *GoogleMonitoringV3TypedValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMonitoringV3TypedValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleMonitoringV3TypedValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleMonitoringV3TypedValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} + // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid // defining duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For instance: @@ -13800,6 +14510,54 @@ func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleTypeExpr: 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() < +// 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' && 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. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a longer text + // which describes the expression, e.g. when hovered over it in a UI. + Description string `json:"description,omitempty"` + // Expression: Textual representation of an expression in Common Expression + // Language syntax. + Expression string `json:"expression,omitempty"` + // Location: Optional. String indicating the location of the expression for + // error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + // Title: Optional. Title for the expression, i.e. a short string describing + // its purpose. This can be used e.g. in UIs which allow to enter the + // expression. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + type ProjectsGetCall struct { s *Service name string @@ -37070,6 +37828,109 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsRequirementsCheckRequirementCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphacheckrequirementrequest *GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CheckRequirement: Check a particular requirement. +// +// - location: Full resource name of the location. Format +// `projects/{project_number_or_id}/locations/{location}`. +func (r *ProjectsLocationsRequirementsService) CheckRequirement(location string, googleclouddiscoveryenginev1alphacheckrequirementrequest *GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest) *ProjectsLocationsRequirementsCheckRequirementCall { + c := &ProjectsLocationsRequirementsCheckRequirementCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphacheckrequirementrequest = googleclouddiscoveryenginev1alphacheckrequirementrequest + 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 *ProjectsLocationsRequirementsCheckRequirementCall) Fields(s ...googleapi.Field) *ProjectsLocationsRequirementsCheckRequirementCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRequirementsCheckRequirementCall) Context(ctx context.Context) *ProjectsLocationsRequirementsCheckRequirementCall { + 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 *ProjectsLocationsRequirementsCheckRequirementCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRequirementsCheckRequirementCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacheckrequirementrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/requirements:checkRequirement") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.requirements.checkRequirement" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsRequirementsCheckRequirementCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse, 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 := &GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsSampleQuerySetsOperationsGetCall struct { s *Service name string @@ -37180,6 +38041,143 @@ func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi return ret, nil } +type ProjectsLocationsUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { + c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsUserEventsCollectCall) Uri(uri string) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) + 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 *ProjectsLocationsUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserEventsCollectCall { + 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 *ProjectsLocationsUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsUserEventsCollectCall { + 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 *ProjectsLocationsUserEventsCollectCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userEvents.collect" 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 *ProjectsLocationsUserEventsCollectCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsUserEventsWriteCall struct { s *Service parent string diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 8e994823947..01710703664 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -5838,6 +5838,47 @@ }, "userEvents": { "methods": { + "collect": { + "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:collect", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userEvents.collect", + "parameterOrder": [ + "parent" + ], + "parameters": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + "location": "query", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/userEvents:collect", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:write", @@ -5948,7 +5989,7 @@ } } }, - "revision": "20240530", + "revision": "20240607", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -10216,6 +10257,20 @@ "orderBy": { "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" } }, "type": "object" @@ -11004,6 +11059,114 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaChunk": { + "description": "Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.", + "id": "GoogleCloudDiscoveryengineV1betaChunk", + "properties": { + "chunkMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1betaChunkChunkMetadata", + "description": "Output only. Metadata of the current chunk.", + "readOnly": true + }, + "content": { + "description": "Content is a string from a document (parsed content).", + "type": "string" + }, + "derivedStructData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.", + "readOnly": true, + "type": "object" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata", + "description": "Metadata of the document from the current chunk." + }, + "id": { + "description": "Unique chunk ID of the current chunk.", + "type": "string" + }, + "name": { + "description": "The full resource name of the chunk. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "pageSpan": { + "$ref": "GoogleCloudDiscoveryengineV1betaChunkPageSpan", + "description": "Page span of the chunk." + }, + "relevanceScore": { + "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaChunkChunkMetadata": { + "description": "Metadata of the current chunk. This field is only populated on SearchService.Search API.", + "id": "GoogleCloudDiscoveryengineV1betaChunkChunkMetadata", + "properties": { + "nextChunks": { + "description": "The next chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is only populated on SearchService.Search API.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaChunk" + }, + "type": "array" + }, + "previousChunks": { + "description": "The previous chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field is only populated on SearchService.Search API.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata": { + "description": "Document metadata contains the information of the document of the current chunk.", + "id": "GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata", + "properties": { + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", + "type": "object" + }, + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "Uri of the document.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaChunkPageSpan": { + "description": "Page span of the chunk.", + "id": "GoogleCloudDiscoveryengineV1betaChunkPageSpan", + "properties": { + "pageEnd": { + "description": "The end page of the chunk.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "The start page of the chunk.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCloudSqlSource": { "description": "Cloud SQL source import data from.", "id": "GoogleCloudDiscoveryengineV1betaCloudSqlSource", @@ -13638,10 +13801,28 @@ "description": "A specification for configuring the behavior of content search.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec", "properties": { + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" + }, "extractiveContentSpec": { "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec", "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + }, "snippetSpec": { "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec", "description": "If `snippetSpec` is not specified, snippets are not included in the search response." @@ -13653,6 +13834,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec", + "properties": { + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" + }, + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec": { "description": "A specification for configuring the extractive content in a search response.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec", @@ -14123,6 +14321,10 @@ "description": "Represents the search results.", "id": "GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult", "properties": { + "chunk": { + "$ref": "GoogleCloudDiscoveryengineV1betaChunk", + "description": "The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS." + }, "document": { "$ref": "GoogleCloudDiscoveryengineV1betaDocument", "description": "The document data snippet in the search response. Only fields that are marked as `retrievable` are populated." diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index a5bb03f9800..4f97cdad0eb 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -6462,6 +6462,20 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams st // see Ordering (https://cloud.google.com/retail/docs/filter-and-order#order) // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. OrderBy string `json:"orderBy,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode is based on + // DataStore.DocumentProcessingConfig.chunking_config: * If + // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults + // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See parse and chunk + // documents + // (https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -7580,6 +7594,146 @@ func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec) UnmarshalJSON(data return nil } +// GoogleCloudDiscoveryengineV1betaChunk: Chunk captures all raw metadata +// information of items to be recommended or searched in the chunk mode. +type GoogleCloudDiscoveryengineV1betaChunk struct { + // ChunkMetadata: Output only. Metadata of the current chunk. + ChunkMetadata *GoogleCloudDiscoveryengineV1betaChunkChunkMetadata `json:"chunkMetadata,omitempty"` + // Content: Content is a string from a document (parsed content). + Content string `json:"content,omitempty"` + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It contains + // derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata `json:"documentMetadata,omitempty"` + // Id: Unique chunk ID of the current chunk. + Id string `json:"id,omitempty"` + // Name: The full resource name of the chunk. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDiscoveryengineV1betaChunkPageSpan `json:"pageSpan,omitempty"` + // RelevanceScore: Output only. Represents the relevance score based on + // similarity. Higher score indicates higher chunk relevance. The score is in + // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkMetadata") 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. "ChunkMetadata") 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 *GoogleCloudDiscoveryengineV1betaChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaChunk) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaChunk + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} + +// GoogleCloudDiscoveryengineV1betaChunkChunkMetadata: Metadata of the current +// chunk. This field is only populated on SearchService.Search API. +type GoogleCloudDiscoveryengineV1betaChunkChunkMetadata struct { + // NextChunks: The next chunks of the current chunk. The number is controlled + // by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is + // only populated on SearchService.Search API. + NextChunks []*GoogleCloudDiscoveryengineV1betaChunk `json:"nextChunks,omitempty"` + // PreviousChunks: The previous chunks of the current chunk. The number is + // controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. + // This field is only populated on SearchService.Search API. + PreviousChunks []*GoogleCloudDiscoveryengineV1betaChunk `json:"previousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NextChunks") 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. "NextChunks") 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 *GoogleCloudDiscoveryengineV1betaChunkChunkMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunkChunkMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata: Document metadata +// contains the information of the document of the current chunk. +type GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata struct { + // StructData: Data representation. The structured JSON data for the document. + // It should conform to the registered Schema or an `INVALID_ARGUMENT` error is + // thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "StructData") 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. "StructData") 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 *GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaChunkPageSpan: Page span of the chunk. +type GoogleCloudDiscoveryengineV1betaChunkPageSpan struct { + // PageEnd: The end page of the chunk. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: The start page of the chunk. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") 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. "PageEnd") 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 *GoogleCloudDiscoveryengineV1betaChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunkPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCloudSqlSource: Cloud SQL source import data // from. type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { @@ -11439,24 +11593,40 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpe // GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec: A // specification for configuring the behavior of content search. type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` // ExtractiveContentSpec: If there is no extractive_content_spec provided, // there will be no extractive answer in the search response. ExtractiveContentSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode is based on + // DataStore.DocumentProcessingConfig.chunking_config: * If + // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults + // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. SnippetSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` // SummarySpec: If `summarySpec` is not specified, summaries are not included // in the search response. SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExtractiveContentSpec") to + // ForceSendFields is a list of field names (e.g. "ChunkSpec") 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. "ExtractiveContentSpec") 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. "ChunkSpec") 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:"-"` } @@ -11466,6 +11636,37 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec) Marshal return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") 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. "NumNextChunks") 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 *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveConte // ntSpec: A specification for configuring the extractive content in a search // response. @@ -12212,6 +12413,9 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo) Marsh // GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult: Represents the // search results. type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { + // Chunk: The chunk data in the search response if the + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + Chunk *GoogleCloudDiscoveryengineV1betaChunk `json:"chunk,omitempty"` // Document: The document data snippet in the search response. Only fields that // are marked as `retrievable` are populated. Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` @@ -12219,13 +12423,13 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { Id string `json:"id,omitempty"` // ModelScores: Google provided available scores. ModelScores map[string]GoogleCloudDiscoveryengineV1betaDoubleList `json:"modelScores,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") 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. "Chunk") 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. "Document") to include in API + // NullFields is a list of field names (e.g. "Chunk") 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. @@ -34823,6 +35027,143 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { + c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsUserEventsCollectCall) Uri(uri string) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) + 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 *ProjectsLocationsUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserEventsCollectCall { + 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 *ProjectsLocationsUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsUserEventsCollectCall { + 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 *ProjectsLocationsUserEventsCollectCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userEvents.collect" 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 *ProjectsLocationsUserEventsCollectCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsUserEventsWriteCall struct { s *Service parent string diff --git a/dns/v1/dns-api.json b/dns/v1/dns-api.json index 1d05377782e..780a1140f46 100644 --- a/dns/v1/dns-api.json +++ b/dns/v1/dns-api.json @@ -1824,11 +1824,11 @@ } } }, - "revision": "20240419", + "revision": "20240531", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { - "description": "A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.", + "description": "A Change represents a set of `ResourceRecordSet` additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the `ResourceRecordSets` in a `ManagedZone`. The current state of the `ManagedZone` is the sum effect of applying all `Change` elements in the `Changes` collection in sequence.", "id": "Change", "properties": { "additions": { @@ -1887,16 +1887,13 @@ }, "type": "array" }, - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#changesListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a \"snapshot\" of collections larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -2061,16 +2058,13 @@ }, "type": "array" }, - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#dnsKeysListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -2348,8 +2342,8 @@ "private" ], "enumDescriptions": [ - "", - "" + "Indicates that records in this zone can be queried from the public internet.", + "Indicates that records in this zone cannot be queried from the public internet. Access to private zones depends on the zone configuration." ], "type": "string" } @@ -2392,8 +2386,8 @@ "nsec3" ], "enumDescriptions": [ - "", - "" + "Indicates that Cloud DNS will sign records in the managed zone according to RFC 4034 and respond with NSEC records for names that do not exist.", + "Indicates that Cloud DNS will sign records in the managed zone according to RFC 5155 and respond with NSEC3 records for names that do not exist." ], "type": "string" }, @@ -2464,16 +2458,13 @@ "ManagedZoneOperationsListResponse": { "id": "ManagedZoneOperationsListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#managedZoneOperationsListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "operations": { @@ -2512,7 +2503,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", "type": "string" } }, @@ -2564,7 +2555,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. Format this URL like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to bind to. Format this URL like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", "type": "string" } }, @@ -2607,7 +2598,7 @@ "type": "string" }, "namespaceUrl": { - "description": "The fully qualified URL of the namespace associated with the zone. Format must be https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}", + "description": "The fully qualified URL of the namespace associated with the zone. Format must be `https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}`", "type": "string" } }, @@ -2616,9 +2607,6 @@ "ManagedZonesListResponse": { "id": "ManagedZonesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#managedZonesListResponse", "description": "Type of resource.", @@ -2632,7 +2620,7 @@ "type": "array" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -2716,16 +2704,13 @@ "PoliciesListResponse": { "id": "PoliciesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#policiesListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "policies": { @@ -2741,9 +2726,6 @@ "PoliciesPatchResponse": { "id": "PoliciesPatchResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "policy": { "$ref": "Policy" } @@ -2753,9 +2735,6 @@ "PoliciesUpdateResponse": { "id": "PoliciesUpdateResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "policy": { "$ref": "Policy" } @@ -2867,7 +2846,7 @@ "type": "object" }, "Project": { - "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. Next tag: 7.", + "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console.", "id": "Project", "properties": { "id": { @@ -3044,7 +3023,7 @@ "type": "object" }, "RRSetRoutingPolicyGeoPolicy": { - "description": "Configures a RRSetRoutingPolicy that routes based on the geo location of the querying user.", + "description": "Configures a `RRSetRoutingPolicy` that routes based on the geo location of the querying user.", "id": "RRSetRoutingPolicyGeoPolicy", "properties": { "enableFencing": { @@ -3071,7 +3050,7 @@ "properties": { "healthCheckedTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with rrdata within this item." + "description": "For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with `rrdata` within this item." }, "kind": { "default": "dns#rRSetRoutingPolicyGeoPolicyGeoPolicyItem", @@ -3088,7 +3067,7 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. If health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", + "description": "DNSSEC generated signatures for all the `rrdata` within this item. If health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, @@ -3098,7 +3077,7 @@ "type": "object" }, "RRSetRoutingPolicyHealthCheckTargets": { - "description": "HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response. Only one of internal_load_balancer and external_endpoints should be set.", + "description": "HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response.", "id": "RRSetRoutingPolicyHealthCheckTargets", "properties": { "internalLoadBalancers": { @@ -3128,8 +3107,8 @@ ], "enumDescriptions": [ "", - "", - "" + "Indicates the load balancer is accessible via TCP.", + "Indicates the load balancer is accessible via UDP." ], "type": "string" }, @@ -3147,14 +3126,14 @@ ], "enumDescriptions": [ "", - "", - "", - "" + "Indicates the load balancer is a Cross-Region Application Load Balancer.", + "Indicates the load balancer is a Regional Network Passthrough Load Balancer.", + "Indicates the load balancer is a Regional Application Load Balancer." ], "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the network that the load balancer is attached to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} .", + "description": "The fully qualified URL of the network that the load balancer is attached to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`.", "type": "string" }, "port": { @@ -3178,7 +3157,7 @@ "properties": { "backupGeoTargets": { "$ref": "RRSetRoutingPolicyGeoPolicy", - "description": "Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to BACKUP, this policy essentially becomes a geo routing policy." + "description": "Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to `BACKUP`, this policy essentially becomes a geo routing policy." }, "kind": { "default": "dns#rRSetRoutingPolicyPrimaryBackupPolicy", @@ -3186,10 +3165,10 @@ }, "primaryTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the backup_geo_targets." + "description": "Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the `backup_geo_targets`." }, "trickleTraffic": { - "description": "When serving state is PRIMARY, this field provides the option of sending a small percentage of the traffic to the backup targets.", + "description": "When serving state is `PRIMARY`, this field provides the option of sending a small percentage of the traffic to the backup targets.", "format": "double", "type": "number" } @@ -3219,7 +3198,7 @@ "properties": { "healthCheckedTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." + "description": "Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of `rrdata` or `health_checked_targets` can be set." }, "kind": { "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", @@ -3232,14 +3211,14 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", + "description": "DNSSEC generated signatures for all the `rrdata` within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, "type": "array" }, "weight": { - "description": "The weight corresponding to this WrrPolicyItem object. When multiple WrrPolicyItem objects are configured, the probability of returning an WrrPolicyItem object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.", + "description": "The weight corresponding to this `WrrPolicyItem` object. When multiple `WrrPolicyItem` objects are configured, the probability of returning an `WrrPolicyItem` object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.", "format": "double", "type": "number" } @@ -3260,7 +3239,7 @@ }, "routingPolicy": { "$ref": "RRSetRoutingPolicy", - "description": "Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid ResourceRecordSet contains only rrdata (for static resolution) or a routing_policy (for dynamic resolution)." + "description": "Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid `ResourceRecordSet` contains only `rrdata` (for static resolution) or a `routing_policy` (for dynamic resolution)." }, "rrdatas": { "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", @@ -3277,7 +3256,7 @@ "type": "array" }, "ttl": { - "description": "Number of seconds that this ResourceRecordSet can be cached by resolvers.", + "description": "Number of seconds that this `ResourceRecordSet` can be cached by resolvers.", "format": "int32", "type": "integer" }, @@ -3296,16 +3275,13 @@ "ResourceRecordSetsListResponse": { "id": "ResourceRecordSetsListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#resourceRecordSetsListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even larger collections, one page at a time. However, if the collection changes between paginated list requests, the set of elements returned is an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "rrsets": { @@ -3318,25 +3294,11 @@ }, "type": "object" }, - "ResponseHeader": { - "description": "Elements common to every response.", - "id": "ResponseHeader", - "properties": { - "operationId": { - "description": "For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).", - "type": "string" - } - }, - "type": "object" - }, "ResponsePoliciesListResponse": { "id": "ResponsePoliciesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "nextPageToken": { - "description": "The presence of this field indicates that more results exist following your last page of results in pagination order. To fetch them, make another list request by using this value as your page token. This lets you view the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "responsePolicies": { @@ -3352,9 +3314,6 @@ "ResponsePoliciesPatchResponse": { "id": "ResponsePoliciesPatchResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicy": { "$ref": "ResponsePolicy" } @@ -3364,9 +3323,6 @@ "ResponsePoliciesUpdateResponse": { "id": "ResponsePoliciesUpdateResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicy": { "$ref": "ResponsePolicy" } @@ -3440,7 +3396,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", "type": "string" } }, @@ -3458,7 +3414,7 @@ ], "enumDescriptions": [ "", - "Skip a less-specific ResponsePolicyRule and continue normal query logic. This can be used with a less-specific wildcard selector to exempt a subset of the wildcard ResponsePolicyRule from the ResponsePolicy behavior and query the public Internet instead. For instance, if these rules exist: *.example.com -\u003e LocalData 1.2.3.4 foo.example.com -\u003e Behavior 'bypassResponsePolicy' Then a query for 'foo.example.com' skips the wildcard. This additionally functions to facilitate the allowlist feature. RPZs can be applied to multiple levels in the (eventually org, folder, project, network) hierarchy. If a rule is applied at a higher level of the hierarchy, adding a passthru rule at a lower level will supersede that, and a query from an affected vm to that domain will be exempt from the RPZ and proceed to normal resolution behavior." + "Skip a less-specific Response Policy Rule and let the query logic continue. This mechanism, when used with wildcard selectors, lets you exempt specific subdomains from a broader Response Policy Rule and direct the queries to the public internet instead. For example, if the following rules exist: ``` *.example.com -\u003e LocalData 1.2.3.4 foo.example.com -\u003e Behavior 'passthrough' ``` A query for foo.example.com skips the wildcard rule. This functionality also facilitates allowlisting. Response Policy Zones (RPZs) can be applied at multiple levels within the hierarchy: for example, an organization, a folder, a project, or a VPC network. If an RPZ rule is applied at a higher level, adding a `passthrough` rule at a lower level will override it. Queries from affected virtual machines (VMs) to that domain bypass the RPZ and proceed with normal resolution." ], "type": "string" }, @@ -3497,11 +3453,8 @@ "ResponsePolicyRulesListResponse": { "id": "ResponsePolicyRulesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "responsePolicyRules": { @@ -3517,9 +3470,6 @@ "ResponsePolicyRulesPatchResponse": { "id": "ResponsePolicyRulesPatchResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicyRule": { "$ref": "ResponsePolicyRule" } @@ -3529,9 +3479,6 @@ "ResponsePolicyRulesUpdateResponse": { "id": "ResponsePolicyRulesUpdateResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicyRule": { "$ref": "ResponsePolicyRule" } diff --git a/dns/v1/dns-gen.go b/dns/v1/dns-gen.go index 6a0d78a2009..74ff17c75b0 100644 --- a/dns/v1/dns-gen.go +++ b/dns/v1/dns-gen.go @@ -277,13 +277,13 @@ type ResponsePolicyRulesService struct { s *Service } -// Change: A Change represents a set of ResourceRecordSet additions and +// Change: A Change represents a set of `ResourceRecordSet` additions and // deletions applied atomically to a ManagedZone. ResourceRecordSets within a // ManagedZone are modified by creating a new Change element in the Changes // collection. In turn the Changes collection also records the past -// modifications to the ResourceRecordSets in a ManagedZone. The current state -// of the ManagedZone is the sum effect of applying all Change elements in the -// Changes collection in sequence. +// modifications to the `ResourceRecordSets` in a `ManagedZone`. The current +// state of the `ManagedZone` is the sum effect of applying all `Change` +// elements in the `Changes` collection in sequence. type Change struct { // Additions: Which ResourceRecordSets to add? Additions []*ResourceRecordSet `json:"additions,omitempty"` @@ -331,18 +331,17 @@ func (s *Change) MarshalJSON() ([]byte, error) { // ResourceRecordSets collection. type ChangesListResponse struct { // Changes: The requested changes. - Changes []*Change `json:"changes,omitempty"` - Header *ResponseHeader `json:"header,omitempty"` + Changes []*Change `json:"changes,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your pagination token. - // This lets you retrieve the complete contents of even very large collections - // one page at a time. However, if the contents of the collection change - // between the first and last paginated list request, the set of all elements - // returned are an inconsistent view of the collection. You cannot retrieve a - // "snapshot" of collections larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -514,19 +513,17 @@ func (s *DnsKeySpec) MarshalJSON() ([]byte, error) { // ManagedZone. type DnsKeysListResponse struct { // DnsKeys: The requested resources. - DnsKeys []*DnsKey `json:"dnsKeys,omitempty"` - Header *ResponseHeader `json:"header,omitempty"` + DnsKeys []*DnsKey `json:"dnsKeys,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your pagination token. - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the collection - // change between the first and last paginated list request, the set of all - // elements returned are an inconsistent view of the collection. There is no - // way to retrieve a "snapshot" of collections larger than the maximum page - // size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1058,8 +1055,10 @@ type ManagedZone struct { // while private zones are visible only to Virtual Private Cloud resources. // // Possible values: - // "public" - // "private" + // "public" - Indicates that records in this zone can be queried from the + // public internet. + // "private" - Indicates that records in this zone cannot be queried from the + // public internet. Access to private zones depends on the zone configuration. Visibility string `json:"visibility,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1116,8 +1115,12 @@ type ManagedZoneDnsSecConfig struct { // responses. Can only be changed while the state is OFF. // // Possible values: - // "nsec" - // "nsec3" + // "nsec" - Indicates that Cloud DNS will sign records in the managed zone + // according to RFC 4034 and respond with NSEC records for names that do not + // exist. + // "nsec3" - Indicates that Cloud DNS will sign records in the managed zone + // according to RFC 5155 and respond with NSEC3 records for names that do not + // exist. NonExistence string `json:"nonExistence,omitempty"` // State: Specifies whether DNSSEC is enabled, and what mode it is in. // @@ -1205,32 +1208,31 @@ func (s *ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, err } type ManagedZoneOperationsListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you retrieve the complete contents of even very large collections one - // page at a time. However, if the contents of the collection change between - // the first and last paginated list request, the set of all elements returned - // are an inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Operations: The operation resources. Operations []*Operation `json:"operations,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -1272,7 +1274,8 @@ type ManagedZonePeeringConfigTargetNetwork struct { Kind string `json:"kind,omitempty"` // NetworkUrl: The fully qualified URL of the VPC network to forward queries // to. This should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}` NetworkUrl string `json:"networkUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "DeactivateTime") to // unconditionally include in API requests. By default, fields with empty or @@ -1347,7 +1350,8 @@ type ManagedZonePrivateVisibilityConfigNetwork struct { Kind string `json:"kind,omitempty"` // NetworkUrl: The fully qualified URL of the VPC network to bind to. Format // this URL like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}` NetworkUrl string `json:"networkUrl,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 @@ -1420,7 +1424,8 @@ type ManagedZoneServiceDirectoryConfigNamespace struct { Kind string `json:"kind,omitempty"` // NamespaceUrl: The fully qualified URL of the namespace associated with the // zone. Format must be - // https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace} + // `https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{loc + // ation}/namespaces/{namespace}` NamespaceUrl string `json:"namespaceUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "DeletionTime") to // unconditionally include in API requests. By default, fields with empty or @@ -1441,32 +1446,31 @@ func (s *ManagedZoneServiceDirectoryConfigNamespace) MarshalJSON() ([]byte, erro } type ManagedZonesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` // ManagedZones: The managed zone resources. ManagedZones []*ManagedZone `json:"managedZones,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. 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. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -1581,32 +1585,31 @@ func (s *OperationManagedZoneContext) MarshalJSON() ([]byte, error) { } type PoliciesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Policies: The policy resources. Policies []*Policy `json:"policies,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -1617,18 +1620,17 @@ func (s *PoliciesListResponse) MarshalJSON() ([]byte, error) { } type PoliciesPatchResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - Policy *Policy `json:"policy,omitempty"` + Policy *Policy `json:"policy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") to include in API + // 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. @@ -1641,18 +1643,17 @@ func (s *PoliciesPatchResponse) MarshalJSON() ([]byte, error) { } type PoliciesUpdateResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - Policy *Policy `json:"policy,omitempty"` + Policy *Policy `json:"policy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") to include in API + // 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. @@ -1801,7 +1802,7 @@ func (s *PolicyNetwork) MarshalJSON() ([]byte, error) { // Project: A project resource. The project is a top level container for // resources including Cloud DNS ManagedZones. Projects can be created only in -// the APIs console. Next tag: 7. +// the APIs console. type Project struct { // Id: User assigned unique identifier for the resource (output only). Id string `json:"id,omitempty"` @@ -1944,7 +1945,7 @@ func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that routes +// RRSetRoutingPolicyGeoPolicy: Configures a `RRSetRoutingPolicy` that routes // based on the geo location of the querying user. type RRSetRoutingPolicyGeoPolicy struct { // EnableFencing: Without fencing, if health check fails for all configured @@ -1982,7 +1983,7 @@ func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) { type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // HealthCheckedTargets: For A and AAAA types only. Endpoints to return in the // query result only if they are healthy. These can be specified along with - // rrdata within this item. + // `rrdata` within this item. HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` Kind string `json:"kind,omitempty"` // Location: The geo-location granularity is a GCP region. This location string @@ -1990,8 +1991,8 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // "asia-east1", etc. Location string `json:"location,omitempty"` Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this - // item. If health checked targets are provided for DNSSEC enabled zones, + // SignatureRrdatas: DNSSEC generated signatures for all the `rrdata` within + // this item. If health checked targets are provided for DNSSEC enabled zones, // there's a restriction of 1 IP address per item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to @@ -2014,8 +2015,7 @@ func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) // RRSetRoutingPolicyHealthCheckTargets: HealthCheckTargets describes endpoints // to health-check when responding to Routing Policy queries. Only the healthy -// endpoints will be included in the response. Only one of -// internal_load_balancer and external_endpoints should be set. +// endpoints will be included in the response. type RRSetRoutingPolicyHealthCheckTargets struct { // InternalLoadBalancers: Configuration for internal load balancers to be // health checked. @@ -2047,8 +2047,8 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { // // Possible values: // "undefined" - // "tcp" - // "udp" + // "tcp" - Indicates the load balancer is accessible via TCP. + // "udp" - Indicates the load balancer is accessible via UDP. IpProtocol string `json:"ipProtocol,omitempty"` Kind string `json:"kind,omitempty"` // LoadBalancerType: The type of load balancer specified by this target. This @@ -2060,14 +2060,17 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { // // Possible values: // "none" - // "globalL7ilb" - // "regionalL4ilb" - // "regionalL7ilb" + // "globalL7ilb" - Indicates the load balancer is a Cross-Region Application + // Load Balancer. + // "regionalL4ilb" - Indicates the load balancer is a Regional Network + // Passthrough Load Balancer. + // "regionalL7ilb" - Indicates the load balancer is a Regional Application + // Load Balancer. LoadBalancerType string `json:"loadBalancerType,omitempty"` // NetworkUrl: The fully qualified URL of the network that the load balancer is // attached to. This should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - // . + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}`. NetworkUrl string `json:"networkUrl,omitempty"` // Port: The configured port of the load balancer. Port string `json:"port,omitempty"` @@ -2099,15 +2102,15 @@ func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) { // policy. type RRSetRoutingPolicyPrimaryBackupPolicy struct { // BackupGeoTargets: Backup targets provide a regional failover policy for the - // otherwise global primary targets. If serving state is set to BACKUP, this + // otherwise global primary targets. If serving state is set to `BACKUP`, this // policy essentially becomes a geo routing policy. BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"` Kind string `json:"kind,omitempty"` // PrimaryTargets: Endpoints that are health checked before making the routing // decision. Unhealthy endpoints are omitted from the results. If all endpoints - // are unhealthy, we serve a response based on the backup_geo_targets. + // are unhealthy, we serve a response based on the `backup_geo_targets`. PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"` - // TrickleTraffic: When serving state is PRIMARY, this field provides the + // TrickleTraffic: When serving state is `PRIMARY`, this field provides the // option of sending a small percentage of the traffic to the backup targets. TrickleTraffic float64 `json:"trickleTraffic,omitempty"` // ForceSendFields is a list of field names (e.g. "BackupGeoTargets") to @@ -2172,18 +2175,19 @@ type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { // routing decision. The unhealthy endpoints are omitted from the result. If // all endpoints within a bucket are unhealthy, we choose a different bucket // (sampled with respect to its weight) for responding. If DNSSEC is enabled - // for this zone, only one of rrdata or health_checked_targets can be set. + // for this zone, only one of `rrdata` or `health_checked_targets` can be set. HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` Kind string `json:"kind,omitempty"` Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this - // item. Note that if health checked targets are provided for DNSSEC enabled - // zones, there's a restriction of 1 IP address per item. + // SignatureRrdatas: DNSSEC generated signatures for all the `rrdata` within + // this item. Note that if health checked targets are provided for DNSSEC + // enabled zones, there's a restriction of 1 IP address per item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Weight: The weight corresponding to this WrrPolicyItem object. When multiple - // WrrPolicyItem objects are configured, the probability of returning an - // WrrPolicyItem object's data is proportional to its weight relative to the - // sum of weights configured for all items. This weight must be non-negative. + // Weight: The weight corresponding to this `WrrPolicyItem` object. When + // multiple `WrrPolicyItem` objects are configured, the probability of + // returning an `WrrPolicyItem` object's data is proportional to its weight + // relative to the sum of weights configured for all items. This weight must be + // non-negative. Weight float64 `json:"weight,omitempty"` // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to // unconditionally include in API requests. By default, fields with empty or @@ -2224,15 +2228,15 @@ type ResourceRecordSet struct { Name string `json:"name,omitempty"` // RoutingPolicy: Configures dynamic query responses based on either the geo // location of the querying user or a weighted round robin based routing - // policy. A valid ResourceRecordSet contains only rrdata (for static - // resolution) or a routing_policy (for dynamic resolution). + // policy. A valid `ResourceRecordSet` contains only `rrdata` (for static + // resolution) or a `routing_policy` (for dynamic resolution). RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"` // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- // see examples. Rrdatas []string `json:"rrdatas,omitempty"` // SignatureRrdatas: As defined in RFC 4034 (section 3.2). SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Ttl: Number of seconds that this ResourceRecordSet can be cached by + // Ttl: Number of seconds that this `ResourceRecordSet` can be cached by // resolvers. Ttl int64 `json:"ttl,omitempty"` // Type: The identifier of a supported record type. See the list of Supported @@ -2265,16 +2269,15 @@ type ResourceRecordSetsDeleteResponse struct { } type ResourceRecordSetsListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your pagination token. - // This lets you retrieve the complete contents of even larger collections, one - // page at a time. However, if the collection changes between paginated list - // requests, the set of elements returned is an inconsistent view of the - // collection. You cannot retrieve a consistent snapshot of a collection larger + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Rrsets: The resource record set resources. @@ -2282,15 +2285,15 @@ type ResourceRecordSetsListResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -2300,53 +2303,28 @@ func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ResponseHeader: Elements common to every response. -type ResponseHeader struct { - // OperationId: For mutating operation requests that completed successfully. - // This is the client_operation_id if the client specified it, otherwise it is - // generated by the server (output only). - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") 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. "OperationId") 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 *ResponseHeader) MarshalJSON() ([]byte, error) { - type NoMethod ResponseHeader - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - type ResponsePoliciesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - // NextPageToken: The presence of this field indicates that more results exist - // following your last page of results in pagination order. To fetch them, make - // another list request by using this value as your page token. This lets you - // view the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ResponsePolicies: The Response Policy resources. ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "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. "Header") 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. @@ -2359,20 +2337,19 @@ func (s *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) { } type ResponsePoliciesPatchResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicy") 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. "Header") 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. "ResponsePolicy") 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:"-"` } @@ -2383,20 +2360,19 @@ func (s *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) { } type ResponsePoliciesUpdateResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicy") 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. "Header") 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. "ResponsePolicy") 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:"-"` } @@ -2475,7 +2451,8 @@ type ResponsePolicyNetwork struct { Kind string `json:"kind,omitempty"` // NetworkUrl: The fully qualified URL of the VPC network to bind to. This // should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}` NetworkUrl string `json:"networkUrl,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 @@ -2505,18 +2482,19 @@ type ResponsePolicyRule struct { // // Possible values: // "behaviorUnspecified" - // "bypassResponsePolicy" - Skip a less-specific ResponsePolicyRule and - // continue normal query logic. This can be used with a less-specific wildcard - // selector to exempt a subset of the wildcard ResponsePolicyRule from the - // ResponsePolicy behavior and query the public Internet instead. For instance, - // if these rules exist: *.example.com -> LocalData 1.2.3.4 foo.example.com -> - // Behavior 'bypassResponsePolicy' Then a query for 'foo.example.com' skips the - // wildcard. This additionally functions to facilitate the allowlist feature. - // RPZs can be applied to multiple levels in the (eventually org, folder, - // project, network) hierarchy. If a rule is applied at a higher level of the - // hierarchy, adding a passthru rule at a lower level will supersede that, and - // a query from an affected vm to that domain will be exempt from the RPZ and - // proceed to normal resolution behavior. + // "bypassResponsePolicy" - Skip a less-specific Response Policy Rule and let + // the query logic continue. This mechanism, when used with wildcard selectors, + // lets you exempt specific subdomains from a broader Response Policy Rule and + // direct the queries to the public internet instead. For example, if the + // following rules exist: ``` *.example.com -> LocalData 1.2.3.4 + // foo.example.com -> Behavior 'passthrough' ``` A query for foo.example.com + // skips the wildcard rule. This functionality also facilitates allowlisting. + // Response Policy Zones (RPZs) can be applied at multiple levels within the + // hierarchy: for example, an organization, a folder, a project, or a VPC + // network. If an RPZ rule is applied at a higher level, adding a `passthrough` + // rule at a lower level will override it. Queries from affected virtual + // machines (VMs) to that domain bypass the RPZ and proceed with normal + // resolution. Behavior string `json:"behavior,omitempty"` // DnsName: The DNS name (wildcard or exact) to apply this rule to. Must be // unique within the Response Policy Rule. @@ -2574,28 +2552,27 @@ func (s *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) { } type ResponsePolicyRulesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ResponsePolicyRules: The Response Policy Rule resources. ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "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. "Header") 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. @@ -2608,20 +2585,19 @@ func (s *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) { } type ResponsePolicyRulesPatchResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicyRule") 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. "Header") 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. "ResponsePolicyRule") 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:"-"` } @@ -2632,20 +2608,19 @@ func (s *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) { } type ResponsePolicyRulesUpdateResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicyRule") 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. "Header") 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. "ResponsePolicyRule") 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/dns/v1beta2/dns-api.json b/dns/v1beta2/dns-api.json index 5a09f7629db..ee6e9732b2c 100644 --- a/dns/v1beta2/dns-api.json +++ b/dns/v1beta2/dns-api.json @@ -1821,11 +1821,11 @@ } } }, - "revision": "20240419", + "revision": "20240531", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { - "description": "A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.", + "description": "A Change represents a set of `ResourceRecordSet` additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the `ResourceRecordSets` in a `ManagedZone`. The current state of the `ManagedZone` is the sum effect of applying all `Change` elements in the `Changes` collection in sequence.", "id": "Change", "properties": { "additions": { @@ -1884,16 +1884,13 @@ }, "type": "array" }, - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#changesListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a \"snapshot\" of collections larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -2058,16 +2055,13 @@ }, "type": "array" }, - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#dnsKeysListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -2345,8 +2339,8 @@ "private" ], "enumDescriptions": [ - "", - "" + "Indicates that records in this zone can be queried from the public internet.", + "Indicates that records in this zone cannot be queried from the public internet. Access to private zones depends on the zone configuration." ], "type": "string" } @@ -2389,8 +2383,8 @@ "nsec3" ], "enumDescriptions": [ - "", - "" + "Indicates that Cloud DNS will sign records in the managed zone according to RFC 4034 and respond with NSEC records for names that do not exist.", + "Indicates that Cloud DNS will sign records in the managed zone according to RFC 5155 and respond with NSEC3 records for names that do not exist." ], "type": "string" }, @@ -2461,16 +2455,13 @@ "ManagedZoneOperationsListResponse": { "id": "ManagedZoneOperationsListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#managedZoneOperationsListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "operations": { @@ -2509,7 +2500,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", "type": "string" } }, @@ -2561,7 +2552,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. Format this URL like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to bind to. Format this URL like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", "type": "string" } }, @@ -2604,7 +2595,7 @@ "type": "string" }, "namespaceUrl": { - "description": "The fully qualified URL of the namespace associated with the zone. Format must be https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}", + "description": "The fully qualified URL of the namespace associated with the zone. Format must be `https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}`", "type": "string" } }, @@ -2613,9 +2604,6 @@ "ManagedZonesListResponse": { "id": "ManagedZonesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#managedZonesListResponse", "description": "Type of resource.", @@ -2629,7 +2617,7 @@ "type": "array" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -2713,16 +2701,13 @@ "PoliciesListResponse": { "id": "PoliciesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#policiesListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "policies": { @@ -2738,9 +2723,6 @@ "PoliciesPatchResponse": { "id": "PoliciesPatchResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "policy": { "$ref": "Policy" } @@ -2750,9 +2732,6 @@ "PoliciesUpdateResponse": { "id": "PoliciesUpdateResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "policy": { "$ref": "Policy" } @@ -2864,7 +2843,7 @@ "type": "object" }, "Project": { - "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. Next tag: 7.", + "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console.", "id": "Project", "properties": { "id": { @@ -3049,7 +3028,7 @@ "type": "object" }, "RRSetRoutingPolicyGeoPolicy": { - "description": "Configures a RRSetRoutingPolicy that routes based on the geo location of the querying user.", + "description": "Configures a `RRSetRoutingPolicy` that routes based on the geo location of the querying user.", "id": "RRSetRoutingPolicyGeoPolicy", "properties": { "enableFencing": { @@ -3076,7 +3055,7 @@ "properties": { "healthCheckedTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with rrdata within this item." + "description": "For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with `rrdata` within this item." }, "kind": { "default": "dns#rRSetRoutingPolicyGeoPolicyGeoPolicyItem", @@ -3093,7 +3072,7 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. If health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", + "description": "DNSSEC generated signatures for all the `rrdata` within this item. If health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, @@ -3103,7 +3082,7 @@ "type": "object" }, "RRSetRoutingPolicyHealthCheckTargets": { - "description": "HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response. Only one of internal_load_balancer and external_endpoints should be set.", + "description": "HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response.", "id": "RRSetRoutingPolicyHealthCheckTargets", "properties": { "internalLoadBalancers": { @@ -3133,8 +3112,8 @@ ], "enumDescriptions": [ "", - "", - "" + "Indicates the load balancer is accessible via TCP.", + "Indicates the load balancer is accessible via UDP." ], "type": "string" }, @@ -3152,14 +3131,14 @@ ], "enumDescriptions": [ "", - "", - "", - "" + "Indicates the load balancer is a Cross-Region Application Load Balancer.", + "Indicates the load balancer is a Regional Network Passthrough Load Balancer.", + "Indicates the load balancer is a Regional Application Load Balancer." ], "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the network that the load balancer is attached to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} .", + "description": "The fully qualified URL of the network that the load balancer is attached to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`.", "type": "string" }, "port": { @@ -3183,7 +3162,7 @@ "properties": { "backupGeoTargets": { "$ref": "RRSetRoutingPolicyGeoPolicy", - "description": "Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to BACKUP, this policy essentially becomes a geo routing policy." + "description": "Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to `BACKUP`, this policy essentially becomes a geo routing policy." }, "kind": { "default": "dns#rRSetRoutingPolicyPrimaryBackupPolicy", @@ -3191,10 +3170,10 @@ }, "primaryTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the backup_geo_targets." + "description": "Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the `backup_geo_targets`." }, "trickleTraffic": { - "description": "When serving state is PRIMARY, this field provides the option of sending a small percentage of the traffic to the backup targets.", + "description": "When serving state is `PRIMARY`, this field provides the option of sending a small percentage of the traffic to the backup targets.", "format": "double", "type": "number" } @@ -3224,7 +3203,7 @@ "properties": { "healthCheckedTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." + "description": "Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of `rrdata` or `health_checked_targets` can be set." }, "kind": { "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", @@ -3237,14 +3216,14 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", + "description": "DNSSEC generated signatures for all the `rrdata` within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, "type": "array" }, "weight": { - "description": "The weight corresponding to this WrrPolicyItem object. When multiple WrrPolicyItem objects are configured, the probability of returning an WrrPolicyItem object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.", + "description": "The weight corresponding to this `WrrPolicyItem` object. When multiple `WrrPolicyItem` objects are configured, the probability of returning an `WrrPolicyItem` object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.", "format": "double", "type": "number" } @@ -3265,7 +3244,7 @@ }, "routingPolicy": { "$ref": "RRSetRoutingPolicy", - "description": "Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid ResourceRecordSet contains only rrdata (for static resolution) or a routing_policy (for dynamic resolution)." + "description": "Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid `ResourceRecordSet` contains only `rrdata` (for static resolution) or a `routing_policy` (for dynamic resolution)." }, "rrdatas": { "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", @@ -3282,7 +3261,7 @@ "type": "array" }, "ttl": { - "description": "Number of seconds that this ResourceRecordSet can be cached by resolvers.", + "description": "Number of seconds that this `ResourceRecordSet` can be cached by resolvers.", "format": "int32", "type": "integer" }, @@ -3296,16 +3275,13 @@ "ResourceRecordSetsListResponse": { "id": "ResourceRecordSetsListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "kind": { "default": "dns#resourceRecordSetsListResponse", "description": "Type of resource.", "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even larger collections, one page at a time. However, if the collection changes between paginated list requests, the set of elements returned is an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "rrsets": { @@ -3318,25 +3294,11 @@ }, "type": "object" }, - "ResponseHeader": { - "description": "Elements common to every response.", - "id": "ResponseHeader", - "properties": { - "operationId": { - "description": "For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).", - "type": "string" - } - }, - "type": "object" - }, "ResponsePoliciesListResponse": { "id": "ResponsePoliciesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "nextPageToken": { - "description": "The presence of this field indicates that more results exist following your last page of results in pagination order. To fetch them, make another list request by using this value as your page token. This lets you view the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "responsePolicies": { @@ -3352,9 +3314,6 @@ "ResponsePoliciesPatchResponse": { "id": "ResponsePoliciesPatchResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicy": { "$ref": "ResponsePolicy" } @@ -3364,9 +3323,6 @@ "ResponsePoliciesUpdateResponse": { "id": "ResponsePoliciesUpdateResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicy": { "$ref": "ResponsePolicy" } @@ -3440,7 +3396,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", "type": "string" } }, @@ -3458,7 +3414,7 @@ ], "enumDescriptions": [ "", - "Skip a less-specific ResponsePolicyRule and continue normal query logic. This can be used with a less-specific wildcard selector to exempt a subset of the wildcard ResponsePolicyRule from the ResponsePolicy behavior and query the public Internet instead. For instance, if these rules exist: *.example.com -\u003e LocalData 1.2.3.4 foo.example.com -\u003e Behavior 'bypassResponsePolicy' Then a query for 'foo.example.com' skips the wildcard. This additionally functions to facilitate the allowlist feature. RPZs can be applied to multiple levels in the (eventually org, folder, project, network) hierarchy. If a rule is applied at a higher level of the hierarchy, adding a passthru rule at a lower level will supersede that, and a query from an affected vm to that domain will be exempt from the RPZ and proceed to normal resolution behavior." + "Skip a less-specific Response Policy Rule and let the query logic continue. This mechanism, when used with wildcard selectors, lets you exempt specific subdomains from a broader Response Policy Rule and direct the queries to the public internet instead. For example, if the following rules exist: ``` *.example.com -\u003e LocalData 1.2.3.4 foo.example.com -\u003e Behavior 'passthrough' ``` A query for foo.example.com skips the wildcard rule. This functionality also facilitates allowlisting. Response Policy Zones (RPZs) can be applied at multiple levels within the hierarchy: for example, an organization, a folder, a project, or a VPC network. If an RPZ rule is applied at a higher level, adding a `passthrough` rule at a lower level will override it. Queries from affected virtual machines (VMs) to that domain bypass the RPZ and proceed with normal resolution." ], "type": "string" }, @@ -3497,11 +3453,8 @@ "ResponsePolicyRulesListResponse": { "id": "ResponsePolicyRulesListResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "responsePolicyRules": { @@ -3517,9 +3470,6 @@ "ResponsePolicyRulesPatchResponse": { "id": "ResponsePolicyRulesPatchResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicyRule": { "$ref": "ResponsePolicyRule" } @@ -3529,9 +3479,6 @@ "ResponsePolicyRulesUpdateResponse": { "id": "ResponsePolicyRulesUpdateResponse", "properties": { - "header": { - "$ref": "ResponseHeader" - }, "responsePolicyRule": { "$ref": "ResponsePolicyRule" } diff --git a/dns/v1beta2/dns-gen.go b/dns/v1beta2/dns-gen.go index 408d7418096..c56f6bebb27 100644 --- a/dns/v1beta2/dns-gen.go +++ b/dns/v1beta2/dns-gen.go @@ -277,13 +277,13 @@ type ResponsePolicyRulesService struct { s *Service } -// Change: A Change represents a set of ResourceRecordSet additions and +// Change: A Change represents a set of `ResourceRecordSet` additions and // deletions applied atomically to a ManagedZone. ResourceRecordSets within a // ManagedZone are modified by creating a new Change element in the Changes // collection. In turn the Changes collection also records the past -// modifications to the ResourceRecordSets in a ManagedZone. The current state -// of the ManagedZone is the sum effect of applying all Change elements in the -// Changes collection in sequence. +// modifications to the `ResourceRecordSets` in a `ManagedZone`. The current +// state of the `ManagedZone` is the sum effect of applying all `Change` +// elements in the `Changes` collection in sequence. type Change struct { // Additions: Which ResourceRecordSets to add? Additions []*ResourceRecordSet `json:"additions,omitempty"` @@ -331,18 +331,17 @@ func (s *Change) MarshalJSON() ([]byte, error) { // ResourceRecordSets collection. type ChangesListResponse struct { // Changes: The requested changes. - Changes []*Change `json:"changes,omitempty"` - Header *ResponseHeader `json:"header,omitempty"` + Changes []*Change `json:"changes,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your pagination token. - // This lets you retrieve the complete contents of even very large collections - // one page at a time. However, if the contents of the collection change - // between the first and last paginated list request, the set of all elements - // returned are an inconsistent view of the collection. You cannot retrieve a - // "snapshot" of collections larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -514,19 +513,17 @@ func (s *DnsKeySpec) MarshalJSON() ([]byte, error) { // ManagedZone. type DnsKeysListResponse struct { // DnsKeys: The requested resources. - DnsKeys []*DnsKey `json:"dnsKeys,omitempty"` - Header *ResponseHeader `json:"header,omitempty"` + DnsKeys []*DnsKey `json:"dnsKeys,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your pagination token. - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the collection - // change between the first and last paginated list request, the set of all - // elements returned are an inconsistent view of the collection. There is no - // way to retrieve a "snapshot" of collections larger than the maximum page - // size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1058,8 +1055,10 @@ type ManagedZone struct { // while private zones are visible only to Virtual Private Cloud resources. // // Possible values: - // "public" - // "private" + // "public" - Indicates that records in this zone can be queried from the + // public internet. + // "private" - Indicates that records in this zone cannot be queried from the + // public internet. Access to private zones depends on the zone configuration. Visibility string `json:"visibility,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1116,8 +1115,12 @@ type ManagedZoneDnsSecConfig struct { // responses. Can only be changed while the state is OFF. // // Possible values: - // "nsec" - // "nsec3" + // "nsec" - Indicates that Cloud DNS will sign records in the managed zone + // according to RFC 4034 and respond with NSEC records for names that do not + // exist. + // "nsec3" - Indicates that Cloud DNS will sign records in the managed zone + // according to RFC 5155 and respond with NSEC3 records for names that do not + // exist. NonExistence string `json:"nonExistence,omitempty"` // State: Specifies whether DNSSEC is enabled, and what mode it is in. // @@ -1205,32 +1208,31 @@ func (s *ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, err } type ManagedZoneOperationsListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you retrieve the complete contents of even very large collections one - // page at a time. However, if the contents of the collection change between - // the first and last paginated list request, the set of all elements returned - // are an inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Operations: The operation resources. Operations []*Operation `json:"operations,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -1272,7 +1274,8 @@ type ManagedZonePeeringConfigTargetNetwork struct { Kind string `json:"kind,omitempty"` // NetworkUrl: The fully qualified URL of the VPC network to forward queries // to. This should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}` NetworkUrl string `json:"networkUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "DeactivateTime") to // unconditionally include in API requests. By default, fields with empty or @@ -1347,7 +1350,8 @@ type ManagedZonePrivateVisibilityConfigNetwork struct { Kind string `json:"kind,omitempty"` // NetworkUrl: The fully qualified URL of the VPC network to bind to. Format // this URL like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}` NetworkUrl string `json:"networkUrl,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 @@ -1420,7 +1424,8 @@ type ManagedZoneServiceDirectoryConfigNamespace struct { Kind string `json:"kind,omitempty"` // NamespaceUrl: The fully qualified URL of the namespace associated with the // zone. Format must be - // https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace} + // `https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{loc + // ation}/namespaces/{namespace}` NamespaceUrl string `json:"namespaceUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "DeletionTime") to // unconditionally include in API requests. By default, fields with empty or @@ -1441,32 +1446,31 @@ func (s *ManagedZoneServiceDirectoryConfigNamespace) MarshalJSON() ([]byte, erro } type ManagedZonesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` // ManagedZones: The managed zone resources. ManagedZones []*ManagedZone `json:"managedZones,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. 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. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -1581,32 +1585,31 @@ func (s *OperationManagedZoneContext) MarshalJSON() ([]byte, error) { } type PoliciesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Policies: The policy resources. Policies []*Policy `json:"policies,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -1617,18 +1620,17 @@ func (s *PoliciesListResponse) MarshalJSON() ([]byte, error) { } type PoliciesPatchResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - Policy *Policy `json:"policy,omitempty"` + Policy *Policy `json:"policy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") to include in API + // 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. @@ -1641,18 +1643,17 @@ func (s *PoliciesPatchResponse) MarshalJSON() ([]byte, error) { } type PoliciesUpdateResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - Policy *Policy `json:"policy,omitempty"` + Policy *Policy `json:"policy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") to include in API + // 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. @@ -1801,7 +1802,7 @@ func (s *PolicyNetwork) MarshalJSON() ([]byte, error) { // Project: A project resource. The project is a top level container for // resources including Cloud DNS ManagedZones. Projects can be created only in -// the APIs console. Next tag: 7. +// the APIs console. type Project struct { // Id: User assigned unique identifier for the resource (output only). Id string `json:"id,omitempty"` @@ -1946,7 +1947,7 @@ func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that routes +// RRSetRoutingPolicyGeoPolicy: Configures a `RRSetRoutingPolicy` that routes // based on the geo location of the querying user. type RRSetRoutingPolicyGeoPolicy struct { // EnableFencing: Without fencing, if health check fails for all configured @@ -1984,7 +1985,7 @@ func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) { type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // HealthCheckedTargets: For A and AAAA types only. Endpoints to return in the // query result only if they are healthy. These can be specified along with - // rrdata within this item. + // `rrdata` within this item. HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` Kind string `json:"kind,omitempty"` // Location: The geo-location granularity is a GCP region. This location string @@ -1992,8 +1993,8 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // "asia-east1", etc. Location string `json:"location,omitempty"` Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this - // item. If health checked targets are provided for DNSSEC enabled zones, + // SignatureRrdatas: DNSSEC generated signatures for all the `rrdata` within + // this item. If health checked targets are provided for DNSSEC enabled zones, // there's a restriction of 1 IP address per item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to @@ -2016,8 +2017,7 @@ func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) // RRSetRoutingPolicyHealthCheckTargets: HealthCheckTargets describes endpoints // to health-check when responding to Routing Policy queries. Only the healthy -// endpoints will be included in the response. Only one of -// internal_load_balancer and external_endpoints should be set. +// endpoints will be included in the response. type RRSetRoutingPolicyHealthCheckTargets struct { // InternalLoadBalancers: Configuration for internal load balancers to be // health checked. @@ -2049,8 +2049,8 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { // // Possible values: // "undefined" - // "tcp" - // "udp" + // "tcp" - Indicates the load balancer is accessible via TCP. + // "udp" - Indicates the load balancer is accessible via UDP. IpProtocol string `json:"ipProtocol,omitempty"` Kind string `json:"kind,omitempty"` // LoadBalancerType: The type of load balancer specified by this target. This @@ -2062,14 +2062,17 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { // // Possible values: // "none" - // "globalL7ilb" - // "regionalL4ilb" - // "regionalL7ilb" + // "globalL7ilb" - Indicates the load balancer is a Cross-Region Application + // Load Balancer. + // "regionalL4ilb" - Indicates the load balancer is a Regional Network + // Passthrough Load Balancer. + // "regionalL7ilb" - Indicates the load balancer is a Regional Application + // Load Balancer. LoadBalancerType string `json:"loadBalancerType,omitempty"` // NetworkUrl: The fully qualified URL of the network that the load balancer is // attached to. This should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - // . + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}`. NetworkUrl string `json:"networkUrl,omitempty"` // Port: The configured port of the load balancer. Port string `json:"port,omitempty"` @@ -2101,15 +2104,15 @@ func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) { // policy. type RRSetRoutingPolicyPrimaryBackupPolicy struct { // BackupGeoTargets: Backup targets provide a regional failover policy for the - // otherwise global primary targets. If serving state is set to BACKUP, this + // otherwise global primary targets. If serving state is set to `BACKUP`, this // policy essentially becomes a geo routing policy. BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"` Kind string `json:"kind,omitempty"` // PrimaryTargets: Endpoints that are health checked before making the routing // decision. Unhealthy endpoints are omitted from the results. If all endpoints - // are unhealthy, we serve a response based on the backup_geo_targets. + // are unhealthy, we serve a response based on the `backup_geo_targets`. PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"` - // TrickleTraffic: When serving state is PRIMARY, this field provides the + // TrickleTraffic: When serving state is `PRIMARY`, this field provides the // option of sending a small percentage of the traffic to the backup targets. TrickleTraffic float64 `json:"trickleTraffic,omitempty"` // ForceSendFields is a list of field names (e.g. "BackupGeoTargets") to @@ -2174,18 +2177,19 @@ type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { // routing decision. The unhealthy endpoints are omitted from the result. If // all endpoints within a bucket are unhealthy, we choose a different bucket // (sampled with respect to its weight) for responding. If DNSSEC is enabled - // for this zone, only one of rrdata or health_checked_targets can be set. + // for this zone, only one of `rrdata` or `health_checked_targets` can be set. HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` Kind string `json:"kind,omitempty"` Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this - // item. Note that if health checked targets are provided for DNSSEC enabled - // zones, there's a restriction of 1 IP address per item. + // SignatureRrdatas: DNSSEC generated signatures for all the `rrdata` within + // this item. Note that if health checked targets are provided for DNSSEC + // enabled zones, there's a restriction of 1 IP address per item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Weight: The weight corresponding to this WrrPolicyItem object. When multiple - // WrrPolicyItem objects are configured, the probability of returning an - // WrrPolicyItem object's data is proportional to its weight relative to the - // sum of weights configured for all items. This weight must be non-negative. + // Weight: The weight corresponding to this `WrrPolicyItem` object. When + // multiple `WrrPolicyItem` objects are configured, the probability of + // returning an `WrrPolicyItem` object's data is proportional to its weight + // relative to the sum of weights configured for all items. This weight must be + // non-negative. Weight float64 `json:"weight,omitempty"` // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to // unconditionally include in API requests. By default, fields with empty or @@ -2226,15 +2230,15 @@ type ResourceRecordSet struct { Name string `json:"name,omitempty"` // RoutingPolicy: Configures dynamic query responses based on either the geo // location of the querying user or a weighted round robin based routing - // policy. A valid ResourceRecordSet contains only rrdata (for static - // resolution) or a routing_policy (for dynamic resolution). + // policy. A valid `ResourceRecordSet` contains only `rrdata` (for static + // resolution) or a `routing_policy` (for dynamic resolution). RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"` // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- // see examples. Rrdatas []string `json:"rrdatas,omitempty"` // SignatureRrdatas: As defined in RFC 4034 (section 3.2). SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Ttl: Number of seconds that this ResourceRecordSet can be cached by + // Ttl: Number of seconds that this `ResourceRecordSet` can be cached by // resolvers. Ttl int64 `json:"ttl,omitempty"` // Type: The identifier of a supported record type. See the list of Supported @@ -2262,16 +2266,15 @@ func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) { } type ResourceRecordSetsListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your pagination token. - // This lets you retrieve the complete contents of even larger collections, one - // page at a time. However, if the collection changes between paginated list - // requests, the set of elements returned is an inconsistent view of the - // collection. You cannot retrieve a consistent snapshot of a collection larger + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Rrsets: The resource record set resources. @@ -2279,15 +2282,15 @@ type ResourceRecordSetsListResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") to unconditionally + // 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. "Header") 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:"-"` } @@ -2297,53 +2300,28 @@ func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ResponseHeader: Elements common to every response. -type ResponseHeader struct { - // OperationId: For mutating operation requests that completed successfully. - // This is the client_operation_id if the client specified it, otherwise it is - // generated by the server (output only). - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") 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. "OperationId") 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 *ResponseHeader) MarshalJSON() ([]byte, error) { - type NoMethod ResponseHeader - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - type ResponsePoliciesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - // NextPageToken: The presence of this field indicates that more results exist - // following your last page of results in pagination order. To fetch them, make - // another list request by using this value as your page token. This lets you - // view the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ResponsePolicies: The Response Policy resources. ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "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. "Header") 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. @@ -2356,20 +2334,19 @@ func (s *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) { } type ResponsePoliciesPatchResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicy") 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. "Header") 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. "ResponsePolicy") 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:"-"` } @@ -2380,20 +2357,19 @@ func (s *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) { } type ResponsePoliciesUpdateResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicy") 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. "Header") 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. "ResponsePolicy") 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:"-"` } @@ -2472,7 +2448,8 @@ type ResponsePolicyNetwork struct { Kind string `json:"kind,omitempty"` // NetworkUrl: The fully qualified URL of the VPC network to bind to. This // should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne + // twork}` NetworkUrl string `json:"networkUrl,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 @@ -2502,18 +2479,19 @@ type ResponsePolicyRule struct { // // Possible values: // "behaviorUnspecified" - // "bypassResponsePolicy" - Skip a less-specific ResponsePolicyRule and - // continue normal query logic. This can be used with a less-specific wildcard - // selector to exempt a subset of the wildcard ResponsePolicyRule from the - // ResponsePolicy behavior and query the public Internet instead. For instance, - // if these rules exist: *.example.com -> LocalData 1.2.3.4 foo.example.com -> - // Behavior 'bypassResponsePolicy' Then a query for 'foo.example.com' skips the - // wildcard. This additionally functions to facilitate the allowlist feature. - // RPZs can be applied to multiple levels in the (eventually org, folder, - // project, network) hierarchy. If a rule is applied at a higher level of the - // hierarchy, adding a passthru rule at a lower level will supersede that, and - // a query from an affected vm to that domain will be exempt from the RPZ and - // proceed to normal resolution behavior. + // "bypassResponsePolicy" - Skip a less-specific Response Policy Rule and let + // the query logic continue. This mechanism, when used with wildcard selectors, + // lets you exempt specific subdomains from a broader Response Policy Rule and + // direct the queries to the public internet instead. For example, if the + // following rules exist: ``` *.example.com -> LocalData 1.2.3.4 + // foo.example.com -> Behavior 'passthrough' ``` A query for foo.example.com + // skips the wildcard rule. This functionality also facilitates allowlisting. + // Response Policy Zones (RPZs) can be applied at multiple levels within the + // hierarchy: for example, an organization, a folder, a project, or a VPC + // network. If an RPZ rule is applied at a higher level, adding a `passthrough` + // rule at a lower level will override it. Queries from affected virtual + // machines (VMs) to that domain bypass the RPZ and proceed with normal + // resolution. Behavior string `json:"behavior,omitempty"` // DnsName: The DNS name (wildcard or exact) to apply this rule to. Must be // unique within the Response Policy Rule. @@ -2571,28 +2549,27 @@ func (s *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) { } type ResponsePolicyRulesListResponse struct { - Header *ResponseHeader `json:"header,omitempty"` - // NextPageToken: The presence of this field indicates that there exist more - // results following your last page of results in pagination order. To fetch - // them, make another list request using this value as your page token. This - // lets you the complete contents of even very large collections one page at a - // time. However, if the contents of the collection change between the first - // and last paginated list request, the set of all elements returned are an - // inconsistent view of the collection. You cannot retrieve a consistent - // snapshot of a collection larger than the maximum page size. + // NextPageToken: This field indicates that more results are available beyond + // the last page displayed. To fetch the results, make another list request and + // use this value as your page token. This lets you retrieve the complete + // contents of a very large collection one page at a time. However, if the + // contents of the collection change between the first and last paginated list + // request, the set of all elements returned are an inconsistent view of the + // collection. You can't retrieve a consistent snapshot of a collection larger + // than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ResponsePolicyRules: The Response Policy Rule resources. ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "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. "Header") 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. @@ -2605,20 +2582,19 @@ func (s *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) { } type ResponsePolicyRulesPatchResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicyRule") 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. "Header") 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. "ResponsePolicyRule") 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:"-"` } @@ -2629,20 +2605,19 @@ func (s *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) { } type ResponsePolicyRulesUpdateResponse struct { - Header *ResponseHeader `json:"header,omitempty"` ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Header") 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. "ResponsePolicyRule") 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. "Header") 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. "ResponsePolicyRule") 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/domains/v1/domains-api.json b/domains/v1/domains-api.json index 41d2a7f883b..8bdf6ba3cc9 100644 --- a/domains/v1/domains-api.json +++ b/domains/v1/domains-api.json @@ -472,6 +472,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "initiatePushTransfer": { + "description": "Initiates the `Push Transfer` process to transfer the domain to another registrar. The process might complete instantly or might require confirmation or additional work. Check the emails sent to the email address of the registrant. The process is aborted after a timeout if it's not completed. This method is only supported for domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties`. The domain must also be unlocked before it can be transferred to a different registrar. For more information, see [Transfer a registered domain to another registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:initiatePushTransfer", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.initiatePushTransfer", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` for which the push transfer is initiated, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+registration}:initiatePushTransfer", + "request": { + "$ref": "InitiatePushTransferRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists the `Registration` resources in a project.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registrations", @@ -575,8 +603,36 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "renewDomain": { + "description": "Renews a recently expired domain. This method can only be called on domains that expired in the previous 30 days. After the renewal, the new expiration time of the domain is one year after the old expiration time and you are charged a `yearly_price` for the renewal.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:renewDomain", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.renewDomain", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` whish is being renewed, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+registration}:renewDomain", + "request": { + "$ref": "RenewDomainRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "resetAuthorizationCode": { - "description": "Resets the authorization code of the `Registration` to a new random string. You can call this method only after 60 days have elapsed since the initial domain registration.", + "description": "Resets the authorization code of the `Registration` to a new random string. You can call this method only after 60 days have elapsed since the initial domain registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't support authorization codes and must use the `InitiatePushTransfer` method to initiate the process to transfer the domain to a different registrar.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:resetAuthorizationCode", "httpMethod": "POST", "id": "domains.projects.locations.registrations.resetAuthorizationCode", @@ -604,7 +660,7 @@ ] }, "retrieveAuthorizationCode": { - "description": "Gets the authorization code of the `Registration` for the purpose of transferring the domain to another registrar. You can call this method only after 60 days have elapsed since the initial domain registration.", + "description": "Gets the authorization code of the `Registration` for the purpose of transferring the domain to another registrar. You can call this method only after 60 days have elapsed since the initial domain registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't support authorization codes and must use the `InitiatePushTransfer` method to initiate the process to transfer the domain to a different registrar.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:retrieveAuthorizationCode", "httpMethod": "GET", "id": "domains.projects.locations.registrations.retrieveAuthorizationCode", @@ -628,6 +684,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "retrieveGoogleDomainsForwardingConfig": { + "description": "Lists the deprecated domain and email forwarding configurations you set up in the deprecated Google Domains UI. The configuration is present only for domains with the `google_domains_redirects_data_available` set to `true` in the `Registration`'s `dns_settings`. A forwarding configuration might not work correctly if required DNS records are not present in the domain's authoritative DNS Zone.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:retrieveGoogleDomainsForwardingConfig", + "httpMethod": "GET", + "id": "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` whose Google Domains forwarding configuration details are being retrieved, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+registration}:retrieveGoogleDomainsForwardingConfig", + "response": { + "$ref": "RetrieveGoogleDomainsForwardingConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "retrieveImportableDomains": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations) Lists domain names from [Google Domains](https://domains.google/) that can be imported to Cloud Domains using the `ImportDomain` method. Since individual users can own domains in Google Domains, the list of domains returned depends on the individual user making the call. Domains already managed by Cloud Domains are not returned.", @@ -848,7 +929,7 @@ } } }, - "revision": "20240520", + "revision": "20240603", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1146,6 +1227,47 @@ }, "type": "object" }, + "DomainForwarding": { + "description": "Domain forwarding configuration.", + "id": "DomainForwarding", + "properties": { + "pathForwarding": { + "description": "If true, forwards the path after the domain name to the same path at the new address.", + "type": "boolean" + }, + "pemCertificate": { + "description": "The PEM-encoded certificate chain.", + "type": "string" + }, + "redirectType": { + "description": "The redirect type.", + "enum": [ + "REDIRECT_TYPE_UNSPECIFIED", + "TEMPORARY", + "PERMANENT" + ], + "enumDescriptions": [ + "Redirect Type is unspecified.", + "301 redirect. Allows to propagate changes to the forwarding address quickly.", + "302 redirect. Allows browsers to cache the forwarding address. This may help the address resolve more quickly. Changes may take longer to propagate" + ], + "type": "string" + }, + "sslEnabled": { + "description": "If true, the forwarding works also over HTTPS.", + "type": "boolean" + }, + "subdomain": { + "description": "The subdomain of the registered domain that is being forwarded. E.g. `www.example.com`, `example.com` (i.e. the registered domain itself) or `*.example.com` (i.e. all subdomains).", + "type": "string" + }, + "targetUri": { + "description": "The target of the domain forwarding, i.e. the path to redirect the `subdomain` to.", + "type": "string" + } + }, + "type": "object" + }, "DsRecord": { "description": "Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that must be present in the domain's DNS zone.", "id": "DsRecord", @@ -1224,6 +1346,21 @@ }, "type": "object" }, + "EmailForwarding": { + "description": "Email forwarding configuration.", + "id": "EmailForwarding", + "properties": { + "alias": { + "description": "An alias recipient email that forwards emails to the `target_email_address`. For example, `admin@example.com` or `*@example.com` (wildcard alias forwards all the emails under the registered domain).", + "type": "string" + }, + "targetEmailAddress": { + "description": "Target email that receives emails sent to the `alias`.", + "type": "string" + } + }, + "type": "object" + }, "ExportRegistrationRequest": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Request for the `ExportRegistration` method.", @@ -1336,6 +1473,17 @@ }, "type": "object" }, + "InitiatePushTransferRequest": { + "description": "Request for the `InitiatePushTransfer` method.", + "id": "InitiatePushTransferRequest", + "properties": { + "tag": { + "description": "Required. The Tag of the new registrar. Can be found at [List of registrars](https://nominet.uk/registrar-list/).", + "type": "string" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1428,6 +1576,21 @@ "description": "Defines renewal, billing, and transfer settings for a `Registration`.", "id": "ManagementSettings", "properties": { + "effectiveTransferLockState": { + "description": "Output only. The actual transfer lock state for this `Registration`.", + "enum": [ + "TRANSFER_LOCK_STATE_UNSPECIFIED", + "UNLOCKED", + "LOCKED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The domain is unlocked and can be transferred to another registrar.", + "The domain is locked and cannot be transferred to another registrar." + ], + "readOnly": true, + "type": "string" + }, "preferredRenewalMethod": { "description": "Optional. The desired renewal method for this `Registration`. The actual `renewal_method` is automatically updated to reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the actual `renewalMethod` is treated as if it were set to `AUTOMATIC_RENEWAL`. You cannot use `RENEWAL_DISABLED` during resource creation, and you can update the renewal status only when the `Registration` resource has state `ACTIVE` or `SUSPENDED`. When `preferred_renewal_method` is set to `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be set to `RENEWAL_DISABLED` in case of problems with the billing account or reported domain abuse. In such cases, check the `issues` field on the `Registration`. After the problem is resolved, the `renewal_method` is automatically updated to `preferred_renewal_method` in a few hours.", "enum": [ @@ -1474,7 +1637,7 @@ "type": "string" }, "transferLockState": { - "description": "This is the desired transfer lock state for this `Registration`. A transfer lock controls whether the domain can be transferred to another registrar.", + "description": "This is the desired transfer lock state for this `Registration`. A transfer lock controls whether the domain can be transferred to another registrar. The transfer lock state of the domain is returned in the `effective_transfer_lock_state` property. The transfer lock state values might be different for the following reasons: * `transfer_lock_state` was updated only a short time ago. * Domains with the `TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY` state are in the list of `domain_properties`. These domains are always in the `UNLOCKED` state.", "enum": [ "TRANSFER_LOCK_STATE_UNSPECIFIED", "UNLOCKED", @@ -1812,6 +1975,24 @@ "description": "Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format.", "type": "string" }, + "domainProperties": { + "description": "Output only. Special properties of the domain.", + "items": { + "enum": [ + "DOMAIN_PROPERTY_UNSPECIFIED", + "TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY", + "REQUIRE_PUSH_TRANSFER" + ], + "enumDescriptions": [ + "The property is undefined.", + "The domain does not support transfer locks due to restrictions of the registry. Such domains are effectively always unlocked and any change made to `management_settings.transfer_lock_state` is ignored.", + "The domain uses an alternative `Push Transfer` process to transfer the domain to another registrar. There are two important consequences: * Cloud Domains does not supply the authorization codes. * To initiate the process to transfer the domain to another registrar, you must provide a tag of the registrar you want to transfer to. You can do this by using the `InitiatePushTransfer` method. For more information, see [Transfer a registered domain to another registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar)." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "expireTime": { "description": "Output only. The expiration timestamp of the `Registration`.", "format": "google-datetime", @@ -1825,13 +2006,15 @@ "ISSUE_UNSPECIFIED", "CONTACT_SUPPORT", "UNVERIFIED_EMAIL", - "PROBLEM_WITH_BILLING" + "PROBLEM_WITH_BILLING", + "DNS_NOT_ACTIVATED" ], "enumDescriptions": [ "The issue is undefined.", "Contact the Cloud Support team to resolve a problem with this domain.", "[ICANN](https://icann.org/) requires verification of the email address in the `Registration`'s `contact_settings.registrant_contact` field. To verify the email address, follow the instructions in the email the `registrant_contact` receives following registration. If you do not complete email verification within 15 days of registration, the domain is suspended. To resend the verification email, call ConfigureContactSettings and provide the current `registrant_contact.email`.", - "The billing account is not in good standing. The domain is not automatically renewed at its expiration time unless you resolve problems with your billing account." + "The billing account is not in good standing. The domain is not automatically renewed at its expiration time unless you resolve problems with your billing account.", + "The registry failed to validate your DNS configuration and activate your domain. The failure might happen for the following reasons: * You recently registered the domain (wait up to 72 hours). * You provided invalid name servers or name servers that correspond to a newly created DNS zone. Verify your DNS configuration. If the configuration is incorrect, you must fix it. If the configuration is correct, either wait or call the ConfigureDnsSettings method to retry the registry validation." ], "type": "string" }, @@ -1978,12 +2161,48 @@ }, "type": "object" }, + "RenewDomainRequest": { + "description": "Request for the `RenewDomain` method.", + "id": "RenewDomainRequest", + "properties": { + "validateOnly": { + "description": "Optional. When true, only validation is performed, without actually renewing the domain. For more information, see [Request validation](https://cloud.google.com/apis/design/design_patterns#request_validation)", + "type": "boolean" + }, + "yearlyPrice": { + "$ref": "Money", + "description": "Required. Acknowledgement of the price to renew the domain for one year. To get the price, see [Cloud Domains pricing](https://cloud.google.com/domains/pricing). If not provided, the expected price is returned in the error message." + } + }, + "type": "object" + }, "ResetAuthorizationCodeRequest": { "description": "Request for the `ResetAuthorizationCode` method.", "id": "ResetAuthorizationCodeRequest", "properties": {}, "type": "object" }, + "RetrieveGoogleDomainsForwardingConfigResponse": { + "description": "Response for the `RetrieveGoogleDomainsForwardingConfig` method.", + "id": "RetrieveGoogleDomainsForwardingConfigResponse", + "properties": { + "domainForwardings": { + "description": "The list of domain forwarding configurations. A forwarding configuration might not work correctly if the required DNS records are not present in the domain's authoritative DNS zone.", + "items": { + "$ref": "DomainForwarding" + }, + "type": "array" + }, + "emailForwardings": { + "description": "The list of email forwarding configurations. A forwarding configuration might not work correctly if the required DNS records are not present in the domain's authoritative DNS zone.", + "items": { + "$ref": "EmailForwarding" + }, + "type": "array" + } + }, + "type": "object" + }, "RetrieveImportableDomainsResponse": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Response for the `RetrieveImportableDomains` method.", diff --git a/domains/v1/domains-gen.go b/domains/v1/domains-gen.go index ab5aa6de3f6..a3a62460ab4 100644 --- a/domains/v1/domains-gen.go +++ b/domains/v1/domains-gen.go @@ -690,6 +690,50 @@ func (s *Domain) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// DomainForwarding: Domain forwarding configuration. +type DomainForwarding struct { + // PathForwarding: If true, forwards the path after the domain name to the same + // path at the new address. + PathForwarding bool `json:"pathForwarding,omitempty"` + // PemCertificate: The PEM-encoded certificate chain. + PemCertificate string `json:"pemCertificate,omitempty"` + // RedirectType: The redirect type. + // + // Possible values: + // "REDIRECT_TYPE_UNSPECIFIED" - Redirect Type is unspecified. + // "TEMPORARY" - 301 redirect. Allows to propagate changes to the forwarding + // address quickly. + // "PERMANENT" - 302 redirect. Allows browsers to cache the forwarding + // address. This may help the address resolve more quickly. Changes may take + // longer to propagate + RedirectType string `json:"redirectType,omitempty"` + // SslEnabled: If true, the forwarding works also over HTTPS. + SslEnabled bool `json:"sslEnabled,omitempty"` + // Subdomain: The subdomain of the registered domain that is being forwarded. + // E.g. `www.example.com`, `example.com` (i.e. the registered domain itself) or + // `*.example.com` (i.e. all subdomains). + Subdomain string `json:"subdomain,omitempty"` + // TargetUri: The target of the domain forwarding, i.e. the path to redirect + // the `subdomain` to. + TargetUri string `json:"targetUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PathForwarding") 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. "PathForwarding") 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 *DomainForwarding) MarshalJSON() ([]byte, error) { + type NoMethod DomainForwarding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // DsRecord: Defines a Delegation Signer (DS) record, which is needed to enable // DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that // must be present in the domain's DNS zone. @@ -750,6 +794,32 @@ func (s *DsRecord) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// EmailForwarding: Email forwarding configuration. +type EmailForwarding struct { + // Alias: An alias recipient email that forwards emails to the + // `target_email_address`. For example, `admin@example.com` or `*@example.com` + // (wildcard alias forwards all the emails under the registered domain). + Alias string `json:"alias,omitempty"` + // TargetEmailAddress: Target email that receives emails sent to the `alias`. + TargetEmailAddress string `json:"targetEmailAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alias") 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. "Alias") 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 *EmailForwarding) MarshalJSON() ([]byte, error) { + type NoMethod EmailForwarding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ExportRegistrationRequest: Deprecated: For more information, see Cloud // Domains feature deprecation // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). @@ -915,6 +985,29 @@ func (s *ImportDomainRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// InitiatePushTransferRequest: Request for the `InitiatePushTransfer` method. +type InitiatePushTransferRequest struct { + // Tag: Required. The Tag of the new registrar. Can be found at List of + // registrars (https://nominet.uk/registrar-list/). + Tag string `json:"tag,omitempty"` + // ForceSendFields is a list of field names (e.g. "Tag") 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. "Tag") 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 *InitiatePushTransferRequest) MarshalJSON() ([]byte, error) { + type NoMethod InitiatePushTransferRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for Locations.ListLocations. type ListLocationsResponse struct { // Locations: A list of locations that matches the specified filter in the @@ -1041,6 +1134,16 @@ func (s *Location) MarshalJSON() ([]byte, error) { // ManagementSettings: Defines renewal, billing, and transfer settings for a // `Registration`. type ManagementSettings struct { + // EffectiveTransferLockState: Output only. The actual transfer lock state for + // this `Registration`. + // + // Possible values: + // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. + // "UNLOCKED" - The domain is unlocked and can be transferred to another + // registrar. + // "LOCKED" - The domain is locked and cannot be transferred to another + // registrar. + EffectiveTransferLockState string `json:"effectiveTransferLockState,omitempty"` // PreferredRenewalMethod: Optional. The desired renewal method for this // `Registration`. The actual `renewal_method` is automatically updated to // reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the @@ -1084,7 +1187,12 @@ type ManagementSettings struct { RenewalMethod string `json:"renewalMethod,omitempty"` // TransferLockState: This is the desired transfer lock state for this // `Registration`. A transfer lock controls whether the domain can be - // transferred to another registrar. + // transferred to another registrar. The transfer lock state of the domain is + // returned in the `effective_transfer_lock_state` property. The transfer lock + // state values might be different for the following reasons: * + // `transfer_lock_state` was updated only a short time ago. * Domains with the + // `TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY` state are in the list of + // `domain_properties`. These domains are always in the `UNLOCKED` state. // // Possible values: // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. @@ -1093,13 +1201,13 @@ type ManagementSettings struct { // "LOCKED" - The domain is locked and cannot be transferred to another // registrar. TransferLockState string `json:"transferLockState,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreferredRenewalMethod") to - // unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "EffectiveTransferLockState") + // 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. "PreferredRenewalMethod") to + // NullFields is a list of field names (e.g. "EffectiveTransferLockState") 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. @@ -1572,6 +1680,24 @@ type Registration struct { // DomainName: Required. Immutable. The domain name. Unicode domain names must // be expressed in Punycode format. DomainName string `json:"domainName,omitempty"` + // DomainProperties: Output only. Special properties of the domain. + // + // Possible values: + // "DOMAIN_PROPERTY_UNSPECIFIED" - The property is undefined. + // "TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY" - The domain does not support + // transfer locks due to restrictions of the registry. Such domains are + // effectively always unlocked and any change made to + // `management_settings.transfer_lock_state` is ignored. + // "REQUIRE_PUSH_TRANSFER" - The domain uses an alternative `Push Transfer` + // process to transfer the domain to another registrar. There are two important + // consequences: * Cloud Domains does not supply the authorization codes. * To + // initiate the process to transfer the domain to another registrar, you must + // provide a tag of the registrar you want to transfer to. You can do this by + // using the `InitiatePushTransfer` method. For more information, see [Transfer + // a registered domain to another + // registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-r + // egistrar). + DomainProperties []string `json:"domainProperties,omitempty"` // ExpireTime: Output only. The expiration timestamp of the `Registration`. ExpireTime string `json:"expireTime,omitempty"` // Issues: Output only. The set of issues with the `Registration` that require @@ -1592,6 +1718,14 @@ type Registration struct { // "PROBLEM_WITH_BILLING" - The billing account is not in good standing. The // domain is not automatically renewed at its expiration time unless you // resolve problems with your billing account. + // "DNS_NOT_ACTIVATED" - The registry failed to validate your DNS + // configuration and activate your domain. The failure might happen for the + // following reasons: * You recently registered the domain (wait up to 72 + // hours). * You provided invalid name servers or name servers that correspond + // to a newly created DNS zone. Verify your DNS configuration. If the + // configuration is incorrect, you must fix it. If the configuration is + // correct, either wait or call the ConfigureDnsSettings method to retry the + // registry validation. Issues []string `json:"issues,omitempty"` // Labels: Set of labels associated with the `Registration`. Labels map[string]string `json:"labels,omitempty"` @@ -1720,11 +1854,72 @@ func (s *Registration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// RenewDomainRequest: Request for the `RenewDomain` method. +type RenewDomainRequest struct { + // ValidateOnly: Optional. When true, only validation is performed, without + // actually renewing the domain. For more information, see Request validation + // (https://cloud.google.com/apis/design/design_patterns#request_validation) + ValidateOnly bool `json:"validateOnly,omitempty"` + // YearlyPrice: Required. Acknowledgement of the price to renew the domain for + // one year. To get the price, see Cloud Domains pricing + // (https://cloud.google.com/domains/pricing). If not provided, the expected + // price is returned in the error message. + YearlyPrice *Money `json:"yearlyPrice,omitempty"` + // ForceSendFields is a list of field names (e.g. "ValidateOnly") 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. "ValidateOnly") 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 *RenewDomainRequest) MarshalJSON() ([]byte, error) { + type NoMethod RenewDomainRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ResetAuthorizationCodeRequest: Request for the `ResetAuthorizationCode` // method. type ResetAuthorizationCodeRequest struct { } +// RetrieveGoogleDomainsForwardingConfigResponse: Response for the +// `RetrieveGoogleDomainsForwardingConfig` method. +type RetrieveGoogleDomainsForwardingConfigResponse struct { + // DomainForwardings: The list of domain forwarding configurations. A + // forwarding configuration might not work correctly if the required DNS + // records are not present in the domain's authoritative DNS zone. + DomainForwardings []*DomainForwarding `json:"domainForwardings,omitempty"` + // EmailForwardings: The list of email forwarding configurations. A forwarding + // configuration might not work correctly if the required DNS records are not + // present in the domain's authoritative DNS zone. + EmailForwardings []*EmailForwarding `json:"emailForwardings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DomainForwardings") 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. "DomainForwardings") 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 *RetrieveGoogleDomainsForwardingConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod RetrieveGoogleDomainsForwardingConfigResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // RetrieveImportableDomainsResponse: Deprecated: For more information, see // Cloud Domains feature deprecation // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). @@ -3472,6 +3667,117 @@ func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOpti return ret, nil } +type ProjectsLocationsRegistrationsInitiatePushTransferCall struct { + s *Service + registration string + initiatepushtransferrequest *InitiatePushTransferRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InitiatePushTransfer: Initiates the `Push Transfer` process to transfer the +// domain to another registrar. The process might complete instantly or might +// require confirmation or additional work. Check the emails sent to the email +// address of the registrant. The process is aborted after a timeout if it's +// not completed. This method is only supported for domains that have the +// `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties`. The +// domain must also be unlocked before it can be transferred to a different +// registrar. For more information, see Transfer a registered domain to another +// registrar +// (https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar). +// +// - registration: The name of the `Registration` for which the push transfer +// is initiated, in the format `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) InitiatePushTransfer(registration string, initiatepushtransferrequest *InitiatePushTransferRequest) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + c := &ProjectsLocationsRegistrationsInitiatePushTransferCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + c.initiatepushtransferrequest = initiatepushtransferrequest + 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.initiatepushtransferrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:initiatePushTransfer") + 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{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.initiatePushTransfer" 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsListCall struct { s *Service parent string @@ -3858,6 +4164,111 @@ func (c *ProjectsLocationsRegistrationsRegisterCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsRegistrationsRenewDomainCall struct { + s *Service + registration string + renewdomainrequest *RenewDomainRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RenewDomain: Renews a recently expired domain. This method can only be +// called on domains that expired in the previous 30 days. After the renewal, +// the new expiration time of the domain is one year after the old expiration +// time and you are charged a `yearly_price` for the renewal. +// +// - registration: The name of the `Registration` whish is being renewed, in +// the format `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) RenewDomain(registration string, renewdomainrequest *RenewDomainRequest) *ProjectsLocationsRegistrationsRenewDomainCall { + c := &ProjectsLocationsRegistrationsRenewDomainCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + c.renewdomainrequest = renewdomainrequest + 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 *ProjectsLocationsRegistrationsRenewDomainCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRenewDomainCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsRenewDomainCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRenewDomainCall { + 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 *ProjectsLocationsRegistrationsRenewDomainCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRenewDomainCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renewdomainrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:renewDomain") + 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{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.renewDomain" 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 *ProjectsLocationsRegistrationsRenewDomainCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct { s *Service registration string @@ -3869,7 +4280,10 @@ type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct { // ResetAuthorizationCode: Resets the authorization code of the `Registration` // to a new random string. You can call this method only after 60 days have -// elapsed since the initial domain registration. +// elapsed since the initial domain registration. Domains that have the +// `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't +// support authorization codes and must use the `InitiatePushTransfer` method +// to initiate the process to transfer the domain to a different registrar. // // - registration: The name of the `Registration` whose authorization code is // being reset, in the format `projects/*/locations/*/registrations/*`. @@ -3975,7 +4389,10 @@ type ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall struct { // RetrieveAuthorizationCode: Gets the authorization code of the `Registration` // for the purpose of transferring the domain to another registrar. You can // call this method only after 60 days have elapsed since the initial domain -// registration. +// registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the +// list of `domain_properties` don't support authorization codes and must use +// the `InitiatePushTransfer` method to initiate the process to transfer the +// domain to a different registrar. // // - registration: The name of the `Registration` whose authorization code is // being retrieved, in the format `projects/*/locations/*/registrations/*`. @@ -4075,6 +4492,122 @@ func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts .. return ret, nil } +type ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall struct { + s *Service + registration string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// RetrieveGoogleDomainsForwardingConfig: Lists the deprecated domain and email +// forwarding configurations you set up in the deprecated Google Domains UI. +// The configuration is present only for domains with the +// `google_domains_redirects_data_available` set to `true` in the +// `Registration`'s `dns_settings`. A forwarding configuration might not work +// correctly if required DNS records are not present in the domain's +// authoritative DNS Zone. +// +// - registration: The name of the `Registration` whose Google Domains +// forwarding configuration details are being retrieved, in the format +// `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) RetrieveGoogleDomainsForwardingConfig(registration string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + c := &ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:retrieveGoogleDomainsForwardingConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *RetrieveGoogleDomainsForwardingConfigResponse.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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Do(opts ...googleapi.CallOption) (*RetrieveGoogleDomainsForwardingConfigResponse, 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 := &RetrieveGoogleDomainsForwardingConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct { s *Service location string diff --git a/domains/v1alpha2/domains-api.json b/domains/v1alpha2/domains-api.json index 0300087a85b..d6943d80151 100644 --- a/domains/v1alpha2/domains-api.json +++ b/domains/v1alpha2/domains-api.json @@ -472,6 +472,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "initiatePushTransfer": { + "description": "Initiates the `Push Transfer` process to transfer the domain to another registrar. The process might complete instantly or might require confirmation or additional work. Check the emails sent to the email address of the registrant. The process is aborted after a timeout if it's not completed. This method is only supported for domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties`. The domain must also be unlocked before it can be transferred to a different registrar. For more information, see [Transfer a registered domain to another registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar).", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:initiatePushTransfer", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.initiatePushTransfer", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` for which the push transfer is initiated, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+registration}:initiatePushTransfer", + "request": { + "$ref": "InitiatePushTransferRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists the `Registration` resources in a project.", "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations", @@ -575,8 +603,36 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "renewDomain": { + "description": "Renews a recently expired domain. This method can only be called on domains that expired in the previous 30 days. After the renewal, the new expiration time of the domain is one year after the old expiration time and you are charged a `yearly_price` for the renewal.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:renewDomain", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.renewDomain", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` whish is being renewed, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+registration}:renewDomain", + "request": { + "$ref": "RenewDomainRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "resetAuthorizationCode": { - "description": "Resets the authorization code of the `Registration` to a new random string. You can call this method only after 60 days have elapsed since the initial domain registration.", + "description": "Resets the authorization code of the `Registration` to a new random string. You can call this method only after 60 days have elapsed since the initial domain registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't support authorization codes and must use the `InitiatePushTransfer` method to initiate the process to transfer the domain to a different registrar.", "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:resetAuthorizationCode", "httpMethod": "POST", "id": "domains.projects.locations.registrations.resetAuthorizationCode", @@ -604,7 +660,7 @@ ] }, "retrieveAuthorizationCode": { - "description": "Gets the authorization code of the `Registration` for the purpose of transferring the domain to another registrar. You can call this method only after 60 days have elapsed since the initial domain registration.", + "description": "Gets the authorization code of the `Registration` for the purpose of transferring the domain to another registrar. You can call this method only after 60 days have elapsed since the initial domain registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't support authorization codes and must use the `InitiatePushTransfer` method to initiate the process to transfer the domain to a different registrar.", "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:retrieveAuthorizationCode", "httpMethod": "GET", "id": "domains.projects.locations.registrations.retrieveAuthorizationCode", @@ -628,6 +684,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "retrieveGoogleDomainsForwardingConfig": { + "description": "Lists the deprecated domain and email forwarding configurations you set up in the deprecated Google Domains UI. The configuration is present only for domains with the `google_domains_redirects_data_available` set to `true` in the `Registration`'s `dns_settings`. A forwarding configuration might not work correctly if required DNS records are not present in the domain's authoritative DNS Zone.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:retrieveGoogleDomainsForwardingConfig", + "httpMethod": "GET", + "id": "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` whose Google Domains forwarding configuration details are being retrieved, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+registration}:retrieveGoogleDomainsForwardingConfig", + "response": { + "$ref": "RetrieveGoogleDomainsForwardingConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "retrieveImportableDomains": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations) Lists domain names from [Google Domains](https://domains.google/) that can be imported to Cloud Domains using the `ImportDomain` method. Since individual users can own domains in Google Domains, the list of domains returned depends on the individual user making the call. Domains already managed by Cloud Domains are not returned.", @@ -848,7 +929,7 @@ } } }, - "revision": "20240520", + "revision": "20240603", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1146,6 +1227,47 @@ }, "type": "object" }, + "DomainForwarding": { + "description": "Domain forwarding configuration.", + "id": "DomainForwarding", + "properties": { + "pathForwarding": { + "description": "If true, forwards the path after the domain name to the same path at the new address.", + "type": "boolean" + }, + "pemCertificate": { + "description": "The PEM-encoded certificate chain.", + "type": "string" + }, + "redirectType": { + "description": "The redirect type.", + "enum": [ + "REDIRECT_TYPE_UNSPECIFIED", + "TEMPORARY", + "PERMANENT" + ], + "enumDescriptions": [ + "Redirect Type is unspecified.", + "301 redirect. Allows to propagate changes to the forwarding address quickly.", + "302 redirect. Allows browsers to cache the forwarding address. This may help the address resolve more quickly. Changes may take longer to propagate" + ], + "type": "string" + }, + "sslEnabled": { + "description": "If true, the forwarding works also over HTTPS.", + "type": "boolean" + }, + "subdomain": { + "description": "The subdomain of the registered domain that is being forwarded. E.g. `www.example.com`, `example.com` (i.e. the registered domain itself) or `*.example.com` (i.e. all subdomains).", + "type": "string" + }, + "targetUri": { + "description": "The target of the domain forwarding, i.e. the path to redirect the `subdomain` to.", + "type": "string" + } + }, + "type": "object" + }, "DsRecord": { "description": "Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that must be present in the domain's DNS zone.", "id": "DsRecord", @@ -1224,6 +1346,21 @@ }, "type": "object" }, + "EmailForwarding": { + "description": "Email forwarding configuration.", + "id": "EmailForwarding", + "properties": { + "alias": { + "description": "An alias recipient email that forwards emails to the `target_email_address`. For example, `admin@example.com` or `*@example.com` (wildcard alias forwards all the emails under the registered domain).", + "type": "string" + }, + "targetEmailAddress": { + "description": "Target email that receives emails sent to the `alias`.", + "type": "string" + } + }, + "type": "object" + }, "ExportRegistrationRequest": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Request for the `ExportRegistration` method.", @@ -1336,6 +1473,17 @@ }, "type": "object" }, + "InitiatePushTransferRequest": { + "description": "Request for the `InitiatePushTransfer` method.", + "id": "InitiatePushTransferRequest", + "properties": { + "tag": { + "description": "Required. The Tag of the new registrar. Can be found at [List of registrars](https://nominet.uk/registrar-list/).", + "type": "string" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1428,6 +1576,21 @@ "description": "Defines renewal, billing, and transfer settings for a `Registration`.", "id": "ManagementSettings", "properties": { + "effectiveTransferLockState": { + "description": "Output only. The actual transfer lock state for this `Registration`.", + "enum": [ + "TRANSFER_LOCK_STATE_UNSPECIFIED", + "UNLOCKED", + "LOCKED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The domain is unlocked and can be transferred to another registrar.", + "The domain is locked and cannot be transferred to another registrar." + ], + "readOnly": true, + "type": "string" + }, "preferredRenewalMethod": { "description": "Optional. The desired renewal method for this `Registration`. The actual `renewal_method` is automatically updated to reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the actual `renewalMethod` is treated as if it were set to `AUTOMATIC_RENEWAL`. You cannot use `RENEWAL_DISABLED` during resource creation, and you can update the renewal status only when the `Registration` resource has state `ACTIVE` or `SUSPENDED`. When `preferred_renewal_method` is set to `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be set to `RENEWAL_DISABLED` in case of problems with the billing account or reported domain abuse. In such cases, check the `issues` field on the `Registration`. After the problem is resolved, the `renewal_method` is automatically updated to `preferred_renewal_method` in a few hours.", "enum": [ @@ -1474,7 +1637,7 @@ "type": "string" }, "transferLockState": { - "description": "This is the desired transfer lock state for this `Registration`. A transfer lock controls whether the domain can be transferred to another registrar.", + "description": "This is the desired transfer lock state for this `Registration`. A transfer lock controls whether the domain can be transferred to another registrar. The transfer lock state of the domain is returned in the `effective_transfer_lock_state` property. The transfer lock state values might be different for the following reasons: * `transfer_lock_state` was updated only a short time ago. * Domains with the `TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY` state are in the list of `domain_properties`. These domains are always in the `UNLOCKED` state.", "enum": [ "TRANSFER_LOCK_STATE_UNSPECIFIED", "UNLOCKED", @@ -1812,6 +1975,24 @@ "description": "Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format.", "type": "string" }, + "domainProperties": { + "description": "Output only. Special properties of the domain.", + "items": { + "enum": [ + "DOMAIN_PROPERTY_UNSPECIFIED", + "TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY", + "REQUIRE_PUSH_TRANSFER" + ], + "enumDescriptions": [ + "The property is undefined.", + "The domain does not support transfer locks due to restrictions of the registry. Such domains are effectively always unlocked and any change made to `management_settings.transfer_lock_state` is ignored.", + "The domain uses an alternative `Push Transfer` process to transfer the domain to another registrar. There are two important consequences: * Cloud Domains does not supply the authorization codes. * To initiate the process to transfer the domain to another registrar, you must provide a tag of the registrar you want to transfer to. You can do this by using the `InitiatePushTransfer` method. For more information, see [Transfer a registered domain to another registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar)." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "expireTime": { "description": "Output only. The expiration timestamp of the `Registration`.", "format": "google-datetime", @@ -1825,13 +2006,15 @@ "ISSUE_UNSPECIFIED", "CONTACT_SUPPORT", "UNVERIFIED_EMAIL", - "PROBLEM_WITH_BILLING" + "PROBLEM_WITH_BILLING", + "DNS_NOT_ACTIVATED" ], "enumDescriptions": [ "The issue is undefined.", "Contact the Cloud Support team to resolve a problem with this domain.", "[ICANN](https://icann.org/) requires verification of the email address in the `Registration`'s `contact_settings.registrant_contact` field. To verify the email address, follow the instructions in the email the `registrant_contact` receives following registration. If you do not complete email verification within 15 days of registration, the domain is suspended. To resend the verification email, call ConfigureContactSettings and provide the current `registrant_contact.email`.", - "The billing account is not in good standing. The domain is not automatically renewed at its expiration time unless you resolve problems with your billing account." + "The billing account is not in good standing. The domain is not automatically renewed at its expiration time unless you resolve problems with your billing account.", + "The registry failed to validate your DNS configuration and activate your domain. The failure might happen for the following reasons: * You recently registered the domain (wait up to 72 hours). * You provided invalid name servers or name servers that correspond to a newly created DNS zone. Verify your DNS configuration. If the configuration is incorrect, you must fix it. If the configuration is correct, either wait or call the ConfigureDnsSettings method to retry the registry validation." ], "type": "string" }, @@ -1993,12 +2176,48 @@ }, "type": "object" }, + "RenewDomainRequest": { + "description": "Request for the `RenewDomain` method.", + "id": "RenewDomainRequest", + "properties": { + "validateOnly": { + "description": "Optional. When true, only validation is performed, without actually renewing the domain. For more information, see [Request validation](https://cloud.google.com/apis/design/design_patterns#request_validation)", + "type": "boolean" + }, + "yearlyPrice": { + "$ref": "Money", + "description": "Required. Acknowledgement of the price to renew the domain for one year. To get the price, see [Cloud Domains pricing](https://cloud.google.com/domains/pricing). If not provided, the expected price is returned in the error message." + } + }, + "type": "object" + }, "ResetAuthorizationCodeRequest": { "description": "Request for the `ResetAuthorizationCode` method.", "id": "ResetAuthorizationCodeRequest", "properties": {}, "type": "object" }, + "RetrieveGoogleDomainsForwardingConfigResponse": { + "description": "Response for the `RetrieveGoogleDomainsForwardingConfig` method.", + "id": "RetrieveGoogleDomainsForwardingConfigResponse", + "properties": { + "domainForwardings": { + "description": "The list of domain forwarding configurations. A forwarding configuration might not work correctly if the required DNS records are not present in the domain's authoritative DNS zone.", + "items": { + "$ref": "DomainForwarding" + }, + "type": "array" + }, + "emailForwardings": { + "description": "The list of email forwarding configurations. A forwarding configuration might not work correctly if the required DNS records are not present in the domain's authoritative DNS zone.", + "items": { + "$ref": "EmailForwarding" + }, + "type": "array" + } + }, + "type": "object" + }, "RetrieveImportableDomainsResponse": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Response for the `RetrieveImportableDomains` method.", diff --git a/domains/v1alpha2/domains-gen.go b/domains/v1alpha2/domains-gen.go index d854b4f239b..d2382e84eb4 100644 --- a/domains/v1alpha2/domains-gen.go +++ b/domains/v1alpha2/domains-gen.go @@ -690,6 +690,50 @@ func (s *Domain) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// DomainForwarding: Domain forwarding configuration. +type DomainForwarding struct { + // PathForwarding: If true, forwards the path after the domain name to the same + // path at the new address. + PathForwarding bool `json:"pathForwarding,omitempty"` + // PemCertificate: The PEM-encoded certificate chain. + PemCertificate string `json:"pemCertificate,omitempty"` + // RedirectType: The redirect type. + // + // Possible values: + // "REDIRECT_TYPE_UNSPECIFIED" - Redirect Type is unspecified. + // "TEMPORARY" - 301 redirect. Allows to propagate changes to the forwarding + // address quickly. + // "PERMANENT" - 302 redirect. Allows browsers to cache the forwarding + // address. This may help the address resolve more quickly. Changes may take + // longer to propagate + RedirectType string `json:"redirectType,omitempty"` + // SslEnabled: If true, the forwarding works also over HTTPS. + SslEnabled bool `json:"sslEnabled,omitempty"` + // Subdomain: The subdomain of the registered domain that is being forwarded. + // E.g. `www.example.com`, `example.com` (i.e. the registered domain itself) or + // `*.example.com` (i.e. all subdomains). + Subdomain string `json:"subdomain,omitempty"` + // TargetUri: The target of the domain forwarding, i.e. the path to redirect + // the `subdomain` to. + TargetUri string `json:"targetUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PathForwarding") 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. "PathForwarding") 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 *DomainForwarding) MarshalJSON() ([]byte, error) { + type NoMethod DomainForwarding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // DsRecord: Defines a Delegation Signer (DS) record, which is needed to enable // DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that // must be present in the domain's DNS zone. @@ -750,6 +794,32 @@ func (s *DsRecord) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// EmailForwarding: Email forwarding configuration. +type EmailForwarding struct { + // Alias: An alias recipient email that forwards emails to the + // `target_email_address`. For example, `admin@example.com` or `*@example.com` + // (wildcard alias forwards all the emails under the registered domain). + Alias string `json:"alias,omitempty"` + // TargetEmailAddress: Target email that receives emails sent to the `alias`. + TargetEmailAddress string `json:"targetEmailAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alias") 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. "Alias") 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 *EmailForwarding) MarshalJSON() ([]byte, error) { + type NoMethod EmailForwarding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ExportRegistrationRequest: Deprecated: For more information, see Cloud // Domains feature deprecation // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). @@ -915,6 +985,29 @@ func (s *ImportDomainRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// InitiatePushTransferRequest: Request for the `InitiatePushTransfer` method. +type InitiatePushTransferRequest struct { + // Tag: Required. The Tag of the new registrar. Can be found at List of + // registrars (https://nominet.uk/registrar-list/). + Tag string `json:"tag,omitempty"` + // ForceSendFields is a list of field names (e.g. "Tag") 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. "Tag") 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 *InitiatePushTransferRequest) MarshalJSON() ([]byte, error) { + type NoMethod InitiatePushTransferRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for Locations.ListLocations. type ListLocationsResponse struct { // Locations: A list of locations that matches the specified filter in the @@ -1041,6 +1134,16 @@ func (s *Location) MarshalJSON() ([]byte, error) { // ManagementSettings: Defines renewal, billing, and transfer settings for a // `Registration`. type ManagementSettings struct { + // EffectiveTransferLockState: Output only. The actual transfer lock state for + // this `Registration`. + // + // Possible values: + // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. + // "UNLOCKED" - The domain is unlocked and can be transferred to another + // registrar. + // "LOCKED" - The domain is locked and cannot be transferred to another + // registrar. + EffectiveTransferLockState string `json:"effectiveTransferLockState,omitempty"` // PreferredRenewalMethod: Optional. The desired renewal method for this // `Registration`. The actual `renewal_method` is automatically updated to // reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the @@ -1084,7 +1187,12 @@ type ManagementSettings struct { RenewalMethod string `json:"renewalMethod,omitempty"` // TransferLockState: This is the desired transfer lock state for this // `Registration`. A transfer lock controls whether the domain can be - // transferred to another registrar. + // transferred to another registrar. The transfer lock state of the domain is + // returned in the `effective_transfer_lock_state` property. The transfer lock + // state values might be different for the following reasons: * + // `transfer_lock_state` was updated only a short time ago. * Domains with the + // `TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY` state are in the list of + // `domain_properties`. These domains are always in the `UNLOCKED` state. // // Possible values: // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. @@ -1093,13 +1201,13 @@ type ManagementSettings struct { // "LOCKED" - The domain is locked and cannot be transferred to another // registrar. TransferLockState string `json:"transferLockState,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreferredRenewalMethod") to - // unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "EffectiveTransferLockState") + // 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. "PreferredRenewalMethod") to + // NullFields is a list of field names (e.g. "EffectiveTransferLockState") 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. @@ -1572,6 +1680,24 @@ type Registration struct { // DomainName: Required. Immutable. The domain name. Unicode domain names must // be expressed in Punycode format. DomainName string `json:"domainName,omitempty"` + // DomainProperties: Output only. Special properties of the domain. + // + // Possible values: + // "DOMAIN_PROPERTY_UNSPECIFIED" - The property is undefined. + // "TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY" - The domain does not support + // transfer locks due to restrictions of the registry. Such domains are + // effectively always unlocked and any change made to + // `management_settings.transfer_lock_state` is ignored. + // "REQUIRE_PUSH_TRANSFER" - The domain uses an alternative `Push Transfer` + // process to transfer the domain to another registrar. There are two important + // consequences: * Cloud Domains does not supply the authorization codes. * To + // initiate the process to transfer the domain to another registrar, you must + // provide a tag of the registrar you want to transfer to. You can do this by + // using the `InitiatePushTransfer` method. For more information, see [Transfer + // a registered domain to another + // registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-r + // egistrar). + DomainProperties []string `json:"domainProperties,omitempty"` // ExpireTime: Output only. The expiration timestamp of the `Registration`. ExpireTime string `json:"expireTime,omitempty"` // Issues: Output only. The set of issues with the `Registration` that require @@ -1592,6 +1718,14 @@ type Registration struct { // "PROBLEM_WITH_BILLING" - The billing account is not in good standing. The // domain is not automatically renewed at its expiration time unless you // resolve problems with your billing account. + // "DNS_NOT_ACTIVATED" - The registry failed to validate your DNS + // configuration and activate your domain. The failure might happen for the + // following reasons: * You recently registered the domain (wait up to 72 + // hours). * You provided invalid name servers or name servers that correspond + // to a newly created DNS zone. Verify your DNS configuration. If the + // configuration is incorrect, you must fix it. If the configuration is + // correct, either wait or call the ConfigureDnsSettings method to retry the + // registry validation. Issues []string `json:"issues,omitempty"` // Labels: Set of labels associated with the `Registration`. Labels map[string]string `json:"labels,omitempty"` @@ -1727,11 +1861,72 @@ func (s *Registration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// RenewDomainRequest: Request for the `RenewDomain` method. +type RenewDomainRequest struct { + // ValidateOnly: Optional. When true, only validation is performed, without + // actually renewing the domain. For more information, see Request validation + // (https://cloud.google.com/apis/design/design_patterns#request_validation) + ValidateOnly bool `json:"validateOnly,omitempty"` + // YearlyPrice: Required. Acknowledgement of the price to renew the domain for + // one year. To get the price, see Cloud Domains pricing + // (https://cloud.google.com/domains/pricing). If not provided, the expected + // price is returned in the error message. + YearlyPrice *Money `json:"yearlyPrice,omitempty"` + // ForceSendFields is a list of field names (e.g. "ValidateOnly") 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. "ValidateOnly") 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 *RenewDomainRequest) MarshalJSON() ([]byte, error) { + type NoMethod RenewDomainRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ResetAuthorizationCodeRequest: Request for the `ResetAuthorizationCode` // method. type ResetAuthorizationCodeRequest struct { } +// RetrieveGoogleDomainsForwardingConfigResponse: Response for the +// `RetrieveGoogleDomainsForwardingConfig` method. +type RetrieveGoogleDomainsForwardingConfigResponse struct { + // DomainForwardings: The list of domain forwarding configurations. A + // forwarding configuration might not work correctly if the required DNS + // records are not present in the domain's authoritative DNS zone. + DomainForwardings []*DomainForwarding `json:"domainForwardings,omitempty"` + // EmailForwardings: The list of email forwarding configurations. A forwarding + // configuration might not work correctly if the required DNS records are not + // present in the domain's authoritative DNS zone. + EmailForwardings []*EmailForwarding `json:"emailForwardings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DomainForwardings") 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. "DomainForwardings") 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 *RetrieveGoogleDomainsForwardingConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod RetrieveGoogleDomainsForwardingConfigResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // RetrieveImportableDomainsResponse: Deprecated: For more information, see // Cloud Domains feature deprecation // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). @@ -3479,6 +3674,117 @@ func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOpti return ret, nil } +type ProjectsLocationsRegistrationsInitiatePushTransferCall struct { + s *Service + registration string + initiatepushtransferrequest *InitiatePushTransferRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InitiatePushTransfer: Initiates the `Push Transfer` process to transfer the +// domain to another registrar. The process might complete instantly or might +// require confirmation or additional work. Check the emails sent to the email +// address of the registrant. The process is aborted after a timeout if it's +// not completed. This method is only supported for domains that have the +// `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties`. The +// domain must also be unlocked before it can be transferred to a different +// registrar. For more information, see Transfer a registered domain to another +// registrar +// (https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar). +// +// - registration: The name of the `Registration` for which the push transfer +// is initiated, in the format `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) InitiatePushTransfer(registration string, initiatepushtransferrequest *InitiatePushTransferRequest) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + c := &ProjectsLocationsRegistrationsInitiatePushTransferCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + c.initiatepushtransferrequest = initiatepushtransferrequest + 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.initiatepushtransferrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:initiatePushTransfer") + 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{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.initiatePushTransfer" 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsListCall struct { s *Service parent string @@ -3865,6 +4171,111 @@ func (c *ProjectsLocationsRegistrationsRegisterCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsRegistrationsRenewDomainCall struct { + s *Service + registration string + renewdomainrequest *RenewDomainRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RenewDomain: Renews a recently expired domain. This method can only be +// called on domains that expired in the previous 30 days. After the renewal, +// the new expiration time of the domain is one year after the old expiration +// time and you are charged a `yearly_price` for the renewal. +// +// - registration: The name of the `Registration` whish is being renewed, in +// the format `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) RenewDomain(registration string, renewdomainrequest *RenewDomainRequest) *ProjectsLocationsRegistrationsRenewDomainCall { + c := &ProjectsLocationsRegistrationsRenewDomainCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + c.renewdomainrequest = renewdomainrequest + 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 *ProjectsLocationsRegistrationsRenewDomainCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRenewDomainCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsRenewDomainCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRenewDomainCall { + 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 *ProjectsLocationsRegistrationsRenewDomainCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRenewDomainCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renewdomainrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:renewDomain") + 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{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.renewDomain" 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 *ProjectsLocationsRegistrationsRenewDomainCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct { s *Service registration string @@ -3876,7 +4287,10 @@ type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct { // ResetAuthorizationCode: Resets the authorization code of the `Registration` // to a new random string. You can call this method only after 60 days have -// elapsed since the initial domain registration. +// elapsed since the initial domain registration. Domains that have the +// `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't +// support authorization codes and must use the `InitiatePushTransfer` method +// to initiate the process to transfer the domain to a different registrar. // // - registration: The name of the `Registration` whose authorization code is // being reset, in the format `projects/*/locations/*/registrations/*`. @@ -3982,7 +4396,10 @@ type ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall struct { // RetrieveAuthorizationCode: Gets the authorization code of the `Registration` // for the purpose of transferring the domain to another registrar. You can // call this method only after 60 days have elapsed since the initial domain -// registration. +// registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the +// list of `domain_properties` don't support authorization codes and must use +// the `InitiatePushTransfer` method to initiate the process to transfer the +// domain to a different registrar. // // - registration: The name of the `Registration` whose authorization code is // being retrieved, in the format `projects/*/locations/*/registrations/*`. @@ -4082,6 +4499,122 @@ func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts .. return ret, nil } +type ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall struct { + s *Service + registration string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// RetrieveGoogleDomainsForwardingConfig: Lists the deprecated domain and email +// forwarding configurations you set up in the deprecated Google Domains UI. +// The configuration is present only for domains with the +// `google_domains_redirects_data_available` set to `true` in the +// `Registration`'s `dns_settings`. A forwarding configuration might not work +// correctly if required DNS records are not present in the domain's +// authoritative DNS Zone. +// +// - registration: The name of the `Registration` whose Google Domains +// forwarding configuration details are being retrieved, in the format +// `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) RetrieveGoogleDomainsForwardingConfig(registration string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + c := &ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:retrieveGoogleDomainsForwardingConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *RetrieveGoogleDomainsForwardingConfigResponse.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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Do(opts ...googleapi.CallOption) (*RetrieveGoogleDomainsForwardingConfigResponse, 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 := &RetrieveGoogleDomainsForwardingConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct { s *Service location string diff --git a/domains/v1beta1/domains-api.json b/domains/v1beta1/domains-api.json index 34a8f12108f..288619a03ec 100644 --- a/domains/v1beta1/domains-api.json +++ b/domains/v1beta1/domains-api.json @@ -472,6 +472,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "initiatePushTransfer": { + "description": "Initiates the `Push Transfer` process to transfer the domain to another registrar. The process might complete instantly or might require confirmation or additional work. Check the emails sent to the email address of the registrant. The process is aborted after a timeout if it's not completed. This method is only supported for domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties`. The domain must also be unlocked before it can be transferred to a different registrar. For more information, see [Transfer a registered domain to another registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar).", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:initiatePushTransfer", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.initiatePushTransfer", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` for which the push transfer is initiated, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+registration}:initiatePushTransfer", + "request": { + "$ref": "InitiatePushTransferRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists the `Registration` resources in a project.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations", @@ -575,8 +603,36 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "renewDomain": { + "description": "Renews a recently expired domain. This method can only be called on domains that expired in the previous 30 days. After the renewal, the new expiration time of the domain is one year after the old expiration time and you are charged a `yearly_price` for the renewal.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:renewDomain", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.renewDomain", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` whish is being renewed, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+registration}:renewDomain", + "request": { + "$ref": "RenewDomainRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "resetAuthorizationCode": { - "description": "Resets the authorization code of the `Registration` to a new random string. You can call this method only after 60 days have elapsed since the initial domain registration.", + "description": "Resets the authorization code of the `Registration` to a new random string. You can call this method only after 60 days have elapsed since the initial domain registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't support authorization codes and must use the `InitiatePushTransfer` method to initiate the process to transfer the domain to a different registrar.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:resetAuthorizationCode", "httpMethod": "POST", "id": "domains.projects.locations.registrations.resetAuthorizationCode", @@ -604,7 +660,7 @@ ] }, "retrieveAuthorizationCode": { - "description": "Gets the authorization code of the `Registration` for the purpose of transferring the domain to another registrar. You can call this method only after 60 days have elapsed since the initial domain registration.", + "description": "Gets the authorization code of the `Registration` for the purpose of transferring the domain to another registrar. You can call this method only after 60 days have elapsed since the initial domain registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't support authorization codes and must use the `InitiatePushTransfer` method to initiate the process to transfer the domain to a different registrar.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:retrieveAuthorizationCode", "httpMethod": "GET", "id": "domains.projects.locations.registrations.retrieveAuthorizationCode", @@ -628,6 +684,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "retrieveGoogleDomainsForwardingConfig": { + "description": "Lists the deprecated domain and email forwarding configurations you set up in the deprecated Google Domains UI. The configuration is present only for domains with the `google_domains_redirects_data_available` set to `true` in the `Registration`'s `dns_settings`. A forwarding configuration might not work correctly if required DNS records are not present in the domain's authoritative DNS Zone.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations/{registrationsId}:retrieveGoogleDomainsForwardingConfig", + "httpMethod": "GET", + "id": "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig", + "parameterOrder": [ + "registration" + ], + "parameters": { + "registration": { + "description": "Required. The name of the `Registration` whose Google Domains forwarding configuration details are being retrieved, in the format `projects/*/locations/*/registrations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/registrations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+registration}:retrieveGoogleDomainsForwardingConfig", + "response": { + "$ref": "RetrieveGoogleDomainsForwardingConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "retrieveImportableDomains": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations) Lists domain names from [Google Domains](https://domains.google/) that can be imported to Cloud Domains using the `ImportDomain` method. Since individual users can own domains in Google Domains, the list of domains returned depends on the individual user making the call. Domains already managed by Cloud Domains are not returned.", @@ -848,7 +929,7 @@ } } }, - "revision": "20240520", + "revision": "20240603", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1146,6 +1227,47 @@ }, "type": "object" }, + "DomainForwarding": { + "description": "Domain forwarding configuration.", + "id": "DomainForwarding", + "properties": { + "pathForwarding": { + "description": "If true, forwards the path after the domain name to the same path at the new address.", + "type": "boolean" + }, + "pemCertificate": { + "description": "The PEM-encoded certificate chain.", + "type": "string" + }, + "redirectType": { + "description": "The redirect type.", + "enum": [ + "REDIRECT_TYPE_UNSPECIFIED", + "TEMPORARY", + "PERMANENT" + ], + "enumDescriptions": [ + "Redirect Type is unspecified.", + "301 redirect. Allows to propagate changes to the forwarding address quickly.", + "302 redirect. Allows browsers to cache the forwarding address. This may help the address resolve more quickly. Changes may take longer to propagate" + ], + "type": "string" + }, + "sslEnabled": { + "description": "If true, the forwarding works also over HTTPS.", + "type": "boolean" + }, + "subdomain": { + "description": "The subdomain of the registered domain that is being forwarded. E.g. `www.example.com`, `example.com` (i.e. the registered domain itself) or `*.example.com` (i.e. all subdomains).", + "type": "string" + }, + "targetUri": { + "description": "The target of the domain forwarding, i.e. the path to redirect the `subdomain` to.", + "type": "string" + } + }, + "type": "object" + }, "DsRecord": { "description": "Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that must be present in the domain's DNS zone.", "id": "DsRecord", @@ -1224,6 +1346,21 @@ }, "type": "object" }, + "EmailForwarding": { + "description": "Email forwarding configuration.", + "id": "EmailForwarding", + "properties": { + "alias": { + "description": "An alias recipient email that forwards emails to the `target_email_address`. For example, `admin@example.com` or `*@example.com` (wildcard alias forwards all the emails under the registered domain).", + "type": "string" + }, + "targetEmailAddress": { + "description": "Target email that receives emails sent to the `alias`.", + "type": "string" + } + }, + "type": "object" + }, "ExportRegistrationRequest": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Request for the `ExportRegistration` method.", @@ -1336,6 +1473,17 @@ }, "type": "object" }, + "InitiatePushTransferRequest": { + "description": "Request for the `InitiatePushTransfer` method.", + "id": "InitiatePushTransferRequest", + "properties": { + "tag": { + "description": "Required. The Tag of the new registrar. Can be found at [List of registrars](https://nominet.uk/registrar-list/).", + "type": "string" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1428,6 +1576,21 @@ "description": "Defines renewal, billing, and transfer settings for a `Registration`.", "id": "ManagementSettings", "properties": { + "effectiveTransferLockState": { + "description": "Output only. The actual transfer lock state for this `Registration`.", + "enum": [ + "TRANSFER_LOCK_STATE_UNSPECIFIED", + "UNLOCKED", + "LOCKED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The domain is unlocked and can be transferred to another registrar.", + "The domain is locked and cannot be transferred to another registrar." + ], + "readOnly": true, + "type": "string" + }, "preferredRenewalMethod": { "description": "Optional. The desired renewal method for this `Registration`. The actual `renewal_method` is automatically updated to reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the actual `renewalMethod` is treated as if it were set to `AUTOMATIC_RENEWAL`. You cannot use `RENEWAL_DISABLED` during resource creation, and you can update the renewal status only when the `Registration` resource has state `ACTIVE` or `SUSPENDED`. When `preferred_renewal_method` is set to `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be set to `RENEWAL_DISABLED` in case of problems with the billing account or reported domain abuse. In such cases, check the `issues` field on the `Registration`. After the problem is resolved, the `renewal_method` is automatically updated to `preferred_renewal_method` in a few hours.", "enum": [ @@ -1474,7 +1637,7 @@ "type": "string" }, "transferLockState": { - "description": "This is the desired transfer lock state for this `Registration`. A transfer lock controls whether the domain can be transferred to another registrar.", + "description": "This is the desired transfer lock state for this `Registration`. A transfer lock controls whether the domain can be transferred to another registrar. The transfer lock state of the domain is returned in the `effective_transfer_lock_state` property. The transfer lock state values might be different for the following reasons: * `transfer_lock_state` was updated only a short time ago. * Domains with the `TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY` state are in the list of `domain_properties`. These domains are always in the `UNLOCKED` state.", "enum": [ "TRANSFER_LOCK_STATE_UNSPECIFIED", "UNLOCKED", @@ -1812,6 +1975,24 @@ "description": "Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format.", "type": "string" }, + "domainProperties": { + "description": "Output only. Special properties of the domain.", + "items": { + "enum": [ + "DOMAIN_PROPERTY_UNSPECIFIED", + "TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY", + "REQUIRE_PUSH_TRANSFER" + ], + "enumDescriptions": [ + "The property is undefined.", + "The domain does not support transfer locks due to restrictions of the registry. Such domains are effectively always unlocked and any change made to `management_settings.transfer_lock_state` is ignored.", + "The domain uses an alternative `Push Transfer` process to transfer the domain to another registrar. There are two important consequences: * Cloud Domains does not supply the authorization codes. * To initiate the process to transfer the domain to another registrar, you must provide a tag of the registrar you want to transfer to. You can do this by using the `InitiatePushTransfer` method. For more information, see [Transfer a registered domain to another registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar)." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "expireTime": { "description": "Output only. The expiration timestamp of the `Registration`.", "format": "google-datetime", @@ -1825,13 +2006,15 @@ "ISSUE_UNSPECIFIED", "CONTACT_SUPPORT", "UNVERIFIED_EMAIL", - "PROBLEM_WITH_BILLING" + "PROBLEM_WITH_BILLING", + "DNS_NOT_ACTIVATED" ], "enumDescriptions": [ "The issue is undefined.", "Contact the Cloud Support team to resolve a problem with this domain.", "[ICANN](https://icann.org/) requires verification of the email address in the `Registration`'s `contact_settings.registrant_contact` field. To verify the email address, follow the instructions in the email the `registrant_contact` receives following registration. If you do not complete email verification within 15 days of registration, the domain is suspended. To resend the verification email, call ConfigureContactSettings and provide the current `registrant_contact.email`.", - "The billing account is not in good standing. The domain is not automatically renewed at its expiration time unless you resolve problems with your billing account." + "The billing account is not in good standing. The domain is not automatically renewed at its expiration time unless you resolve problems with your billing account.", + "The registry failed to validate your DNS configuration and activate your domain. The failure might happen for the following reasons: * You recently registered the domain (wait up to 72 hours). * You provided invalid name servers or name servers that correspond to a newly created DNS zone. Verify your DNS configuration. If the configuration is incorrect, you must fix it. If the configuration is correct, either wait or call the ConfigureDnsSettings method to retry the registry validation." ], "type": "string" }, @@ -1978,12 +2161,48 @@ }, "type": "object" }, + "RenewDomainRequest": { + "description": "Request for the `RenewDomain` method.", + "id": "RenewDomainRequest", + "properties": { + "validateOnly": { + "description": "Optional. When true, only validation is performed, without actually renewing the domain. For more information, see [Request validation](https://cloud.google.com/apis/design/design_patterns#request_validation)", + "type": "boolean" + }, + "yearlyPrice": { + "$ref": "Money", + "description": "Required. Acknowledgement of the price to renew the domain for one year. To get the price, see [Cloud Domains pricing](https://cloud.google.com/domains/pricing). If not provided, the expected price is returned in the error message." + } + }, + "type": "object" + }, "ResetAuthorizationCodeRequest": { "description": "Request for the `ResetAuthorizationCode` method.", "id": "ResetAuthorizationCodeRequest", "properties": {}, "type": "object" }, + "RetrieveGoogleDomainsForwardingConfigResponse": { + "description": "Response for the `RetrieveGoogleDomainsForwardingConfig` method.", + "id": "RetrieveGoogleDomainsForwardingConfigResponse", + "properties": { + "domainForwardings": { + "description": "The list of domain forwarding configurations. A forwarding configuration might not work correctly if the required DNS records are not present in the domain's authoritative DNS zone.", + "items": { + "$ref": "DomainForwarding" + }, + "type": "array" + }, + "emailForwardings": { + "description": "The list of email forwarding configurations. A forwarding configuration might not work correctly if the required DNS records are not present in the domain's authoritative DNS zone.", + "items": { + "$ref": "EmailForwarding" + }, + "type": "array" + } + }, + "type": "object" + }, "RetrieveImportableDomainsResponse": { "deprecated": true, "description": "Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Response for the `RetrieveImportableDomains` method.", diff --git a/domains/v1beta1/domains-gen.go b/domains/v1beta1/domains-gen.go index fd6b8b748cf..31c469cac2d 100644 --- a/domains/v1beta1/domains-gen.go +++ b/domains/v1beta1/domains-gen.go @@ -690,6 +690,50 @@ func (s *Domain) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// DomainForwarding: Domain forwarding configuration. +type DomainForwarding struct { + // PathForwarding: If true, forwards the path after the domain name to the same + // path at the new address. + PathForwarding bool `json:"pathForwarding,omitempty"` + // PemCertificate: The PEM-encoded certificate chain. + PemCertificate string `json:"pemCertificate,omitempty"` + // RedirectType: The redirect type. + // + // Possible values: + // "REDIRECT_TYPE_UNSPECIFIED" - Redirect Type is unspecified. + // "TEMPORARY" - 301 redirect. Allows to propagate changes to the forwarding + // address quickly. + // "PERMANENT" - 302 redirect. Allows browsers to cache the forwarding + // address. This may help the address resolve more quickly. Changes may take + // longer to propagate + RedirectType string `json:"redirectType,omitempty"` + // SslEnabled: If true, the forwarding works also over HTTPS. + SslEnabled bool `json:"sslEnabled,omitempty"` + // Subdomain: The subdomain of the registered domain that is being forwarded. + // E.g. `www.example.com`, `example.com` (i.e. the registered domain itself) or + // `*.example.com` (i.e. all subdomains). + Subdomain string `json:"subdomain,omitempty"` + // TargetUri: The target of the domain forwarding, i.e. the path to redirect + // the `subdomain` to. + TargetUri string `json:"targetUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PathForwarding") 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. "PathForwarding") 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 *DomainForwarding) MarshalJSON() ([]byte, error) { + type NoMethod DomainForwarding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // DsRecord: Defines a Delegation Signer (DS) record, which is needed to enable // DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that // must be present in the domain's DNS zone. @@ -750,6 +794,32 @@ func (s *DsRecord) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// EmailForwarding: Email forwarding configuration. +type EmailForwarding struct { + // Alias: An alias recipient email that forwards emails to the + // `target_email_address`. For example, `admin@example.com` or `*@example.com` + // (wildcard alias forwards all the emails under the registered domain). + Alias string `json:"alias,omitempty"` + // TargetEmailAddress: Target email that receives emails sent to the `alias`. + TargetEmailAddress string `json:"targetEmailAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alias") 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. "Alias") 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 *EmailForwarding) MarshalJSON() ([]byte, error) { + type NoMethod EmailForwarding + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ExportRegistrationRequest: Deprecated: For more information, see Cloud // Domains feature deprecation // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). @@ -915,6 +985,29 @@ func (s *ImportDomainRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// InitiatePushTransferRequest: Request for the `InitiatePushTransfer` method. +type InitiatePushTransferRequest struct { + // Tag: Required. The Tag of the new registrar. Can be found at List of + // registrars (https://nominet.uk/registrar-list/). + Tag string `json:"tag,omitempty"` + // ForceSendFields is a list of field names (e.g. "Tag") 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. "Tag") 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 *InitiatePushTransferRequest) MarshalJSON() ([]byte, error) { + type NoMethod InitiatePushTransferRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for Locations.ListLocations. type ListLocationsResponse struct { // Locations: A list of locations that matches the specified filter in the @@ -1041,6 +1134,16 @@ func (s *Location) MarshalJSON() ([]byte, error) { // ManagementSettings: Defines renewal, billing, and transfer settings for a // `Registration`. type ManagementSettings struct { + // EffectiveTransferLockState: Output only. The actual transfer lock state for + // this `Registration`. + // + // Possible values: + // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. + // "UNLOCKED" - The domain is unlocked and can be transferred to another + // registrar. + // "LOCKED" - The domain is locked and cannot be transferred to another + // registrar. + EffectiveTransferLockState string `json:"effectiveTransferLockState,omitempty"` // PreferredRenewalMethod: Optional. The desired renewal method for this // `Registration`. The actual `renewal_method` is automatically updated to // reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the @@ -1084,7 +1187,12 @@ type ManagementSettings struct { RenewalMethod string `json:"renewalMethod,omitempty"` // TransferLockState: This is the desired transfer lock state for this // `Registration`. A transfer lock controls whether the domain can be - // transferred to another registrar. + // transferred to another registrar. The transfer lock state of the domain is + // returned in the `effective_transfer_lock_state` property. The transfer lock + // state values might be different for the following reasons: * + // `transfer_lock_state` was updated only a short time ago. * Domains with the + // `TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY` state are in the list of + // `domain_properties`. These domains are always in the `UNLOCKED` state. // // Possible values: // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. @@ -1093,13 +1201,13 @@ type ManagementSettings struct { // "LOCKED" - The domain is locked and cannot be transferred to another // registrar. TransferLockState string `json:"transferLockState,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreferredRenewalMethod") to - // unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "EffectiveTransferLockState") + // 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. "PreferredRenewalMethod") to + // NullFields is a list of field names (e.g. "EffectiveTransferLockState") 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. @@ -1572,6 +1680,24 @@ type Registration struct { // DomainName: Required. Immutable. The domain name. Unicode domain names must // be expressed in Punycode format. DomainName string `json:"domainName,omitempty"` + // DomainProperties: Output only. Special properties of the domain. + // + // Possible values: + // "DOMAIN_PROPERTY_UNSPECIFIED" - The property is undefined. + // "TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY" - The domain does not support + // transfer locks due to restrictions of the registry. Such domains are + // effectively always unlocked and any change made to + // `management_settings.transfer_lock_state` is ignored. + // "REQUIRE_PUSH_TRANSFER" - The domain uses an alternative `Push Transfer` + // process to transfer the domain to another registrar. There are two important + // consequences: * Cloud Domains does not supply the authorization codes. * To + // initiate the process to transfer the domain to another registrar, you must + // provide a tag of the registrar you want to transfer to. You can do this by + // using the `InitiatePushTransfer` method. For more information, see [Transfer + // a registered domain to another + // registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-r + // egistrar). + DomainProperties []string `json:"domainProperties,omitempty"` // ExpireTime: Output only. The expiration timestamp of the `Registration`. ExpireTime string `json:"expireTime,omitempty"` // Issues: Output only. The set of issues with the `Registration` that require @@ -1592,6 +1718,14 @@ type Registration struct { // "PROBLEM_WITH_BILLING" - The billing account is not in good standing. The // domain is not automatically renewed at its expiration time unless you // resolve problems with your billing account. + // "DNS_NOT_ACTIVATED" - The registry failed to validate your DNS + // configuration and activate your domain. The failure might happen for the + // following reasons: * You recently registered the domain (wait up to 72 + // hours). * You provided invalid name servers or name servers that correspond + // to a newly created DNS zone. Verify your DNS configuration. If the + // configuration is incorrect, you must fix it. If the configuration is + // correct, either wait or call the ConfigureDnsSettings method to retry the + // registry validation. Issues []string `json:"issues,omitempty"` // Labels: Set of labels associated with the `Registration`. Labels map[string]string `json:"labels,omitempty"` @@ -1720,11 +1854,72 @@ func (s *Registration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// RenewDomainRequest: Request for the `RenewDomain` method. +type RenewDomainRequest struct { + // ValidateOnly: Optional. When true, only validation is performed, without + // actually renewing the domain. For more information, see Request validation + // (https://cloud.google.com/apis/design/design_patterns#request_validation) + ValidateOnly bool `json:"validateOnly,omitempty"` + // YearlyPrice: Required. Acknowledgement of the price to renew the domain for + // one year. To get the price, see Cloud Domains pricing + // (https://cloud.google.com/domains/pricing). If not provided, the expected + // price is returned in the error message. + YearlyPrice *Money `json:"yearlyPrice,omitempty"` + // ForceSendFields is a list of field names (e.g. "ValidateOnly") 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. "ValidateOnly") 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 *RenewDomainRequest) MarshalJSON() ([]byte, error) { + type NoMethod RenewDomainRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ResetAuthorizationCodeRequest: Request for the `ResetAuthorizationCode` // method. type ResetAuthorizationCodeRequest struct { } +// RetrieveGoogleDomainsForwardingConfigResponse: Response for the +// `RetrieveGoogleDomainsForwardingConfig` method. +type RetrieveGoogleDomainsForwardingConfigResponse struct { + // DomainForwardings: The list of domain forwarding configurations. A + // forwarding configuration might not work correctly if the required DNS + // records are not present in the domain's authoritative DNS zone. + DomainForwardings []*DomainForwarding `json:"domainForwardings,omitempty"` + // EmailForwardings: The list of email forwarding configurations. A forwarding + // configuration might not work correctly if the required DNS records are not + // present in the domain's authoritative DNS zone. + EmailForwardings []*EmailForwarding `json:"emailForwardings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DomainForwardings") 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. "DomainForwardings") 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 *RetrieveGoogleDomainsForwardingConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod RetrieveGoogleDomainsForwardingConfigResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // RetrieveImportableDomainsResponse: Deprecated: For more information, see // Cloud Domains feature deprecation // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). @@ -3472,6 +3667,117 @@ func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOpti return ret, nil } +type ProjectsLocationsRegistrationsInitiatePushTransferCall struct { + s *Service + registration string + initiatepushtransferrequest *InitiatePushTransferRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InitiatePushTransfer: Initiates the `Push Transfer` process to transfer the +// domain to another registrar. The process might complete instantly or might +// require confirmation or additional work. Check the emails sent to the email +// address of the registrant. The process is aborted after a timeout if it's +// not completed. This method is only supported for domains that have the +// `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties`. The +// domain must also be unlocked before it can be transferred to a different +// registrar. For more information, see Transfer a registered domain to another +// registrar +// (https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar). +// +// - registration: The name of the `Registration` for which the push transfer +// is initiated, in the format `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) InitiatePushTransfer(registration string, initiatepushtransferrequest *InitiatePushTransferRequest) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + c := &ProjectsLocationsRegistrationsInitiatePushTransferCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + c.initiatepushtransferrequest = initiatepushtransferrequest + 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsInitiatePushTransferCall { + 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.initiatepushtransferrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+registration}:initiatePushTransfer") + 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{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.initiatePushTransfer" 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 *ProjectsLocationsRegistrationsInitiatePushTransferCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsListCall struct { s *Service parent string @@ -3858,6 +4164,111 @@ func (c *ProjectsLocationsRegistrationsRegisterCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsRegistrationsRenewDomainCall struct { + s *Service + registration string + renewdomainrequest *RenewDomainRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RenewDomain: Renews a recently expired domain. This method can only be +// called on domains that expired in the previous 30 days. After the renewal, +// the new expiration time of the domain is one year after the old expiration +// time and you are charged a `yearly_price` for the renewal. +// +// - registration: The name of the `Registration` whish is being renewed, in +// the format `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) RenewDomain(registration string, renewdomainrequest *RenewDomainRequest) *ProjectsLocationsRegistrationsRenewDomainCall { + c := &ProjectsLocationsRegistrationsRenewDomainCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + c.renewdomainrequest = renewdomainrequest + 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 *ProjectsLocationsRegistrationsRenewDomainCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRenewDomainCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsRenewDomainCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRenewDomainCall { + 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 *ProjectsLocationsRegistrationsRenewDomainCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRenewDomainCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renewdomainrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+registration}:renewDomain") + 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{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.renewDomain" 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 *ProjectsLocationsRegistrationsRenewDomainCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct { s *Service registration string @@ -3869,7 +4280,10 @@ type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct { // ResetAuthorizationCode: Resets the authorization code of the `Registration` // to a new random string. You can call this method only after 60 days have -// elapsed since the initial domain registration. +// elapsed since the initial domain registration. Domains that have the +// `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't +// support authorization codes and must use the `InitiatePushTransfer` method +// to initiate the process to transfer the domain to a different registrar. // // - registration: The name of the `Registration` whose authorization code is // being reset, in the format `projects/*/locations/*/registrations/*`. @@ -3975,7 +4389,10 @@ type ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall struct { // RetrieveAuthorizationCode: Gets the authorization code of the `Registration` // for the purpose of transferring the domain to another registrar. You can // call this method only after 60 days have elapsed since the initial domain -// registration. +// registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the +// list of `domain_properties` don't support authorization codes and must use +// the `InitiatePushTransfer` method to initiate the process to transfer the +// domain to a different registrar. // // - registration: The name of the `Registration` whose authorization code is // being retrieved, in the format `projects/*/locations/*/registrations/*`. @@ -4075,6 +4492,122 @@ func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts .. return ret, nil } +type ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall struct { + s *Service + registration string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// RetrieveGoogleDomainsForwardingConfig: Lists the deprecated domain and email +// forwarding configurations you set up in the deprecated Google Domains UI. +// The configuration is present only for domains with the +// `google_domains_redirects_data_available` set to `true` in the +// `Registration`'s `dns_settings`. A forwarding configuration might not work +// correctly if required DNS records are not present in the domain's +// authoritative DNS Zone. +// +// - registration: The name of the `Registration` whose Google Domains +// forwarding configuration details are being retrieved, in the format +// `projects/*/locations/*/registrations/*`. +func (r *ProjectsLocationsRegistrationsService) RetrieveGoogleDomainsForwardingConfig(registration string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + c := &ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall { + 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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+registration}:retrieveGoogleDomainsForwardingConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "registration": c.registration, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *RetrieveGoogleDomainsForwardingConfigResponse.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 *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Do(opts ...googleapi.CallOption) (*RetrieveGoogleDomainsForwardingConfigResponse, 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 := &RetrieveGoogleDomainsForwardingConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct { s *Service location string diff --git a/fcmdata/v1beta1/fcmdata-api.json b/fcmdata/v1beta1/fcmdata-api.json index cdeb950e548..585e23dbf5e 100644 --- a/fcmdata/v1beta1/fcmdata-api.json +++ b/fcmdata/v1beta1/fcmdata-api.json @@ -154,7 +154,7 @@ } } }, - "revision": "20240602", + "revision": "20240611", "rootUrl": "https://fcmdata.googleapis.com/", "schemas": { "GoogleFirebaseFcmDataV1beta1AndroidDeliveryData": { @@ -318,7 +318,7 @@ "type": "object" }, "GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents": { - "description": "Additional information about proxy notification delivery. All percentages are calculated with countNotificationsAccepted as the denominator.", + "description": "Additional information about [proxy notification](https://firebase.google.com/docs/cloud-messaging/android/message-priority#proxy) delivery. All percentages are calculated with countNotificationsAccepted as the denominator.", "id": "GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents", "properties": { "failed": { diff --git a/fcmdata/v1beta1/fcmdata-gen.go b/fcmdata/v1beta1/fcmdata-gen.go index 1d0fad6ce4b..74415e38f13 100644 --- a/fcmdata/v1beta1/fcmdata-gen.go +++ b/fcmdata/v1beta1/fcmdata-gen.go @@ -487,8 +487,10 @@ func (s *GoogleFirebaseFcmDataV1beta1MessageOutcomePercents) UnmarshalJSON(data } // GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents: Additional -// information about proxy notification delivery. All percentages are -// calculated with countNotificationsAccepted as the denominator. +// information about proxy notification +// (https://firebase.google.com/docs/cloud-messaging/android/message-priority#proxy) +// delivery. All percentages are calculated with countNotificationsAccepted as +// the denominator. type GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents struct { // Failed: The percentage of accepted notifications that failed to be proxied. // This is usually caused by exceptions that occurred while calling diff --git a/firebaseappdistribution/v1/firebaseappdistribution-api.json b/firebaseappdistribution/v1/firebaseappdistribution-api.json index 65e2becfcf8..d3dd2406270 100644 --- a/firebaseappdistribution/v1/firebaseappdistribution-api.json +++ b/firebaseappdistribution/v1/firebaseappdistribution-api.json @@ -941,7 +941,7 @@ } } }, - "revision": "20230808", + "revision": "20240612", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "GdataBlobstore2Info": { @@ -1259,7 +1259,7 @@ }, "hash": { "deprecated": true, - "description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/uploader/service/proto/upload_listener.proto\u0026q=class:Hash Hex encoded hash value of the uploaded media.", + "description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto\u0026q=class:Hash Hex encoded hash value of the uploaded media.", "type": "string" }, "hashVerified": { diff --git a/firebaseappdistribution/v1/firebaseappdistribution-gen.go b/firebaseappdistribution/v1/firebaseappdistribution-gen.go index 34348bd2215..80f473cd1f0 100644 --- a/firebaseappdistribution/v1/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1/firebaseappdistribution-gen.go @@ -623,7 +623,7 @@ type GdataMedia struct { // Hash: Deprecated, use one of explicit hash type fields instead. These two // hash related fields will only be populated on Scotty based media uploads and // will contain the content of the hash group in the NotificationRequest: - // http://cs/#google3/uploader/service/proto/upload_listener.proto&q=class:Hash + // http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash // Hex encoded hash value of the uploaded media. Hash string `json:"hash,omitempty"` // HashVerified: For Scotty uploads only. If a user sends a hash code and the diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index ed8ac4c0c58..86ff2dd8ea2 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -132,10 +132,10 @@ }, "path": "v2beta/{+endpoint}:countTokens", "request": { - "$ref": "CountTokensRequest" + "$ref": "GoogleCloudAiplatformV1beta1CountTokensRequest" }, "response": { - "$ref": "CountTokensResponse" + "$ref": "GoogleCloudAiplatformV1beta1CountTokensResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -160,10 +160,10 @@ }, "path": "v2beta/{+model}:generateContent", "request": { - "$ref": "GenerateContentRequest" + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" }, "response": { - "$ref": "GenerateContentResponse" + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -188,10 +188,10 @@ }, "path": "v2beta/{+model}:streamGenerateContent", "request": { - "$ref": "GenerateContentRequest" + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" }, "response": { - "$ref": "GenerateContentResponse" + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -206,12 +206,34 @@ } } }, - "revision": "20240603", + "revision": "20240611", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { - "Blob": { + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1Blob": { "description": "Content blob. It's preferred to send as text directly rather than raw bytes.", - "id": "Blob", + "id": "GoogleCloudAiplatformV1beta1Blob", "properties": { "data": { "description": "Required. Raw bytes.", @@ -225,17 +247,17 @@ }, "type": "object" }, - "Candidate": { + "GoogleCloudAiplatformV1beta1Candidate": { "description": "A response candidate generated from the model.", - "id": "Candidate", + "id": "GoogleCloudAiplatformV1beta1Candidate", "properties": { "citationMetadata": { - "$ref": "CitationMetadata", + "$ref": "GoogleCloudAiplatformV1beta1CitationMetadata", "description": "Output only. Source attribution of the generated content.", "readOnly": true }, "content": { - "$ref": "Content", + "$ref": "GoogleCloudAiplatformV1beta1Content", "description": "Output only. Content parts of the candidate.", "readOnly": true }, @@ -274,7 +296,7 @@ "type": "string" }, "groundingMetadata": { - "$ref": "GroundingMetadata", + "$ref": "GoogleCloudAiplatformV1beta1GroundingMetadata", "description": "Output only. Metadata specifies sources used to ground generated content.", "readOnly": true }, @@ -287,7 +309,7 @@ "safetyRatings": { "description": "Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.", "items": { - "$ref": "SafetyRating" + "$ref": "GoogleCloudAiplatformV1beta1SafetyRating" }, "readOnly": true, "type": "array" @@ -295,9 +317,9 @@ }, "type": "object" }, - "Citation": { + "GoogleCloudAiplatformV1beta1Citation": { "description": "Source attributions for content.", - "id": "Citation", + "id": "GoogleCloudAiplatformV1beta1Citation", "properties": { "endIndex": { "description": "Output only. End index into the content.", @@ -334,14 +356,14 @@ }, "type": "object" }, - "CitationMetadata": { + "GoogleCloudAiplatformV1beta1CitationMetadata": { "description": "A collection of source attributions for a piece of content.", - "id": "CitationMetadata", + "id": "GoogleCloudAiplatformV1beta1CitationMetadata", "properties": { "citations": { "description": "Output only. List of citations.", "items": { - "$ref": "Citation" + "$ref": "GoogleCloudAiplatformV1beta1Citation" }, "readOnly": true, "type": "array" @@ -349,14 +371,14 @@ }, "type": "object" }, - "Content": { + "GoogleCloudAiplatformV1beta1Content": { "description": "The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.", - "id": "Content", + "id": "GoogleCloudAiplatformV1beta1Content", "properties": { "parts": { "description": "Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types.", "items": { - "$ref": "Part" + "$ref": "GoogleCloudAiplatformV1beta1Part" }, "type": "array" }, @@ -367,14 +389,14 @@ }, "type": "object" }, - "CountTokensRequest": { + "GoogleCloudAiplatformV1beta1CountTokensRequest": { "description": "Request message for PredictionService.CountTokens.", - "id": "CountTokensRequest", + "id": "GoogleCloudAiplatformV1beta1CountTokensRequest", "properties": { "contents": { "description": "Required. Input content.", "items": { - "$ref": "Content" + "$ref": "GoogleCloudAiplatformV1beta1Content" }, "type": "array" }, @@ -392,9 +414,9 @@ }, "type": "object" }, - "CountTokensResponse": { + "GoogleCloudAiplatformV1beta1CountTokensResponse": { "description": "Response message for PredictionService.CountTokens.", - "id": "CountTokensResponse", + "id": "GoogleCloudAiplatformV1beta1CountTokensResponse", "properties": { "totalBillableCharacters": { "description": "The total number of billable characters counted across all instances from the request.", @@ -409,31 +431,9 @@ }, "type": "object" }, - "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", - "id": "Date", - "properties": { - "day": { - "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", - "format": "int32", - "type": "integer" - }, - "year": { - "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "FileData": { + "GoogleCloudAiplatformV1beta1FileData": { "description": "URI based data.", - "id": "FileData", + "id": "GoogleCloudAiplatformV1beta1FileData", "properties": { "fileUri": { "description": "Required. URI.", @@ -446,9 +446,9 @@ }, "type": "object" }, - "FunctionCall": { + "GoogleCloudAiplatformV1beta1FunctionCall": { "description": "A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.", - "id": "FunctionCall", + "id": "GoogleCloudAiplatformV1beta1FunctionCall", "properties": { "args": { "additionalProperties": { @@ -465,9 +465,9 @@ }, "type": "object" }, - "FunctionCallingConfig": { + "GoogleCloudAiplatformV1beta1FunctionCallingConfig": { "description": "Function calling config.", - "id": "FunctionCallingConfig", + "id": "GoogleCloudAiplatformV1beta1FunctionCallingConfig", "properties": { "allowedFunctionNames": { "description": "Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided.", @@ -495,9 +495,9 @@ }, "type": "object" }, - "FunctionDeclaration": { + "GoogleCloudAiplatformV1beta1FunctionDeclaration": { "description": "Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.", - "id": "FunctionDeclaration", + "id": "GoogleCloudAiplatformV1beta1FunctionDeclaration", "properties": { "description": { "description": "Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.", @@ -508,19 +508,19 @@ "type": "string" }, "parameters": { - "$ref": "Schema", + "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1" }, "response": { - "$ref": "Schema", + "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function." } }, "type": "object" }, - "FunctionResponse": { + "GoogleCloudAiplatformV1beta1FunctionResponse": { "description": "The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.", - "id": "FunctionResponse", + "id": "GoogleCloudAiplatformV1beta1FunctionResponse", "properties": { "name": { "description": "Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].", @@ -537,9 +537,9 @@ }, "type": "object" }, - "GenerateContentRequest": { + "GoogleCloudAiplatformV1beta1GenerateContentRequest": { "description": "Request message for [PredictionService.GenerateContent].", - "id": "GenerateContentRequest", + "id": "GoogleCloudAiplatformV1beta1GenerateContentRequest", "properties": { "cachedContent": { "description": "Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project}/locations/{location}/cachedContents/{cachedContent}`", @@ -548,66 +548,126 @@ "contents": { "description": "Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.", "items": { - "$ref": "Content" + "$ref": "GoogleCloudAiplatformV1beta1Content" }, "type": "array" }, "generationConfig": { - "$ref": "GenerationConfig", + "$ref": "GoogleCloudAiplatformV1beta1GenerationConfig", "description": "Optional. Generation config." }, "safetySettings": { "description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", "items": { - "$ref": "SafetySetting" + "$ref": "GoogleCloudAiplatformV1beta1SafetySetting" }, "type": "array" }, "systemInstruction": { - "$ref": "Content", + "$ref": "GoogleCloudAiplatformV1beta1Content", "description": "Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph." }, "toolConfig": { - "$ref": "ToolConfig", + "$ref": "GoogleCloudAiplatformV1beta1ToolConfig", "description": "Optional. Tool config. This config is shared for all tools provided in the request." }, "tools": { "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", "items": { - "$ref": "Tool" + "$ref": "GoogleCloudAiplatformV1beta1Tool" }, "type": "array" } }, "type": "object" }, - "GenerateContentResponse": { + "GoogleCloudAiplatformV1beta1GenerateContentResponse": { "description": "Response message for [PredictionService.GenerateContent].", - "id": "GenerateContentResponse", + "id": "GoogleCloudAiplatformV1beta1GenerateContentResponse", "properties": { "candidates": { "description": "Output only. Generated candidates.", "items": { - "$ref": "Candidate" + "$ref": "GoogleCloudAiplatformV1beta1Candidate" }, "readOnly": true, "type": "array" }, "promptFeedback": { - "$ref": "PromptFeedback", + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback", "description": "Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.", "readOnly": true }, "usageMetadata": { - "$ref": "UsageMetadata", + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata", "description": "Usage metadata about the response(s)." } }, "type": "object" }, - "GenerationConfig": { + "GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback": { + "description": "Content filter results for a prompt sent in the request.", + "id": "GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback", + "properties": { + "blockReason": { + "description": "Output only. Blocked reason.", + "enum": [ + "BLOCKED_REASON_UNSPECIFIED", + "SAFETY", + "OTHER", + "BLOCKLIST", + "PROHIBITED_CONTENT" + ], + "enumDescriptions": [ + "Unspecified blocked reason.", + "Candidates blocked due to safety.", + "Candidates blocked due to other reason.", + "Candidates blocked due to the terms which are included from the terminology blocklist.", + "Candidates blocked due to prohibited content." + ], + "readOnly": true, + "type": "string" + }, + "blockReasonMessage": { + "description": "Output only. A readable block reason message.", + "readOnly": true, + "type": "string" + }, + "safetyRatings": { + "description": "Output only. Safety ratings.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SafetyRating" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata": { + "description": "Usage metadata about response(s).", + "id": "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata", + "properties": { + "candidatesTokenCount": { + "description": "Number of tokens in the response(s).", + "format": "int32", + "type": "integer" + }, + "promptTokenCount": { + "description": "Number of tokens in the request.", + "format": "int32", + "type": "integer" + }, + "totalTokenCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GenerationConfig": { "description": "Generation config.", - "id": "GenerationConfig", + "id": "GoogleCloudAiplatformV1beta1GenerationConfig", "properties": { "candidateCount": { "description": "Optional. Number of candidates to generate.", @@ -634,7 +694,7 @@ "type": "string" }, "responseSchema": { - "$ref": "Schema", + "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." }, "stopSequences": { @@ -662,15 +722,15 @@ }, "type": "object" }, - "GoogleSearchRetrieval": { + "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval": { "description": "Tool to retrieve public web data for grounding, powered by Google.", - "id": "GoogleSearchRetrieval", + "id": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", "properties": {}, "type": "object" }, - "GroundingMetadata": { + "GoogleCloudAiplatformV1beta1GroundingMetadata": { "description": "Metadata returned to client when grounding is enabled.", - "id": "GroundingMetadata", + "id": "GoogleCloudAiplatformV1beta1GroundingMetadata", "properties": { "retrievalQueries": { "description": "Optional. Queries executed by the retrieval tools.", @@ -680,7 +740,7 @@ "type": "array" }, "searchEntryPoint": { - "$ref": "SearchEntryPoint", + "$ref": "GoogleCloudAiplatformV1beta1SearchEntryPoint", "description": "Optional. Google search entry for the following-up web searches." }, "webSearchQueries": { @@ -693,48 +753,24 @@ }, "type": "object" }, - "ModelOperationMetadata": { - "description": "This is returned in the longrunning operations for create/update.", - "id": "ModelOperationMetadata", - "properties": { - "basicOperationStatus": { - "enum": [ - "BASIC_OPERATION_STATUS_UNSPECIFIED", - "BASIC_OPERATION_STATUS_UPLOADING", - "BASIC_OPERATION_STATUS_VERIFYING" - ], - "enumDescriptions": [ - "The status is unspecified", - "The model file is being uploaded", - "The model file is being verified" - ], - "type": "string" - }, - "name": { - "description": "The name of the model we are creating/updating The name must have the form `projects/{project_id}/models/{model_id}`", - "type": "string" - } - }, - "type": "object" - }, - "Part": { + "GoogleCloudAiplatformV1beta1Part": { "description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.", - "id": "Part", + "id": "GoogleCloudAiplatformV1beta1Part", "properties": { "fileData": { - "$ref": "FileData", + "$ref": "GoogleCloudAiplatformV1beta1FileData", "description": "Optional. URI based data." }, "functionCall": { - "$ref": "FunctionCall", + "$ref": "GoogleCloudAiplatformV1beta1FunctionCall", "description": "Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values." }, "functionResponse": { - "$ref": "FunctionResponse", + "$ref": "GoogleCloudAiplatformV1beta1FunctionResponse", "description": "Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model." }, "inlineData": { - "$ref": "Blob", + "$ref": "GoogleCloudAiplatformV1beta1Blob", "description": "Optional. Inlined bytes data." }, "text": { @@ -742,91 +778,34 @@ "type": "string" }, "videoMetadata": { - "$ref": "VideoMetadata", + "$ref": "GoogleCloudAiplatformV1beta1VideoMetadata", "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data." } }, "type": "object" }, - "PromptFeedback": { - "description": "Content filter results for a prompt sent in the request.", - "id": "PromptFeedback", - "properties": { - "blockReason": { - "description": "Output only. Blocked reason.", - "enum": [ - "BLOCKED_REASON_UNSPECIFIED", - "SAFETY", - "OTHER", - "BLOCKLIST", - "PROHIBITED_CONTENT" - ], - "enumDescriptions": [ - "Unspecified blocked reason.", - "Candidates blocked due to safety.", - "Candidates blocked due to other reason.", - "Candidates blocked due to the terms which are included from the terminology blocklist.", - "Candidates blocked due to prohibited content." - ], - "readOnly": true, - "type": "string" - }, - "blockReasonMessage": { - "description": "Output only. A readable block reason message.", - "readOnly": true, - "type": "string" - }, - "safetyRatings": { - "description": "Output only. Safety ratings.", - "items": { - "$ref": "SafetyRating" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "RagResource": { - "description": "The definition of the Rag resource.", - "id": "RagResource", - "properties": { - "ragCorpus": { - "description": "Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - "type": "string" - }, - "ragFileIds": { - "description": "Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Retrieval": { + "GoogleCloudAiplatformV1beta1Retrieval": { "description": "Defines a retrieval tool that model can call to access external knowledge.", - "id": "Retrieval", + "id": "GoogleCloudAiplatformV1beta1Retrieval", "properties": { "disableAttribution": { "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", "type": "boolean" }, "vertexAiSearch": { - "$ref": "VertexAISearch", + "$ref": "GoogleCloudAiplatformV1beta1VertexAISearch", "description": "Set to use data source powered by Vertex AI Search." }, "vertexRagStore": { - "$ref": "VertexRagStore", + "$ref": "GoogleCloudAiplatformV1beta1VertexRagStore", "description": "Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService." } }, "type": "object" }, - "SafetyRating": { + "GoogleCloudAiplatformV1beta1SafetyRating": { "description": "Safety rating corresponding to the generated content.", - "id": "SafetyRating", + "id": "GoogleCloudAiplatformV1beta1SafetyRating", "properties": { "blocked": { "description": "Output only. Indicates whether the content was filtered out because of this rating.", @@ -905,9 +884,9 @@ }, "type": "object" }, - "SafetySetting": { + "GoogleCloudAiplatformV1beta1SafetySetting": { "description": "Safety settings.", - "id": "SafetySetting", + "id": "GoogleCloudAiplatformV1beta1SafetySetting", "properties": { "category": { "description": "Required. Harm category.", @@ -962,9 +941,9 @@ }, "type": "object" }, - "Schema": { + "GoogleCloudAiplatformV1beta1Schema": { "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed.", - "id": "Schema", + "id": "GoogleCloudAiplatformV1beta1Schema", "properties": { "default": { "description": "Optional. Default value of the data.", @@ -990,7 +969,7 @@ "type": "string" }, "items": { - "$ref": "Schema", + "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY." }, "maxItems": { @@ -1043,7 +1022,7 @@ }, "properties": { "additionalProperties": { - "$ref": "Schema" + "$ref": "GoogleCloudAiplatformV1beta1Schema" }, "description": "Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.", "type": "object" @@ -1084,9 +1063,9 @@ }, "type": "object" }, - "SearchEntryPoint": { + "GoogleCloudAiplatformV1beta1SearchEntryPoint": { "description": "Google search entry point.", - "id": "SearchEntryPoint", + "id": "GoogleCloudAiplatformV1beta1SearchEntryPoint", "properties": { "renderedContent": { "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.", @@ -1100,63 +1079,42 @@ }, "type": "object" }, - "Tool": { + "GoogleCloudAiplatformV1beta1Tool": { "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).", - "id": "Tool", + "id": "GoogleCloudAiplatformV1beta1Tool", "properties": { "functionDeclarations": { "description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 64 function declarations can be provided.", "items": { - "$ref": "FunctionDeclaration" + "$ref": "GoogleCloudAiplatformV1beta1FunctionDeclaration" }, "type": "array" }, "googleSearchRetrieval": { - "$ref": "GoogleSearchRetrieval", + "$ref": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." }, "retrieval": { - "$ref": "Retrieval", + "$ref": "GoogleCloudAiplatformV1beta1Retrieval", "description": "Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation." } }, "type": "object" }, - "ToolConfig": { + "GoogleCloudAiplatformV1beta1ToolConfig": { "description": "Tool config. This config is shared for all tools provided in the request.", - "id": "ToolConfig", + "id": "GoogleCloudAiplatformV1beta1ToolConfig", "properties": { "functionCallingConfig": { - "$ref": "FunctionCallingConfig", + "$ref": "GoogleCloudAiplatformV1beta1FunctionCallingConfig", "description": "Optional. Function calling config." } }, "type": "object" }, - "UsageMetadata": { - "description": "Usage metadata about response(s).", - "id": "UsageMetadata", - "properties": { - "candidatesTokenCount": { - "description": "Number of tokens in the response(s).", - "format": "int32", - "type": "integer" - }, - "promptTokenCount": { - "description": "Number of tokens in the request.", - "format": "int32", - "type": "integer" - }, - "totalTokenCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "VertexAISearch": { + "GoogleCloudAiplatformV1beta1VertexAISearch": { "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", - "id": "VertexAISearch", + "id": "GoogleCloudAiplatformV1beta1VertexAISearch", "properties": { "datastore": { "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", @@ -1165,9 +1123,9 @@ }, "type": "object" }, - "VertexRagStore": { + "GoogleCloudAiplatformV1beta1VertexRagStore": { "description": "Retrieve from Vertex RAG Store for grounding.", - "id": "VertexRagStore", + "id": "GoogleCloudAiplatformV1beta1VertexRagStore", "properties": { "ragCorpora": { "deprecated": true, @@ -1180,7 +1138,7 @@ "ragResources": { "description": "Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.", "items": { - "$ref": "RagResource" + "$ref": "GoogleCloudAiplatformV1beta1VertexRagStoreRagResource" }, "type": "array" }, @@ -1197,9 +1155,27 @@ }, "type": "object" }, - "VideoMetadata": { + "GoogleCloudAiplatformV1beta1VertexRagStoreRagResource": { + "description": "The definition of the Rag resource.", + "id": "GoogleCloudAiplatformV1beta1VertexRagStoreRagResource", + "properties": { + "ragCorpus": { + "description": "Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", + "type": "string" + }, + "ragFileIds": { + "description": "Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1VideoMetadata": { "description": "Metadata describes the input video content.", - "id": "VideoMetadata", + "id": "GoogleCloudAiplatformV1beta1VideoMetadata", "properties": { "endOffset": { "description": "Optional. The end offset of the video.", @@ -1213,6 +1189,30 @@ } }, "type": "object" + }, + "ModelOperationMetadata": { + "description": "This is returned in the longrunning operations for create/update.", + "id": "ModelOperationMetadata", + "properties": { + "basicOperationStatus": { + "enum": [ + "BASIC_OPERATION_STATUS_UNSPECIFIED", + "BASIC_OPERATION_STATUS_UPLOADING", + "BASIC_OPERATION_STATUS_VERIFYING" + ], + "enumDescriptions": [ + "The status is unspecified", + "The model file is being uploaded", + "The model file is being verified" + ], + "type": "string" + }, + "name": { + "description": "The name of the model we are creating/updating The name must have the form `projects/{project_id}/models/{model_id}`", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index 480d3ca3f00..e15d1fffc3c 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -199,9 +199,47 @@ type ProjectsLocationsPublishersModelsService struct { s *Service } -// Blob: Content blob. It's preferred to send as text directly rather than raw -// bytes. -type Blob struct { +// Date: Represents a whole or partial calendar date, such as a birthday. The +// time of day and time zone are either specified elsewhere or are +// insignificant. The date is relative to the Gregorian Calendar. This can +// represent one of the following: * A full date, with non-zero year, month, +// and day values. * A month and day, with a zero year (for example, an +// anniversary). * A year on its own, with a zero month and a zero day. * A +// year and month, with a zero day (for example, a credit card expiration +// date). Related types: * google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type Date struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, + // or 0 to specify a year by itself or a year and month where the day isn't + // significant. + Day int64 `json:"day,omitempty"` + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without + // a month and day. + Month int64 `json:"month,omitempty"` + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date + // without a year. + Year int64 `json:"year,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. 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. "Day") 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 *Date) MarshalJSON() ([]byte, error) { + type NoMethod Date + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1Blob: Content blob. It's preferred to send as +// text directly rather than raw bytes. +type GoogleCloudAiplatformV1beta1Blob struct { // Data: Required. Raw bytes. Data string `json:"data,omitempty"` // MimeType: Required. The IANA standard MIME type of the source data. @@ -219,17 +257,18 @@ type Blob struct { NullFields []string `json:"-"` } -func (s *Blob) MarshalJSON() ([]byte, error) { - type NoMethod Blob +func (s *GoogleCloudAiplatformV1beta1Blob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Blob return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Candidate: A response candidate generated from the model. -type Candidate struct { +// GoogleCloudAiplatformV1beta1Candidate: A response candidate generated from +// the model. +type GoogleCloudAiplatformV1beta1Candidate struct { // CitationMetadata: Output only. Source attribution of the generated content. - CitationMetadata *CitationMetadata `json:"citationMetadata,omitempty"` + CitationMetadata *GoogleCloudAiplatformV1beta1CitationMetadata `json:"citationMetadata,omitempty"` // Content: Output only. Content parts of the candidate. - Content *Content `json:"content,omitempty"` + Content *GoogleCloudAiplatformV1beta1Content `json:"content,omitempty"` // FinishMessage: Output only. Describes the reason the mode stopped generating // tokens in more detail. This is only filled when `finish_reason` is set. FinishMessage string `json:"finishMessage,omitempty"` @@ -258,12 +297,12 @@ type Candidate struct { FinishReason string `json:"finishReason,omitempty"` // GroundingMetadata: Output only. Metadata specifies sources used to ground // generated content. - GroundingMetadata *GroundingMetadata `json:"groundingMetadata,omitempty"` + GroundingMetadata *GoogleCloudAiplatformV1beta1GroundingMetadata `json:"groundingMetadata,omitempty"` // Index: Output only. Index of the candidate. Index int64 `json:"index,omitempty"` // SafetyRatings: Output only. List of ratings for the safety of a response // candidate. There is at most one rating per category. - SafetyRatings []*SafetyRating `json:"safetyRatings,omitempty"` + SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` // ForceSendFields is a list of field names (e.g. "CitationMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -277,13 +316,13 @@ type Candidate struct { NullFields []string `json:"-"` } -func (s *Candidate) MarshalJSON() ([]byte, error) { - type NoMethod Candidate +func (s *GoogleCloudAiplatformV1beta1Candidate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Candidate return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Citation: Source attributions for content. -type Citation struct { +// GoogleCloudAiplatformV1beta1Citation: Source attributions for content. +type GoogleCloudAiplatformV1beta1Citation struct { // EndIndex: Output only. End index into the content. EndIndex int64 `json:"endIndex,omitempty"` // License: Output only. License of the attribution. @@ -309,16 +348,16 @@ type Citation struct { NullFields []string `json:"-"` } -func (s *Citation) MarshalJSON() ([]byte, error) { - type NoMethod Citation +func (s *GoogleCloudAiplatformV1beta1Citation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Citation return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// CitationMetadata: A collection of source attributions for a piece of -// content. -type CitationMetadata struct { +// GoogleCloudAiplatformV1beta1CitationMetadata: A collection of source +// attributions for a piece of content. +type GoogleCloudAiplatformV1beta1CitationMetadata struct { // Citations: Output only. List of citations. - Citations []*Citation `json:"citations,omitempty"` + Citations []*GoogleCloudAiplatformV1beta1Citation `json:"citations,omitempty"` // ForceSendFields is a list of field names (e.g. "Citations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -332,19 +371,19 @@ type CitationMetadata struct { NullFields []string `json:"-"` } -func (s *CitationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod CitationMetadata +func (s *GoogleCloudAiplatformV1beta1CitationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CitationMetadata return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Content: The base structured datatype containing multi-part content of a -// message. A `Content` includes a `role` field designating the producer of the -// `Content` and a `parts` field containing multi-part data that contains the -// content of the message turn. -type Content struct { +// GoogleCloudAiplatformV1beta1Content: The base structured datatype containing +// multi-part content of a message. A `Content` includes a `role` field +// designating the producer of the `Content` and a `parts` field containing +// multi-part data that contains the content of the message turn. +type GoogleCloudAiplatformV1beta1Content struct { // Parts: Required. Ordered `Parts` that constitute a single message. Parts may // have different IANA MIME types. - Parts []*Part `json:"parts,omitempty"` + Parts []*GoogleCloudAiplatformV1beta1Part `json:"parts,omitempty"` // Role: Optional. The producer of the content. Must be either 'user' or // 'model'. Useful to set for multi-turn conversations, otherwise can be left // blank or unset. @@ -362,15 +401,16 @@ type Content struct { NullFields []string `json:"-"` } -func (s *Content) MarshalJSON() ([]byte, error) { - type NoMethod Content +func (s *GoogleCloudAiplatformV1beta1Content) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Content return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// CountTokensRequest: Request message for PredictionService.CountTokens. -type CountTokensRequest struct { +// GoogleCloudAiplatformV1beta1CountTokensRequest: Request message for +// PredictionService.CountTokens. +type GoogleCloudAiplatformV1beta1CountTokensRequest struct { // Contents: Required. Input content. - Contents []*Content `json:"contents,omitempty"` + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` // Instances: Required. The instances that are the input to token counting // call. Schema is identical to the prediction schema of the underlying model. Instances []interface{} `json:"instances,omitempty"` @@ -391,13 +431,14 @@ type CountTokensRequest struct { NullFields []string `json:"-"` } -func (s *CountTokensRequest) MarshalJSON() ([]byte, error) { - type NoMethod CountTokensRequest +func (s *GoogleCloudAiplatformV1beta1CountTokensRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CountTokensRequest return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// CountTokensResponse: Response message for PredictionService.CountTokens. -type CountTokensResponse struct { +// GoogleCloudAiplatformV1beta1CountTokensResponse: Response message for +// PredictionService.CountTokens. +type GoogleCloudAiplatformV1beta1CountTokensResponse struct { // TotalBillableCharacters: The total number of billable characters counted // across all instances from the request. TotalBillableCharacters int64 `json:"totalBillableCharacters,omitempty"` @@ -420,51 +461,13 @@ type CountTokensResponse struct { NullFields []string `json:"-"` } -func (s *CountTokensResponse) MarshalJSON() ([]byte, error) { - type NoMethod CountTokensResponse +func (s *GoogleCloudAiplatformV1beta1CountTokensResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CountTokensResponse return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Date: Represents a whole or partial calendar date, such as a birthday. The -// time of day and time zone are either specified elsewhere or are -// insignificant. The date is relative to the Gregorian Calendar. This can -// represent one of the following: * A full date, with non-zero year, month, -// and day values. * A month and day, with a zero year (for example, an -// anniversary). * A year on its own, with a zero month and a zero day. * A -// year and month, with a zero day (for example, a credit card expiration -// date). Related types: * google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type Date struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, - // or 0 to specify a year by itself or a year and month where the day isn't - // significant. - Day int64 `json:"day,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without - // a month and day. - Month int64 `json:"month,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date - // without a year. - Year int64 `json:"year,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. 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. "Day") 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 *Date) MarshalJSON() ([]byte, error) { - type NoMethod Date - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// FileData: URI based data. -type FileData struct { +// GoogleCloudAiplatformV1beta1FileData: URI based data. +type GoogleCloudAiplatformV1beta1FileData struct { // FileUri: Required. URI. FileUri string `json:"fileUri,omitempty"` // MimeType: Required. The IANA standard MIME type of the source data. @@ -482,15 +485,16 @@ type FileData struct { NullFields []string `json:"-"` } -func (s *FileData) MarshalJSON() ([]byte, error) { - type NoMethod FileData +func (s *GoogleCloudAiplatformV1beta1FileData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FileData return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// FunctionCall: A predicted [FunctionCall] returned from the model that -// contains a string representing the [FunctionDeclaration.name] and a -// structured JSON object containing the parameters and their values. -type FunctionCall struct { +// GoogleCloudAiplatformV1beta1FunctionCall: A predicted [FunctionCall] +// returned from the model that contains a string representing the +// [FunctionDeclaration.name] and a structured JSON object containing the +// parameters and their values. +type GoogleCloudAiplatformV1beta1FunctionCall struct { // Args: Optional. Required. The function parameters and values in JSON object // format. See [FunctionDeclaration.parameters] for parameter details. Args googleapi.RawMessage `json:"args,omitempty"` @@ -510,13 +514,13 @@ type FunctionCall struct { NullFields []string `json:"-"` } -func (s *FunctionCall) MarshalJSON() ([]byte, error) { - type NoMethod FunctionCall +func (s *GoogleCloudAiplatformV1beta1FunctionCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FunctionCall return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// FunctionCallingConfig: Function calling config. -type FunctionCallingConfig struct { +// GoogleCloudAiplatformV1beta1FunctionCallingConfig: Function calling config. +type GoogleCloudAiplatformV1beta1FunctionCallingConfig struct { // AllowedFunctionNames: Optional. Function names to call. Only set when the // Mode is ANY. Function names should match [FunctionDeclaration.name]. With // mode set to ANY, model will predict a function call from the set of function @@ -549,18 +553,18 @@ type FunctionCallingConfig struct { NullFields []string `json:"-"` } -func (s *FunctionCallingConfig) MarshalJSON() ([]byte, error) { - type NoMethod FunctionCallingConfig +func (s *GoogleCloudAiplatformV1beta1FunctionCallingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FunctionCallingConfig return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// FunctionDeclaration: Structured representation of a function declaration as -// defined by the OpenAPI 3.0 specification +// GoogleCloudAiplatformV1beta1FunctionDeclaration: Structured representation +// of a function declaration as defined by the OpenAPI 3.0 specification // (https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the // function name and parameters. This FunctionDeclaration is a representation // of a block of code that can be used as a `Tool` by the model and executed by // the client. -type FunctionDeclaration struct { +type GoogleCloudAiplatformV1beta1FunctionDeclaration struct { // Description: Optional. Description and purpose of the function. Model uses // it to decide how and whether to call the function. Description string `json:"description,omitempty"` @@ -577,11 +581,11 @@ type FunctionDeclaration struct { // underscores with a maximum length of 64. Example with 1 required and 1 // optional parameter: type: OBJECT properties: param1: type: STRING param2: // type: INTEGER required: - param1 - Parameters *Schema `json:"parameters,omitempty"` + Parameters *GoogleCloudAiplatformV1beta1Schema `json:"parameters,omitempty"` // Response: Optional. Describes the output from this function in JSON Schema // format. Reflects the Open API 3.03 Response Object. The Schema defines the // type used for the response value of the function. - Response *Schema `json:"response,omitempty"` + Response *GoogleCloudAiplatformV1beta1Schema `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -595,17 +599,17 @@ type FunctionDeclaration struct { NullFields []string `json:"-"` } -func (s *FunctionDeclaration) MarshalJSON() ([]byte, error) { - type NoMethod FunctionDeclaration +func (s *GoogleCloudAiplatformV1beta1FunctionDeclaration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FunctionDeclaration return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// FunctionResponse: The result output from a [FunctionCall] that contains a -// string representing the [FunctionDeclaration.name] and a structured JSON -// object containing any output from the function is used as context to the -// model. This should contain the result of a [FunctionCall] made based on -// model prediction. -type FunctionResponse struct { +// GoogleCloudAiplatformV1beta1FunctionResponse: The result output from a +// [FunctionCall] that contains a string representing the +// [FunctionDeclaration.name] and a structured JSON object containing any +// output from the function is used as context to the model. This should +// contain the result of a [FunctionCall] made based on model prediction. +type GoogleCloudAiplatformV1beta1FunctionResponse struct { // Name: Required. The name of the function to call. Matches // [FunctionDeclaration.name] and [FunctionCall.name]. Name string `json:"name,omitempty"` @@ -624,14 +628,14 @@ type FunctionResponse struct { NullFields []string `json:"-"` } -func (s *FunctionResponse) MarshalJSON() ([]byte, error) { - type NoMethod FunctionResponse +func (s *GoogleCloudAiplatformV1beta1FunctionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FunctionResponse return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GenerateContentRequest: Request message for +// GoogleCloudAiplatformV1beta1GenerateContentRequest: Request message for // [PredictionService.GenerateContent]. -type GenerateContentRequest struct { +type GoogleCloudAiplatformV1beta1GenerateContentRequest struct { // CachedContent: Optional. The name of the cached content used as context to // serve the prediction. Note: only used in explicit caching, where users can // have control over caching (e.g. what content to cache) and enjoy guaranteed @@ -642,24 +646,24 @@ type GenerateContentRequest struct { // For single-turn queries, this is a single instance. For multi-turn queries, // this is a repeated field that contains conversation history + latest // request. - Contents []*Content `json:"contents,omitempty"` + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` // GenerationConfig: Optional. Generation config. - GenerationConfig *GenerationConfig `json:"generationConfig,omitempty"` + GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` // SafetySettings: Optional. Per request settings for blocking unsafe content. // Enforced on GenerateContentResponse.candidates. - SafetySettings []*SafetySetting `json:"safetySettings,omitempty"` + SafetySettings []*GoogleCloudAiplatformV1beta1SafetySetting `json:"safetySettings,omitempty"` // SystemInstruction: Optional. The user provided system instructions for the // model. Note: only text should be used in parts and content in each part will // be in a separate paragraph. - SystemInstruction *Content `json:"systemInstruction,omitempty"` + SystemInstruction *GoogleCloudAiplatformV1beta1Content `json:"systemInstruction,omitempty"` // ToolConfig: Optional. Tool config. This config is shared for all tools // provided in the request. - ToolConfig *ToolConfig `json:"toolConfig,omitempty"` + ToolConfig *GoogleCloudAiplatformV1beta1ToolConfig `json:"toolConfig,omitempty"` // Tools: Optional. A list of `Tools` the model may use to generate the next // response. A `Tool` is a piece of code that enables the system to interact // with external systems to perform an action, or set of actions, outside of // knowledge and scope of the model. - Tools []*Tool `json:"tools,omitempty"` + Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "CachedContent") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -673,22 +677,22 @@ type GenerateContentRequest struct { NullFields []string `json:"-"` } -func (s *GenerateContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateContentRequest +func (s *GoogleCloudAiplatformV1beta1GenerateContentRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentRequest return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GenerateContentResponse: Response message for +// GoogleCloudAiplatformV1beta1GenerateContentResponse: Response message for // [PredictionService.GenerateContent]. -type GenerateContentResponse struct { +type GoogleCloudAiplatformV1beta1GenerateContentResponse struct { // Candidates: Output only. Generated candidates. - Candidates []*Candidate `json:"candidates,omitempty"` + Candidates []*GoogleCloudAiplatformV1beta1Candidate `json:"candidates,omitempty"` // PromptFeedback: Output only. Content filter results for a prompt sent in the // request. Note: Sent only in the first stream chunk. Only happens when no // candidates were generated due to content violations. - PromptFeedback *PromptFeedback `json:"promptFeedback,omitempty"` + PromptFeedback *GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback `json:"promptFeedback,omitempty"` // UsageMetadata: Usage metadata about the response(s). - UsageMetadata *UsageMetadata `json:"usageMetadata,omitempty"` + UsageMetadata *GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata `json:"usageMetadata,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -705,13 +709,74 @@ type GenerateContentResponse struct { NullFields []string `json:"-"` } -func (s *GenerateContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GenerateContentResponse +func (s *GoogleCloudAiplatformV1beta1GenerateContentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback: Content +// filter results for a prompt sent in the request. +type GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback struct { + // BlockReason: Output only. Blocked reason. + // + // Possible values: + // "BLOCKED_REASON_UNSPECIFIED" - Unspecified blocked reason. + // "SAFETY" - Candidates blocked due to safety. + // "OTHER" - Candidates blocked due to other reason. + // "BLOCKLIST" - Candidates blocked due to the terms which are included from + // the terminology blocklist. + // "PROHIBITED_CONTENT" - Candidates blocked due to prohibited content. + BlockReason string `json:"blockReason,omitempty"` + // BlockReasonMessage: Output only. A readable block reason message. + BlockReasonMessage string `json:"blockReasonMessage,omitempty"` + // SafetyRatings: Output only. Safety ratings. + SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockReason") 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. "BlockReason") 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 *GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata: Usage +// metadata about response(s). +type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata struct { + // CandidatesTokenCount: Number of tokens in the response(s). + CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` + // PromptTokenCount: Number of tokens in the request. + PromptTokenCount int64 `json:"promptTokenCount,omitempty"` + TotalTokenCount int64 `json:"totalTokenCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "CandidatesTokenCount") 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. "CandidatesTokenCount") 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 *GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GenerationConfig: Generation config. -type GenerationConfig struct { +// GoogleCloudAiplatformV1beta1GenerationConfig: Generation config. +type GoogleCloudAiplatformV1beta1GenerationConfig struct { // CandidateCount: Optional. Number of candidates to generate. CandidateCount int64 `json:"candidateCount,omitempty"` // FrequencyPenalty: Optional. Frequency penalties. @@ -733,7 +798,7 @@ type GenerationConfig struct { // (https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible // response_mime_type must also be set. Compatible mimetypes: // `application/json`: Schema for JSON response. - ResponseSchema *Schema `json:"responseSchema,omitempty"` + ResponseSchema *GoogleCloudAiplatformV1beta1Schema `json:"responseSchema,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. @@ -755,13 +820,13 @@ type GenerationConfig struct { NullFields []string `json:"-"` } -func (s *GenerationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GenerationConfig +func (s *GoogleCloudAiplatformV1beta1GenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerationConfig return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GenerationConfig) UnmarshalJSON(data []byte) error { - type NoMethod GenerationConfig +func (s *GoogleCloudAiplatformV1beta1GenerationConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1GenerationConfig var s1 struct { FrequencyPenalty gensupport.JSONFloat64 `json:"frequencyPenalty"` PresencePenalty gensupport.JSONFloat64 `json:"presencePenalty"` @@ -782,18 +847,19 @@ func (s *GenerationConfig) UnmarshalJSON(data []byte) error { return nil } -// GoogleSearchRetrieval: Tool to retrieve public web data for grounding, -// powered by Google. -type GoogleSearchRetrieval struct { +// GoogleCloudAiplatformV1beta1GoogleSearchRetrieval: Tool to retrieve public +// web data for grounding, powered by Google. +type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval struct { } -// GroundingMetadata: Metadata returned to client when grounding is enabled. -type GroundingMetadata struct { +// GoogleCloudAiplatformV1beta1GroundingMetadata: Metadata returned to client +// when grounding is enabled. +type GoogleCloudAiplatformV1beta1GroundingMetadata struct { // RetrievalQueries: Optional. Queries executed by the retrieval tools. RetrievalQueries []string `json:"retrievalQueries,omitempty"` // SearchEntryPoint: Optional. Google search entry for the following-up web // searches. - SearchEntryPoint *SearchEntryPoint `json:"searchEntryPoint,omitempty"` + SearchEntryPoint *GoogleCloudAiplatformV1beta1SearchEntryPoint `json:"searchEntryPoint,omitempty"` // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` @@ -810,64 +876,36 @@ type GroundingMetadata struct { NullFields []string `json:"-"` } -func (s *GroundingMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GroundingMetadata - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// ModelOperationMetadata: This is returned in the longrunning operations for -// create/update. -type ModelOperationMetadata struct { - // Possible values: - // "BASIC_OPERATION_STATUS_UNSPECIFIED" - The status is unspecified - // "BASIC_OPERATION_STATUS_UPLOADING" - The model file is being uploaded - // "BASIC_OPERATION_STATUS_VERIFYING" - The model file is being verified - BasicOperationStatus string `json:"basicOperationStatus,omitempty"` - // Name: The name of the model we are creating/updating The name must have the - // form `projects/{project_id}/models/{model_id}` - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "BasicOperationStatus") 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. "BasicOperationStatus") 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 *ModelOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ModelOperationMetadata +func (s *GoogleCloudAiplatformV1beta1GroundingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingMetadata return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Part: A datatype containing media that is part of a multi-part `Content` -// message. A `Part` consists of data which has an associated datatype. A -// `Part` can only contain one of the accepted types in `Part.data`. A `Part` -// must have a fixed IANA MIME type identifying the type and subtype of the -// media if `inline_data` or `file_data` field is filled with raw bytes. -type Part struct { +// GoogleCloudAiplatformV1beta1Part: A datatype containing media that is part +// of a multi-part `Content` message. A `Part` consists of data which has an +// associated datatype. A `Part` can only contain one of the accepted types in +// `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type +// and subtype of the media if `inline_data` or `file_data` field is filled +// with raw bytes. +type GoogleCloudAiplatformV1beta1Part struct { // FileData: Optional. URI based data. - FileData *FileData `json:"fileData,omitempty"` + FileData *GoogleCloudAiplatformV1beta1FileData `json:"fileData,omitempty"` // FunctionCall: Optional. A predicted [FunctionCall] returned from the model // that contains a string representing the [FunctionDeclaration.name] with the // parameters and their values. - FunctionCall *FunctionCall `json:"functionCall,omitempty"` + FunctionCall *GoogleCloudAiplatformV1beta1FunctionCall `json:"functionCall,omitempty"` // FunctionResponse: Optional. The result output of a [FunctionCall] that // contains a string representing the [FunctionDeclaration.name] and a // structured JSON object containing any output from the function call. It is // used as context to the model. - FunctionResponse *FunctionResponse `json:"functionResponse,omitempty"` + FunctionResponse *GoogleCloudAiplatformV1beta1FunctionResponse `json:"functionResponse,omitempty"` // InlineData: Optional. Inlined bytes data. - InlineData *Blob `json:"inlineData,omitempty"` + InlineData *GoogleCloudAiplatformV1beta1Blob `json:"inlineData,omitempty"` // Text: Optional. Text part (can be code). Text string `json:"text,omitempty"` // VideoMetadata: Optional. Video metadata. The metadata should only be // specified while the video data is presented in inline_data or file_data. - VideoMetadata *VideoMetadata `json:"videoMetadata,omitempty"` + VideoMetadata *GoogleCloudAiplatformV1beta1VideoMetadata `json:"videoMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "FileData") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -881,83 +919,23 @@ type Part struct { NullFields []string `json:"-"` } -func (s *Part) MarshalJSON() ([]byte, error) { - type NoMethod Part +func (s *GoogleCloudAiplatformV1beta1Part) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Part return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// PromptFeedback: Content filter results for a prompt sent in the request. -type PromptFeedback struct { - // BlockReason: Output only. Blocked reason. - // - // Possible values: - // "BLOCKED_REASON_UNSPECIFIED" - Unspecified blocked reason. - // "SAFETY" - Candidates blocked due to safety. - // "OTHER" - Candidates blocked due to other reason. - // "BLOCKLIST" - Candidates blocked due to the terms which are included from - // the terminology blocklist. - // "PROHIBITED_CONTENT" - Candidates blocked due to prohibited content. - BlockReason string `json:"blockReason,omitempty"` - // BlockReasonMessage: Output only. A readable block reason message. - BlockReasonMessage string `json:"blockReasonMessage,omitempty"` - // SafetyRatings: Output only. Safety ratings. - SafetyRatings []*SafetyRating `json:"safetyRatings,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockReason") 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. "BlockReason") 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 *PromptFeedback) MarshalJSON() ([]byte, error) { - type NoMethod PromptFeedback - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// RagResource: The definition of the Rag resource. -type RagResource struct { - // RagCorpus: Optional. RagCorpora resource name. Format: - // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` - RagCorpus string `json:"ragCorpus,omitempty"` - // RagFileIds: Optional. rag_file_id. The files should be in the same - // rag_corpus set in rag_corpus field. - RagFileIds []string `json:"ragFileIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "RagCorpus") 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. "RagCorpus") 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 *RagResource) MarshalJSON() ([]byte, error) { - type NoMethod RagResource - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// Retrieval: Defines a retrieval tool that model can call to access external -// knowledge. -type Retrieval struct { +// GoogleCloudAiplatformV1beta1Retrieval: Defines a retrieval tool that model +// can call to access external knowledge. +type GoogleCloudAiplatformV1beta1Retrieval struct { // DisableAttribution: Optional. Disable using the result from this tool in // detecting grounding attribution. This does not affect how the result is // given to the model for generation. DisableAttribution bool `json:"disableAttribution,omitempty"` // VertexAiSearch: Set to use data source powered by Vertex AI Search. - VertexAiSearch *VertexAISearch `json:"vertexAiSearch,omitempty"` + VertexAiSearch *GoogleCloudAiplatformV1beta1VertexAISearch `json:"vertexAiSearch,omitempty"` // VertexRagStore: Set to use data source powered by Vertex RAG store. User // data is uploaded via the VertexRagDataService. - VertexRagStore *VertexRagStore `json:"vertexRagStore,omitempty"` + VertexRagStore *GoogleCloudAiplatformV1beta1VertexRagStore `json:"vertexRagStore,omitempty"` // ForceSendFields is a list of field names (e.g. "DisableAttribution") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -971,13 +949,14 @@ type Retrieval struct { NullFields []string `json:"-"` } -func (s *Retrieval) MarshalJSON() ([]byte, error) { - type NoMethod Retrieval +func (s *GoogleCloudAiplatformV1beta1Retrieval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Retrieval return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// SafetyRating: Safety rating corresponding to the generated content. -type SafetyRating struct { +// GoogleCloudAiplatformV1beta1SafetyRating: Safety rating corresponding to the +// generated content. +type GoogleCloudAiplatformV1beta1SafetyRating struct { // Blocked: Output only. Indicates whether the content was filtered out because // of this rating. Blocked bool `json:"blocked,omitempty"` @@ -1027,13 +1006,13 @@ type SafetyRating struct { NullFields []string `json:"-"` } -func (s *SafetyRating) MarshalJSON() ([]byte, error) { - type NoMethod SafetyRating +func (s *GoogleCloudAiplatformV1beta1SafetyRating) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SafetyRating return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *SafetyRating) UnmarshalJSON(data []byte) error { - type NoMethod SafetyRating +func (s *GoogleCloudAiplatformV1beta1SafetyRating) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1SafetyRating var s1 struct { ProbabilityScore gensupport.JSONFloat64 `json:"probabilityScore"` SeverityScore gensupport.JSONFloat64 `json:"severityScore"` @@ -1048,8 +1027,8 @@ func (s *SafetyRating) UnmarshalJSON(data []byte) error { return nil } -// SafetySetting: Safety settings. -type SafetySetting struct { +// GoogleCloudAiplatformV1beta1SafetySetting: Safety settings. +type GoogleCloudAiplatformV1beta1SafetySetting struct { // Category: Required. Harm category. // // Possible values: @@ -1093,16 +1072,16 @@ type SafetySetting struct { NullFields []string `json:"-"` } -func (s *SafetySetting) MarshalJSON() ([]byte, error) { - type NoMethod SafetySetting +func (s *GoogleCloudAiplatformV1beta1SafetySetting) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SafetySetting return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Schema: Schema is used to define the format of input/output data. Represents -// a select subset of an OpenAPI 3.0 schema object -// (https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in -// the future as needed. -type Schema struct { +// GoogleCloudAiplatformV1beta1Schema: Schema is used to define the format of +// input/output data. Represents a select subset of an OpenAPI 3.0 schema +// object (https://spec.openapis.org/oas/v3.0.3#schema). More fields may be +// added in the future as needed. +type GoogleCloudAiplatformV1beta1Schema struct { // Default: Optional. Default value of the data. Default interface{} `json:"default,omitempty"` // Description: Optional. The description of the data. @@ -1120,7 +1099,7 @@ type Schema struct { Format string `json:"format,omitempty"` // Items: Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of // Type.ARRAY. - Items *Schema `json:"items,omitempty"` + Items *GoogleCloudAiplatformV1beta1Schema `json:"items,omitempty"` // MaxItems: Optional. Maximum number of the elements for Type.ARRAY. MaxItems int64 `json:"maxItems,omitempty,string"` // MaxLength: Optional. Maximum length of the Type.STRING @@ -1146,7 +1125,7 @@ type Schema struct { Pattern string `json:"pattern,omitempty"` // Properties: Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of // Type.OBJECT. - Properties map[string]Schema `json:"properties,omitempty"` + Properties map[string]GoogleCloudAiplatformV1beta1Schema `json:"properties,omitempty"` // Required: Optional. Required properties of Type.OBJECT. Required []string `json:"required,omitempty"` // Title: Optional. The title of the Schema. @@ -1175,13 +1154,13 @@ type Schema struct { NullFields []string `json:"-"` } -func (s *Schema) MarshalJSON() ([]byte, error) { - type NoMethod Schema +func (s *GoogleCloudAiplatformV1beta1Schema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Schema return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *Schema) UnmarshalJSON(data []byte) error { - type NoMethod Schema +func (s *GoogleCloudAiplatformV1beta1Schema) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1Schema var s1 struct { Maximum gensupport.JSONFloat64 `json:"maximum"` Minimum gensupport.JSONFloat64 `json:"minimum"` @@ -1196,8 +1175,8 @@ func (s *Schema) UnmarshalJSON(data []byte) error { return nil } -// SearchEntryPoint: Google search entry point. -type SearchEntryPoint struct { +// GoogleCloudAiplatformV1beta1SearchEntryPoint: Google search entry point. +type GoogleCloudAiplatformV1beta1SearchEntryPoint struct { // RenderedContent: Optional. Web content snippet that can be embedded in a web // page or an app webview. RenderedContent string `json:"renderedContent,omitempty"` @@ -1216,17 +1195,18 @@ type SearchEntryPoint struct { NullFields []string `json:"-"` } -func (s *SearchEntryPoint) MarshalJSON() ([]byte, error) { - type NoMethod SearchEntryPoint +func (s *GoogleCloudAiplatformV1beta1SearchEntryPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SearchEntryPoint return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Tool: Tool details that the model may use to generate response. A `Tool` is -// a piece of code that enables the system to interact with external systems to -// perform an action, or set of actions, outside of knowledge and scope of the -// model. A Tool object should contain exactly one type of Tool (e.g -// FunctionDeclaration, Retrieval or GoogleSearchRetrieval). -type Tool struct { +// GoogleCloudAiplatformV1beta1Tool: Tool details that the model may use to +// generate response. A `Tool` is a piece of code that enables the system to +// interact with external systems to perform an action, or set of actions, +// outside of knowledge and scope of the model. A Tool object should contain +// exactly one type of Tool (e.g FunctionDeclaration, Retrieval or +// GoogleSearchRetrieval). +type GoogleCloudAiplatformV1beta1Tool struct { // FunctionDeclarations: Optional. Function tool type. One or more function // declarations to be passed to the model along with the current user query. // Model may decide to call a subset of these functions by populating @@ -1234,14 +1214,14 @@ type Tool struct { // each function call in the next turn. Based on the function responses, Model // will generate the final response back to the user. Maximum 64 function // declarations can be provided. - FunctionDeclarations []*FunctionDeclaration `json:"functionDeclarations,omitempty"` + FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. // Specialized retrieval tool that is powered by Google search. - GoogleSearchRetrieval *GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` + GoogleSearchRetrieval *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` // Retrieval: Optional. Retrieval tool type. System will always execute the // provided retrieval tool(s) to get external knowledge to answer the prompt. // Retrieval results are presented to the model for generation. - Retrieval *Retrieval `json:"retrieval,omitempty"` + Retrieval *GoogleCloudAiplatformV1beta1Retrieval `json:"retrieval,omitempty"` // ForceSendFields is a list of field names (e.g. "FunctionDeclarations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1255,16 +1235,16 @@ type Tool struct { NullFields []string `json:"-"` } -func (s *Tool) MarshalJSON() ([]byte, error) { - type NoMethod Tool +func (s *GoogleCloudAiplatformV1beta1Tool) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Tool return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ToolConfig: Tool config. This config is shared for all tools provided in the -// request. -type ToolConfig struct { +// GoogleCloudAiplatformV1beta1ToolConfig: Tool config. This config is shared +// for all tools provided in the request. +type GoogleCloudAiplatformV1beta1ToolConfig struct { // FunctionCallingConfig: Optional. Function calling config. - FunctionCallingConfig *FunctionCallingConfig `json:"functionCallingConfig,omitempty"` + FunctionCallingConfig *GoogleCloudAiplatformV1beta1FunctionCallingConfig `json:"functionCallingConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "FunctionCallingConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1278,39 +1258,15 @@ type ToolConfig struct { NullFields []string `json:"-"` } -func (s *ToolConfig) MarshalJSON() ([]byte, error) { - type NoMethod ToolConfig +func (s *GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ToolConfig return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// UsageMetadata: Usage metadata about response(s). -type UsageMetadata struct { - // CandidatesTokenCount: Number of tokens in the response(s). - CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` - // PromptTokenCount: Number of tokens in the request. - PromptTokenCount int64 `json:"promptTokenCount,omitempty"` - TotalTokenCount int64 `json:"totalTokenCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "CandidatesTokenCount") 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. "CandidatesTokenCount") 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 *UsageMetadata) MarshalJSON() ([]byte, error) { - type NoMethod UsageMetadata - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// VertexAISearch: Retrieve from Vertex AI Search datastore for grounding. See +// GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI Search +// datastore for grounding. See // https://cloud.google.com/vertex-ai-search-and-conversation -type VertexAISearch struct { +type GoogleCloudAiplatformV1beta1VertexAISearch struct { // Datastore: Required. Fully-qualified Vertex AI Search's datastore resource // ID. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ @@ -1329,20 +1285,21 @@ type VertexAISearch struct { NullFields []string `json:"-"` } -func (s *VertexAISearch) MarshalJSON() ([]byte, error) { - type NoMethod VertexAISearch +func (s *GoogleCloudAiplatformV1beta1VertexAISearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VertexAISearch return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// VertexRagStore: Retrieve from Vertex RAG Store for grounding. -type VertexRagStore struct { +// GoogleCloudAiplatformV1beta1VertexRagStore: Retrieve from Vertex RAG Store +// for grounding. +type GoogleCloudAiplatformV1beta1VertexRagStore struct { // RagCorpora: Optional. Deprecated. Please use rag_resources instead. RagCorpora []string `json:"ragCorpora,omitempty"` // RagResources: Optional. The representation of the rag source. It can be used // to specify corpus only or ragfiles. Currently only support one corpus or // multiple files from one corpus. In the future we may open up multiple // corpora support. - RagResources []*RagResource `json:"ragResources,omitempty"` + RagResources []*GoogleCloudAiplatformV1beta1VertexRagStoreRagResource `json:"ragResources,omitempty"` // SimilarityTopK: Optional. Number of top k results to return from the // selected corpora. SimilarityTopK int64 `json:"similarityTopK,omitempty"` @@ -1362,13 +1319,13 @@ type VertexRagStore struct { NullFields []string `json:"-"` } -func (s *VertexRagStore) MarshalJSON() ([]byte, error) { - type NoMethod VertexRagStore +func (s *GoogleCloudAiplatformV1beta1VertexRagStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VertexRagStore return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *VertexRagStore) UnmarshalJSON(data []byte) error { - type NoMethod VertexRagStore +func (s *GoogleCloudAiplatformV1beta1VertexRagStore) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1VertexRagStore var s1 struct { VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` *NoMethod @@ -1381,8 +1338,36 @@ func (s *VertexRagStore) UnmarshalJSON(data []byte) error { return nil } -// VideoMetadata: Metadata describes the input video content. -type VideoMetadata struct { +// GoogleCloudAiplatformV1beta1VertexRagStoreRagResource: The definition of the +// Rag resource. +type GoogleCloudAiplatformV1beta1VertexRagStoreRagResource struct { + // RagCorpus: Optional. RagCorpora resource name. Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + RagCorpus string `json:"ragCorpus,omitempty"` + // RagFileIds: Optional. rag_file_id. The files should be in the same + // rag_corpus set in rag_corpus field. + RagFileIds []string `json:"ragFileIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpus") 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. "RagCorpus") 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 *GoogleCloudAiplatformV1beta1VertexRagStoreRagResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VertexRagStoreRagResource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1VideoMetadata: Metadata describes the input +// video content. +type GoogleCloudAiplatformV1beta1VideoMetadata struct { // EndOffset: Optional. The end offset of the video. EndOffset string `json:"endOffset,omitempty"` // StartOffset: Optional. The start offset of the video. @@ -1400,28 +1385,57 @@ type VideoMetadata struct { NullFields []string `json:"-"` } -func (s *VideoMetadata) MarshalJSON() ([]byte, error) { - type NoMethod VideoMetadata +func (s *GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VideoMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ModelOperationMetadata: This is returned in the longrunning operations for +// create/update. +type ModelOperationMetadata struct { + // Possible values: + // "BASIC_OPERATION_STATUS_UNSPECIFIED" - The status is unspecified + // "BASIC_OPERATION_STATUS_UPLOADING" - The model file is being uploaded + // "BASIC_OPERATION_STATUS_VERIFYING" - The model file is being verified + BasicOperationStatus string `json:"basicOperationStatus,omitempty"` + // Name: The name of the model we are creating/updating The name must have the + // form `projects/{project_id}/models/{model_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "BasicOperationStatus") 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. "BasicOperationStatus") 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 *ModelOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod ModelOperationMetadata return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type ProjectsLocationsPublishersModelsCountTokensCall struct { - s *Service - endpoint string - counttokensrequest *CountTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + endpoint string + googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // CountTokens: Perform a token counting. // // - endpoint: The name of the Endpoint requested to perform token counting. // Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, counttokensrequest *CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall { +func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall { c := &ProjectsLocationsPublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.endpoint = endpoint - c.counttokensrequest = counttokensrequest + c.googlecloudaiplatformv1beta1counttokensrequest = googlecloudaiplatformv1beta1counttokensrequest return c } @@ -1451,7 +1465,7 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header func (c *ProjectsLocationsPublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.counttokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1counttokensrequest) if err != nil { return nil, err } @@ -1472,11 +1486,11 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) doRequest(alt string) // Do executes the "firebaseml.projects.locations.publishers.models.countTokens" call. // Any non-2xx status code is an error. Response headers are in either -// *CountTokensResponse.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 *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*CountTokensResponse, error) { +// *GoogleCloudAiplatformV1beta1CountTokensResponse.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 *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CountTokensResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1495,7 +1509,7 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CountTokensResponse{ + ret := &GoogleCloudAiplatformV1beta1CountTokensResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1509,22 +1523,22 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi. } type ProjectsLocationsPublishersModelsGenerateContentCall struct { - s *Service - model string - generatecontentrequest *GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // GenerateContent: Generate content with multimodal inputs. // // - model: The name of the publisher model requested to serve the prediction. // Format: `projects/{project}/locations/{location}/publishers/*/models/*`. -func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, generatecontentrequest *GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { +func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model - c.generatecontentrequest = generatecontentrequest + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest return c } @@ -1554,7 +1568,7 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Header() http.Hea func (c *ProjectsLocationsPublishersModelsGenerateContentCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatecontentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1generatecontentrequest) if err != nil { return nil, err } @@ -1575,11 +1589,11 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) doRequest(alt str // Do executes the "firebaseml.projects.locations.publishers.models.generateContent" call. // Any non-2xx status code is an error. Response headers are in either -// *GenerateContentResponse.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 +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.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 *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GenerateContentResponse, error) { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1598,7 +1612,7 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1612,12 +1626,12 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...google } type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { - s *Service - model string - generatecontentrequest *GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // StreamGenerateContent: Generate content with multimodal inputs with @@ -1625,10 +1639,10 @@ type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { // // - model: The name of the publisher model requested to serve the prediction. // Format: `projects/{project}/locations/{location}/publishers/*/models/*`. -func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, generatecontentrequest *GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { +func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model - c.generatecontentrequest = generatecontentrequest + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest return c } @@ -1658,7 +1672,7 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() ht func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatecontentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1generatecontentrequest) if err != nil { return nil, err } @@ -1679,11 +1693,11 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) doRequest(a // Do executes the "firebaseml.projects.locations.publishers.models.streamGenerateContent" call. // Any non-2xx status code is an error. Response headers are in either -// *GenerateContentResponse.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 +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.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 *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GenerateContentResponse, error) { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1702,7 +1716,7 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/looker/v1/looker-api.json b/looker/v1/looker-api.json index ce7bb52c27c..8922f640b90 100644 --- a/looker/v1/looker-api.json +++ b/looker/v1/looker-api.json @@ -731,7 +731,7 @@ } } }, - "revision": "20240411", + "revision": "20240522", "rootUrl": "https://looker.googleapis.com/", "schemas": { "AdminSettings": { @@ -1059,7 +1059,7 @@ "type": "object" }, "Instance": { - "description": "A Looker instance. LINT.IfChange", + "description": "A Looker instance.", "id": "Instance", "properties": { "adminSettings": { diff --git a/looker/v1/looker-gen.go b/looker/v1/looker-gen.go index 83f0ae56819..f90dc9a2c90 100644 --- a/looker/v1/looker-gen.go +++ b/looker/v1/looker-gen.go @@ -744,7 +744,7 @@ func (s *ImportInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Instance: A Looker instance. LINT.IfChange +// Instance: A Looker instance. type Instance struct { // AdminSettings: Looker Instance Admin settings. AdminSettings *AdminSettings `json:"adminSettings,omitempty"` diff --git a/managedidentities/v1/managedidentities-api.json b/managedidentities/v1/managedidentities-api.json index 294fdf290a2..324eea8627a 100644 --- a/managedidentities/v1/managedidentities-api.json +++ b/managedidentities/v1/managedidentities-api.json @@ -1515,7 +1515,7 @@ } } }, - "revision": "20240112", + "revision": "20240530", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1615,7 +1615,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "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" } }, @@ -1806,7 +1806,7 @@ "type": "object" }, "locations": { - "description": "Required. Locations where domain needs to be provisioned. regions e.g. us-west1 or us-east4 Service supports up to 4 locations at once. Each location will use a /26 block.", + "description": "Required. Locations where domain needs to be provisioned. The locations can be specified according to https://cloud.google.com/compute/docs/regions-zones, such as `us-west1` or `us-east4`. Each domain supports up to 4 locations, separated by commas. Each location will use a /26 block.", "items": { "type": "string" }, @@ -2571,7 +2571,7 @@ "type": "object" }, "MaintenancePolicy": { - "description": "LINT.IfChange Defines policies to service maintenance events.", + "description": "Defines policies to service maintenance events.", "id": "MaintenancePolicy", "properties": { "createTime": { diff --git a/managedidentities/v1/managedidentities-gen.go b/managedidentities/v1/managedidentities-gen.go index 67da5911a86..99f50947a0a 100644 --- a/managedidentities/v1/managedidentities-gen.go +++ b/managedidentities/v1/managedidentities-gen.go @@ -396,7 +396,11 @@ type Binding struct { // 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`. + // 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 @@ -640,9 +644,11 @@ type Domain struct { Fqdn string `json:"fqdn,omitempty"` // Labels: Optional. Resource labels that can contain user-provided metadata. Labels map[string]string `json:"labels,omitempty"` - // Locations: Required. Locations where domain needs to be provisioned. regions - // e.g. us-west1 or us-east4 Service supports up to 4 locations at once. Each - // location will use a /26 block. + // Locations: Required. Locations where domain needs to be provisioned. The + // locations can be specified according to + // https://cloud.google.com/compute/docs/regions-zones, such as `us-west1` or + // `us-east4`. Each domain supports up to 4 locations, separated by commas. + // Each location will use a /26 block. Locations []string `json:"locations,omitempty"` // Name: Required. The unique name of the domain using the form: // `projects/{project_id}/locations/global/domains/{domain_name}`. @@ -1629,8 +1635,7 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// MaintenancePolicy: LINT.IfChange Defines policies to service maintenance -// events. +// MaintenancePolicy: Defines policies to service maintenance events. type MaintenancePolicy struct { // CreateTime: Output only. The time when the resource was created. CreateTime string `json:"createTime,omitempty"` diff --git a/managedidentities/v1alpha1/managedidentities-api.json b/managedidentities/v1alpha1/managedidentities-api.json index 6a7907d98b4..c936aba5fbc 100644 --- a/managedidentities/v1alpha1/managedidentities-api.json +++ b/managedidentities/v1alpha1/managedidentities-api.json @@ -1515,7 +1515,7 @@ } } }, - "revision": "20240112", + "revision": "20240530", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1620,7 +1620,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "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" } }, @@ -2573,7 +2573,7 @@ "type": "object" }, "MaintenancePolicy": { - "description": "LINT.IfChange Defines policies to service maintenance events.", + "description": "Defines policies to service maintenance events.", "id": "MaintenancePolicy", "properties": { "createTime": { diff --git a/managedidentities/v1alpha1/managedidentities-gen.go b/managedidentities/v1alpha1/managedidentities-gen.go index ace7dc6af2e..61abb902f02 100644 --- a/managedidentities/v1alpha1/managedidentities-gen.go +++ b/managedidentities/v1alpha1/managedidentities-gen.go @@ -398,7 +398,11 @@ type Binding struct { // 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`. + // 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 @@ -1637,8 +1641,7 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// MaintenancePolicy: LINT.IfChange Defines policies to service maintenance -// events. +// MaintenancePolicy: Defines policies to service maintenance events. type MaintenancePolicy struct { // CreateTime: Output only. The time when the resource was created. CreateTime string `json:"createTime,omitempty"` diff --git a/managedidentities/v1beta1/managedidentities-api.json b/managedidentities/v1beta1/managedidentities-api.json index aa442918e8d..f9fc5d90ed5 100644 --- a/managedidentities/v1beta1/managedidentities-api.json +++ b/managedidentities/v1beta1/managedidentities-api.json @@ -1515,7 +1515,7 @@ } } }, - "revision": "20240112", + "revision": "20240530", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1621,7 +1621,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "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" } }, @@ -2583,7 +2583,7 @@ "type": "object" }, "MaintenancePolicy": { - "description": "LINT.IfChange Defines policies to service maintenance events.", + "description": "Defines policies to service maintenance events.", "id": "MaintenancePolicy", "properties": { "createTime": { diff --git a/managedidentities/v1beta1/managedidentities-gen.go b/managedidentities/v1beta1/managedidentities-gen.go index 717f651289d..acaf23be221 100644 --- a/managedidentities/v1beta1/managedidentities-gen.go +++ b/managedidentities/v1beta1/managedidentities-gen.go @@ -399,7 +399,11 @@ type Binding struct { // 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`. + // 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 @@ -1644,8 +1648,7 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// MaintenancePolicy: LINT.IfChange Defines policies to service maintenance -// events. +// MaintenancePolicy: Defines policies to service maintenance events. type MaintenancePolicy struct { // CreateTime: Output only. The time when the resource was created. CreateTime string `json:"createTime,omitempty"` diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index 6d52b8ebca0..b9c07175fe6 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -584,7 +584,7 @@ } } }, - "revision": "20240307", + "revision": "20240604", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1161,6 +1161,16 @@ }, "type": "array" }, + "satisfiesPzi": { + "description": "Optional. Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Optional. Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The state of this Memcached instance.", "enum": [ diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index d4df2c98d3d..2e34f4e6bf2 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -904,6 +904,10 @@ type Instance struct { // associated with the private service access connection for example, // "test-default" associated with IP range 10.0.0.0/29. ReservedIpRangeId []string `json:"reservedIpRangeId,omitempty"` + // SatisfiesPzi: Optional. Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Optional. Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. The state of this Memcached instance. // // Possible values: diff --git a/memcache/v1beta2/memcache-api.json b/memcache/v1beta2/memcache-api.json index 3363b676ecb..29b0a1bde7e 100644 --- a/memcache/v1beta2/memcache-api.json +++ b/memcache/v1beta2/memcache-api.json @@ -612,7 +612,7 @@ } } }, - "revision": "20240307", + "revision": "20240604", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1207,6 +1207,16 @@ }, "type": "array" }, + "satisfiesPzi": { + "description": "Optional. Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Optional. Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The state of this Memcached instance.", "enum": [ diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index 057f9f34bda..1cc39d30b5d 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -933,6 +933,10 @@ type Instance struct { // associated with the private service access connection for example, // "test-default" associated with IP range 10.0.0.0/29. ReservedIpRangeId []string `json:"reservedIpRangeId,omitempty"` + // SatisfiesPzi: Optional. Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Optional. Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. The state of this Memcached instance. // // Possible values: diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index 64a4f4a33ac..b9b07932b48 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -1758,7 +1758,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.", + "description": "Required. Identifier. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.", "location": "path", "pattern": "^projects/[^/]+/snoozes/[^/]+$", "required": true, @@ -2714,7 +2714,7 @@ } } }, - "revision": "20240519", + "revision": "20240602", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -5503,7 +5503,7 @@ "description": "Required. The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI." }, "name": { - "description": "Required. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.", + "description": "Required. Identifier. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.", "type": "string" } }, diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 3685426807e..eb9f1e2a541 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -4743,7 +4743,7 @@ type Snooze struct { // is a 15 second clock skew to account for the time it takes for a request to // reach the API from the UI. Interval *TimeInterval `json:"interval,omitempty"` - // Name: Required. The name of the Snooze. The format is: + // Name: Required. Identifier. The name of the Snooze. The format is: // projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze // will be generated by the system. Name string `json:"name,omitempty"` @@ -10968,7 +10968,7 @@ type ProjectsSnoozesPatchCall struct { // Patch: Updates a Snooze, identified by its name, with the parameters in the // given Snooze object. // -// - name: The name of the Snooze. The format is: +// - name: Identifier. The name of the Snooze. The format is: // projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze // will be generated by the system. func (r *ProjectsSnoozesService) Patch(name string, snooze *Snooze) *ProjectsSnoozesPatchCall { diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 5573d119fc0..1628e60376f 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -2812,7 +2812,7 @@ } } }, - "revision": "20240523", + "revision": "20240529", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptHubSpokeRequest": { @@ -3595,6 +3595,13 @@ }, "type": "array" }, + "includeExportRanges": { + "description": "Optional. IP ranges allowed to be included from peering.", + "items": { + "type": "string" + }, + "type": "array" + }, "uri": { "description": "Required. The URI of the VPC network resource.", "type": "string" diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 9b797a58038..c99f95f3960 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -1360,6 +1360,9 @@ type LinkedVpcNetwork struct { // ExcludeExportRanges: Optional. IP ranges encompassing the subnets to be // excluded from peering. ExcludeExportRanges []string `json:"excludeExportRanges,omitempty"` + // IncludeExportRanges: Optional. IP ranges allowed to be included from + // peering. + IncludeExportRanges []string `json:"includeExportRanges,omitempty"` // Uri: Required. The URI of the VPC network resource. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "ExcludeExportRanges") to diff --git a/notebooks/v2/notebooks-api.json b/notebooks/v2/notebooks-api.json index 5b88296d076..ca677a40e1d 100644 --- a/notebooks/v2/notebooks-api.json +++ b/notebooks/v2/notebooks-api.json @@ -876,7 +876,7 @@ } } }, - "revision": "20240118", + "revision": "20240604", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -921,6 +921,17 @@ }, "type": "object" }, + "AccessConfig": { + "description": "An access configuration attached to an instance's network interface.", + "id": "AccessConfig", + "properties": { + "externalIp": { + "description": "An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.", + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -1423,6 +1434,16 @@ "readOnly": true, "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use for Zone Isolation.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use for Zone Separation.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The state of this instance.", "enum": [ @@ -1575,6 +1596,13 @@ "description": "The definition of a network interface resource attached to a VM.", "id": "NetworkInterface", "properties": { + "accessConfigs": { + "description": "Optional. An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If no accessConfigs specified, the instance will have an external internet access through an ephemeral external IP address.", + "items": { + "$ref": "AccessConfig" + }, + "type": "array" + }, "network": { "description": "Optional. The name of the VPC that this VM instance is in. Format: `projects/{project_id}/global/networks/{network_id}`", "type": "string" diff --git a/notebooks/v2/notebooks-gen.go b/notebooks/v2/notebooks-gen.go index d01050e8434..b317236e894 100644 --- a/notebooks/v2/notebooks-gen.go +++ b/notebooks/v2/notebooks-gen.go @@ -243,6 +243,33 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// AccessConfig: An access configuration attached to an instance's network +// interface. +type AccessConfig struct { + // ExternalIp: An external IP address associated with this instance. Specify an + // unused static external IP address available to the project or leave this + // field undefined to use an IP from a shared ephemeral IP address pool. If you + // specify a static external IP address, it must live in the same region as the + // zone of the instance. + ExternalIp string `json:"externalIp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExternalIp") 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. "ExternalIp") 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 *AccessConfig) MarshalJSON() ([]byte, error) { + type NoMethod AccessConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -887,6 +914,10 @@ type Instance struct { // ProxyUri: Output only. The proxy endpoint that is used to access the Jupyter // notebook. ProxyUri string `json:"proxyUri,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use for Zone Isolation. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use for Zone Separation. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. The state of this instance. // // Possible values: @@ -1060,6 +1091,11 @@ func (s *Location) MarshalJSON() ([]byte, error) { // NetworkInterface: The definition of a network interface resource attached to // a VM. type NetworkInterface struct { + // AccessConfigs: Optional. An array of configurations for this interface. + // Currently, only one access config, ONE_TO_ONE_NAT, is supported. If no + // accessConfigs specified, the instance will have an external internet access + // through an ephemeral external IP address. + AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` // Network: Optional. The name of the VPC that this VM instance is in. Format: // `projects/{project_id}/global/networks/{network_id}` Network string `json:"network,omitempty"` @@ -1074,13 +1110,13 @@ type NetworkInterface struct { // Subnet: Optional. The name of the subnet that this VM instance is in. // Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` Subnet string `json:"subnet,omitempty"` - // ForceSendFields is a list of field names (e.g. "Network") 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. "AccessConfigs") 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. "Network") to include in API + // NullFields is a list of field names (e.g. "AccessConfigs") 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. diff --git a/osconfig/v1/osconfig-api.json b/osconfig/v1/osconfig-api.json index bbafaa49e23..f34749d97e2 100644 --- a/osconfig/v1/osconfig-api.json +++ b/osconfig/v1/osconfig-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20240512", + "revision": "20240610", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { @@ -2277,7 +2277,7 @@ "type": "string" }, "complianceStateReason": { - "description": "The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy.", + "description": "The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy. * `os-policy-execution-pending`: OS policy was assigned to the given VM, but was not executed yet. Typically this is a transient condition that will go away after the next policy execution cycle.", "type": "string" }, "osPolicyId": { @@ -2313,7 +2313,7 @@ "type": "string" }, "complianceStateReason": { - "description": "A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined.", + "description": "A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined. * `os-policy-execution-pending`: OS policy that owns this resource was assigned to the given VM, but was not executed yet.", "type": "string" }, "configSteps": { diff --git a/osconfig/v1/osconfig-gen.go b/osconfig/v1/osconfig-gen.go index 1a820c9d6c2..ab2c05dc513 100644 --- a/osconfig/v1/osconfig-gen.go +++ b/osconfig/v1/osconfig-gen.go @@ -1740,7 +1740,9 @@ type OSPolicyAssignmentReportOSPolicyCompliance struct { // working on a different task. This mostly happens when the agent or VM // unexpectedly restarts while applying OS policies. * // `internal-service-errors`: Internal service errors were encountered while - // attempting to apply the policy. + // attempting to apply the policy. * `os-policy-execution-pending`: OS policy + // was assigned to the given VM, but was not executed yet. Typically this is a + // transient condition that will go away after the next policy execution cycle. ComplianceStateReason string `json:"complianceStateReason,omitempty"` // OsPolicyId: The OS policy id OsPolicyId string `json:"osPolicyId,omitempty"` @@ -1786,7 +1788,8 @@ type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance struct // because errors were encountered while executing prior resources in the OS // policy. * `os-policy-execution-attempt-failed`: The execution of the OS // policy containing this resource failed and the compliance state couldn't be - // determined. + // determined. * `os-policy-execution-pending`: OS policy that owns this + // resource was assigned to the given VM, but was not executed yet. ComplianceStateReason string `json:"complianceStateReason,omitempty"` // ConfigSteps: Ordered list of configuration completed by the agent for the OS // policy resource. diff --git a/osconfig/v1alpha/osconfig-api.json b/osconfig/v1alpha/osconfig-api.json index ba01f35510e..9016008825e 100644 --- a/osconfig/v1alpha/osconfig-api.json +++ b/osconfig/v1alpha/osconfig-api.json @@ -707,7 +707,7 @@ } } }, - "revision": "20240512", + "revision": "20240610", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "CVSSv3": { @@ -1810,7 +1810,7 @@ "type": "string" }, "complianceStateReason": { - "description": "The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy.", + "description": "The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy. * `os-policy-execution-pending`: OS policy was assigned to the given VM, but was not executed yet. Typically this is a transient condition that will go away after the next policy execution cycle.", "type": "string" }, "osPolicyId": { @@ -1846,7 +1846,7 @@ "type": "string" }, "complianceStateReason": { - "description": "A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined.", + "description": "A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined. * `os-policy-execution-pending`: OS policy that owns this resource was assigned to the given VM, but was not executed yet.", "type": "string" }, "configSteps": { diff --git a/osconfig/v1alpha/osconfig-gen.go b/osconfig/v1alpha/osconfig-gen.go index 29ecdc4afe9..f784d73e5ab 100644 --- a/osconfig/v1alpha/osconfig-gen.go +++ b/osconfig/v1alpha/osconfig-gen.go @@ -1553,7 +1553,9 @@ type OSPolicyAssignmentReportOSPolicyCompliance struct { // working on a different task. This mostly happens when the agent or VM // unexpectedly restarts while applying OS policies. * // `internal-service-errors`: Internal service errors were encountered while - // attempting to apply the policy. + // attempting to apply the policy. * `os-policy-execution-pending`: OS policy + // was assigned to the given VM, but was not executed yet. Typically this is a + // transient condition that will go away after the next policy execution cycle. ComplianceStateReason string `json:"complianceStateReason,omitempty"` // OsPolicyId: The OS policy id OsPolicyId string `json:"osPolicyId,omitempty"` @@ -1599,7 +1601,8 @@ type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance struct // because errors were encountered while executing prior resources in the OS // policy. * `os-policy-execution-attempt-failed`: The execution of the OS // policy containing this resource failed and the compliance state couldn't be - // determined. + // determined. * `os-policy-execution-pending`: OS policy that owns this + // resource was assigned to the given VM, but was not executed yet. ComplianceStateReason string `json:"complianceStateReason,omitempty"` // ConfigSteps: Ordered list of configuration completed by the agent for the OS // policy resource. diff --git a/pollen/v1/pollen-api.json b/pollen/v1/pollen-api.json new file mode 100644 index 00000000000..d32bb2acdfd --- /dev/null +++ b/pollen/v1/pollen-api.json @@ -0,0 +1,562 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://pollen.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Pollen", + "description": "The Pollen API. ", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/maps/documentation/pollen", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "pollen:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://pollen.mtls.googleapis.com/", + "name": "pollen", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "forecast": { + "methods": { + "lookup": { + "description": "Returns up to 5 days of daily pollen information in more than 65 countries, up to 1km resolution.", + "flatPath": "v1/forecast:lookup", + "httpMethod": "GET", + "id": "pollen.forecast.lookup", + "parameterOrder": [], + "parameters": { + "days": { + "description": "Required. A number that indicates how many forecast days to request (minimum value 1, maximum value is 5).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "languageCode": { + "description": "Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF BCP-47 standard. Default value is \"en\".", + "location": "query", + "type": "string" + }, + "location.latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "location": "query", + "type": "number" + }, + "location.longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "location": "query", + "type": "number" + }, + "pageSize": { + "description": "Optional. The maximum number of daily info records to return per page. The default and max value is 5 (5 days of data).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token received from a previous daily call. It is used to retrieve the subsequent page. Note that when providing a value for the page token all other request parameters provided must match the previous call that provided the page token.", + "location": "query", + "type": "string" + }, + "plantsDescription": { + "description": "Optional. Contains general information about plants, including details on their seasonality, special shapes and colors, information about allergic cross-reactions, and plant photos.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/forecast:lookup", + "response": { + "$ref": "LookupForecastResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "mapTypes": { + "resources": { + "heatmapTiles": { + "methods": { + "lookupHeatmapTile": { + "description": "Returns a byte array containing the data of the tile PNG image.", + "flatPath": "v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}", + "httpMethod": "GET", + "id": "pollen.mapTypes.heatmapTiles.lookupHeatmapTile", + "parameterOrder": [ + "mapType", + "zoom", + "x", + "y" + ], + "parameters": { + "mapType": { + "description": "Required. The type of the pollen heatmap. Defines the combination of pollen type and index that the map will graphically represent.", + "enum": [ + "MAP_TYPE_UNSPECIFIED", + "TREE_UPI", + "GRASS_UPI", + "WEED_UPI" + ], + "enumDescriptions": [ + "Unspecified map type.", + "The heatmap type will represent a tree index graphical map.", + "The heatmap type will represent a grass index graphical map.", + "The heatmap type will represent a weed index graphically map." + ], + "location": "path", + "required": true, + "type": "string" + }, + "x": { + "description": "Required. Defines the east-west point in the requested tile.", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + }, + "y": { + "description": "Required. Defines the north-south point in the requested tile.", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + }, + "zoom": { + "description": "Required. The map's zoom level. Defines how large or small the contents of a map appear in a map view. * Zoom level 0 is the entire world in a single tile. * Zoom level 1 is the entire world in 4 tiles. * Zoom level 2 is the entire world in 16 tiles. * Zoom level 16 is the entire world in 65,536 tiles. Allowed values: 0-16", + "format": "int32", + "location": "path", + "required": true, + "type": "integer" + } + }, + "path": "v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}", + "response": { + "$ref": "HttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20240611", + "rootUrl": "https://pollen.googleapis.com/", + "schemas": { + "Color": { + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "id": "Color", + "properties": { + "alpha": { + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", + "format": "float", + "type": "number" + }, + "blue": { + "description": "The amount of blue in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "green": { + "description": "The amount of green in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "red": { + "description": "The amount of red in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DayInfo": { + "description": "This object contains the daily forecast information for each day requested.", + "id": "DayInfo", + "properties": { + "date": { + "$ref": "Date", + "description": "The date in UTC at which the pollen forecast data is represented." + }, + "plantInfo": { + "description": "This list will include (up to) 15 pollen species affecting the location specified in the request.", + "items": { + "$ref": "PlantInfo" + }, + "type": "array" + }, + "pollenTypeInfo": { + "description": "This list will include (up to) three pollen types (grass, weed, tree) affecting the location specified in the request.", + "items": { + "$ref": "PollenTypeInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "HttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "IndexInfo": { + "description": "This object contains data representing specific pollen index value, category and description.", + "id": "IndexInfo", + "properties": { + "category": { + "description": "Text classification of index numerical score interpretation. The index consists of six categories: * 0: \"None\" * 1: \"Very low\" * 2: \"Low\" * 3: \"Moderate\" * 4: \"High\" * 5: \"Very high", + "type": "string" + }, + "code": { + "description": "The index's code. This field represents the index for programming purposes by using snake cases instead of spaces. Example: \"UPI\".", + "enum": [ + "INDEX_UNSPECIFIED", + "UPI" + ], + "enumDescriptions": [ + "Unspecified index.", + "Universal Pollen Index." + ], + "type": "string" + }, + "color": { + "$ref": "Color", + "description": "The color used to represent the Pollen Index numeric score." + }, + "displayName": { + "description": "A human readable representation of the index name. Example: \"Universal Pollen Index\".", + "type": "string" + }, + "indexDescription": { + "description": "Textual explanation of current index level.", + "type": "string" + }, + "value": { + "description": "The index's numeric score. Numeric range is between 0 and 5.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "LookupForecastResponse": { + "id": "LookupForecastResponse", + "properties": { + "dailyInfo": { + "description": "Required. This object contains the daily forecast information for each day requested.", + "items": { + "$ref": "DayInfo" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. The token to retrieve the next page.", + "type": "string" + }, + "regionCode": { + "description": "The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory.", + "type": "string" + } + }, + "type": "object" + }, + "PlantDescription": { + "description": "Contains general information about plants, including details on their seasonality, special shapes and colors, information about allergic cross-reactions, and plant photos.", + "id": "PlantDescription", + "properties": { + "crossReaction": { + "description": "Textual description of pollen cross reaction plants. Example: Alder, Hazel, Hornbeam, Beech, Willow, and Oak pollen.", + "type": "string" + }, + "family": { + "description": "A human readable representation of the plant family name. Example: \"Betulaceae (the Birch family)\".", + "type": "string" + }, + "picture": { + "description": "Link to the picture of the plant.", + "type": "string" + }, + "pictureCloseup": { + "description": "Link to a closeup picture of the plant.", + "type": "string" + }, + "season": { + "description": "Textual list of explanations of seasons where the pollen is active. Example: \"Late winter, spring\".", + "type": "string" + }, + "specialColors": { + "description": "Textual description of the plants' colors of leaves, bark, flowers or seeds that helps identify the plant.", + "type": "string" + }, + "specialShapes": { + "description": "Textual description of the plants' shapes of leaves, bark, flowers or seeds that helps identify the plant.", + "type": "string" + }, + "type": { + "description": "The plant's pollen type. For example: \"GRASS\". A list of all available codes could be found here.", + "enum": [ + "POLLEN_TYPE_UNSPECIFIED", + "GRASS", + "TREE", + "WEED" + ], + "enumDescriptions": [ + "Unspecified plant type.", + "Grass pollen type.", + "Tree pollen type.", + "Weed pollen type." + ], + "type": "string" + } + }, + "type": "object" + }, + "PlantInfo": { + "description": "This object contains the daily information on specific plant.", + "id": "PlantInfo", + "properties": { + "code": { + "description": "The plant code name. For example: \"COTTONWOOD\". A list of all available codes could be found here.", + "enum": [ + "PLANT_UNSPECIFIED", + "ALDER", + "ASH", + "BIRCH", + "COTTONWOOD", + "ELM", + "MAPLE", + "OLIVE", + "JUNIPER", + "OAK", + "PINE", + "CYPRESS_PINE", + "HAZEL", + "GRAMINALES", + "RAGWEED", + "MUGWORT" + ], + "enumDescriptions": [ + "Unspecified plant code.", + "Alder is classified as a tree pollen type.", + "Ash is classified as a tree pollen type.", + "Birch is classified as a tree pollen type.", + "Cottonwood is classified as a tree pollen type.", + "Elm is classified as a tree pollen type.", + "Maple is classified as a tree pollen type.", + "Olive is classified as a tree pollen type.", + "Juniper is classified as a tree pollen type.", + "Oak is classified as a tree pollen type.", + "Pine is classified as a tree pollen type.", + "Cypress pine is classified as a tree pollen type.", + "Hazel is classified as a tree pollen type.", + "Graminales is classified as a grass pollen type.", + "Ragweed is classified as a weed pollen type.", + "Mugwort is classified as a weed pollen type." + ], + "type": "string" + }, + "displayName": { + "description": "A human readable representation of the plant name. Example: “Cottonwood\".", + "type": "string" + }, + "inSeason": { + "description": "Indication of either the plant is in season or not.", + "type": "boolean" + }, + "indexInfo": { + "$ref": "IndexInfo", + "description": "This object contains data representing specific pollen index value, category and description." + }, + "plantDescription": { + "$ref": "PlantDescription", + "description": "Contains general information about plants, including details on their seasonality, special shapes and colors, information about allergic cross-reactions, and plant photos." + } + }, + "type": "object" + }, + "PollenTypeInfo": { + "description": "This object contains the pollen type index and health recommendation information on specific pollen type.", + "id": "PollenTypeInfo", + "properties": { + "code": { + "description": "The pollen type's code name. For example: \"GRASS\"", + "enum": [ + "POLLEN_TYPE_UNSPECIFIED", + "GRASS", + "TREE", + "WEED" + ], + "enumDescriptions": [ + "Unspecified plant type.", + "Grass pollen type.", + "Tree pollen type.", + "Weed pollen type." + ], + "type": "string" + }, + "displayName": { + "description": "A human readable representation of the pollen type name. Example: \"Grass\"", + "type": "string" + }, + "healthRecommendations": { + "description": "Textual list of explanations, related to health insights based on the current pollen levels.", + "items": { + "type": "string" + }, + "type": "array" + }, + "inSeason": { + "description": "Indication whether the plant is in season or not.", + "type": "boolean" + }, + "indexInfo": { + "$ref": "IndexInfo", + "description": "Contains the Universal Pollen Index (UPI) data for the pollen type." + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Pollen API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/pollen/v1/pollen-gen.go b/pollen/v1/pollen-gen.go new file mode 100644 index 00000000000..9a07a889f36 --- /dev/null +++ b/pollen/v1/pollen-gen.go @@ -0,0 +1,925 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package pollen provides access to the Pollen API. +// +// For product documentation, see: https://developers.google.com/maps/documentation/pollen +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/pollen/v1" +// ... +// ctx := context.Background() +// pollenService, err := pollen.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// pollenService, err := pollen.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// pollenService, err := pollen.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package pollen // import "google.golang.org/api/pollen/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "pollen:v1" +const apiName = "pollen" +const apiVersion = "v1" +const basePath = "https://pollen.googleapis.com/" +const basePathTemplate = "https://pollen.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://pollen.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Forecast = NewForecastService(s) + s.MapTypes = NewMapTypesService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Forecast *ForecastService + + MapTypes *MapTypesService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewForecastService(s *Service) *ForecastService { + rs := &ForecastService{s: s} + return rs +} + +type ForecastService struct { + s *Service +} + +func NewMapTypesService(s *Service) *MapTypesService { + rs := &MapTypesService{s: s} + rs.HeatmapTiles = NewMapTypesHeatmapTilesService(s) + return rs +} + +type MapTypesService struct { + s *Service + + HeatmapTiles *MapTypesHeatmapTilesService +} + +func NewMapTypesHeatmapTilesService(s *Service) *MapTypesHeatmapTilesService { + rs := &MapTypesHeatmapTilesService{s: s} + return rs +} + +type MapTypesHeatmapTilesService struct { + s *Service +} + +// Color: Represents a color in the RGBA color space. This representation is +// designed for simplicity of conversion to and from color representations in +// various languages over compactness. For example, the fields of this +// representation can be trivially provided to the constructor of +// `java.awt.Color` in Java; it can also be trivially provided to UIColor's +// `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little +// work, it can be easily formatted into a CSS `rgba()` string in JavaScript. +// This reference page doesn't have information about the absolute color space +// that should be used to interpret the RGB value—for example, sRGB, Adobe +// RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB +// color space. When color equality needs to be decided, implementations, +// unless documented otherwise, treat two colors as equal if all their red, +// green, blue, and alpha values each differ by at most `1e-5`. Example (Java): +// import com.google.type.Color; // ... public static java.awt.Color +// fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? +// protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( +// protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } +// public static Color toProto(java.awt.Color color) { float red = (float) +// color.getRed(); float green = (float) color.getGreen(); float blue = (float) +// color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = +// Color .newBuilder() .setRed(red / denominator) .setGreen(green / +// denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if +// (alpha != 255) { result.setAlpha( FloatValue .newBuilder() +// .setValue(((float) alpha) / denominator) .build()); } return +// resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static +// UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float +// green = [protocolor green]; float blue = [protocolor blue]; FloatValue* +// alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != +// nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red +// green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) +// { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green +// blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] +// init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; +// if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } +// [result autorelease]; return result; } // ... Example (JavaScript): // ... +// var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || +// 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue +// || 0.0; var red = Math.floor(redFrac * 255); var green = +// Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if +// (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var +// alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, +// blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); +// }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new +// Number((red << 16) | (green << 8) | blue); var hexString = +// rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var +// resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { +// resultBuilder.push('0'); } resultBuilder.push(hexString); return +// resultBuilder.join(”); }; // ... +type Color struct { + // Alpha: The fraction of this color that should be applied to the pixel. That + // is, the final pixel color is defined by the equation: `pixel color = alpha * + // (this color) + (1.0 - alpha) * (background color)` This means that a value + // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a + // completely transparent color. This uses a wrapper message rather than a + // simple float scalar so that it is possible to distinguish between a default + // value and the value being unset. If omitted, this color object is rendered + // as a solid color (as if the alpha value had been explicitly given a value of + // 1.0). + Alpha float64 `json:"alpha,omitempty"` + // Blue: The amount of blue in the color as a value in the interval [0, 1]. + Blue float64 `json:"blue,omitempty"` + // Green: The amount of green in the color as a value in the interval [0, 1]. + Green float64 `json:"green,omitempty"` + // Red: The amount of red in the color as a value in the interval [0, 1]. + Red float64 `json:"red,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") 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 *Color) MarshalJSON() ([]byte, error) { + type NoMethod Color + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *Color) UnmarshalJSON(data []byte) error { + type NoMethod Color + var s1 struct { + Alpha gensupport.JSONFloat64 `json:"alpha"` + Blue gensupport.JSONFloat64 `json:"blue"` + Green gensupport.JSONFloat64 `json:"green"` + Red gensupport.JSONFloat64 `json:"red"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Alpha = float64(s1.Alpha) + s.Blue = float64(s1.Blue) + s.Green = float64(s1.Green) + s.Red = float64(s1.Red) + return nil +} + +// Date: Represents a whole or partial calendar date, such as a birthday. The +// time of day and time zone are either specified elsewhere or are +// insignificant. The date is relative to the Gregorian Calendar. This can +// represent one of the following: * A full date, with non-zero year, month, +// and day values. * A month and day, with a zero year (for example, an +// anniversary). * A year on its own, with a zero month and a zero day. * A +// year and month, with a zero day (for example, a credit card expiration +// date). Related types: * google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type Date struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, + // or 0 to specify a year by itself or a year and month where the day isn't + // significant. + Day int64 `json:"day,omitempty"` + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without + // a month and day. + Month int64 `json:"month,omitempty"` + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date + // without a year. + Year int64 `json:"year,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. 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. "Day") 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 *Date) MarshalJSON() ([]byte, error) { + type NoMethod Date + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// DayInfo: This object contains the daily forecast information for each day +// requested. +type DayInfo struct { + // Date: The date in UTC at which the pollen forecast data is represented. + Date *Date `json:"date,omitempty"` + // PlantInfo: This list will include (up to) 15 pollen species affecting the + // location specified in the request. + PlantInfo []*PlantInfo `json:"plantInfo,omitempty"` + // PollenTypeInfo: This list will include (up to) three pollen types (grass, + // weed, tree) affecting the location specified in the request. + PollenTypeInfo []*PollenTypeInfo `json:"pollenTypeInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "Date") 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. "Date") 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 *DayInfo) MarshalJSON() ([]byte, error) { + type NoMethod DayInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// HttpBody: Message that represents an arbitrary HTTP body. It should only be +// used for payload formats that can't be represented as JSON, such as raw +// binary or an HTML page. This message can be used both in streaming and +// non-streaming API methods in the request as well as the response. It can be +// used as a top-level request field, which is convenient if one wants to +// extract parameters from either the URL or HTTP template into the request +// fields and also want access to the raw HTTP body. Example: message +// GetResourceRequest { // A unique request id. string request_id = 1; // The +// raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } +// service ResourceService { rpc GetResource(GetResourceRequest) returns +// (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); } Example with streaming methods: service +// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream +// google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns +// (stream google.api.HttpBody); } Use of this type only changes how the +// request and response bodies are handled, all other features will continue to +// work unchanged. +type HttpBody struct { + // ContentType: The HTTP Content-Type header value specifying the content type + // of the body. + ContentType string `json:"contentType,omitempty"` + // Data: The HTTP request/response body as raw binary. + Data string `json:"data,omitempty"` + // Extensions: Application specific response metadata. Must be set in the first + // response for streaming APIs. + Extensions []googleapi.RawMessage `json:"extensions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ContentType") 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. "ContentType") 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 *HttpBody) MarshalJSON() ([]byte, error) { + type NoMethod HttpBody + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// IndexInfo: This object contains data representing specific pollen index +// value, category and description. +type IndexInfo struct { + // Category: Text classification of index numerical score interpretation. The + // index consists of six categories: * 0: "None" * 1: "Very low" * 2: "Low" * + // 3: "Moderate" * 4: "High" * 5: "Very high + Category string `json:"category,omitempty"` + // Code: The index's code. This field represents the index for programming + // purposes by using snake cases instead of spaces. Example: "UPI". + // + // Possible values: + // "INDEX_UNSPECIFIED" - Unspecified index. + // "UPI" - Universal Pollen Index. + Code string `json:"code,omitempty"` + // Color: The color used to represent the Pollen Index numeric score. + Color *Color `json:"color,omitempty"` + // DisplayName: A human readable representation of the index name. Example: + // "Universal Pollen Index". + DisplayName string `json:"displayName,omitempty"` + // IndexDescription: Textual explanation of current index level. + IndexDescription string `json:"indexDescription,omitempty"` + // Value: The index's numeric score. Numeric range is between 0 and 5. + Value int64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Category") 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. "Category") 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 *IndexInfo) MarshalJSON() ([]byte, error) { + type NoMethod IndexInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type LookupForecastResponse struct { + // DailyInfo: Required. This object contains the daily forecast information for + // each day requested. + DailyInfo []*DayInfo `json:"dailyInfo,omitempty"` + // NextPageToken: Optional. The token to retrieve the next page. + NextPageToken string `json:"nextPageToken,omitempty"` + // RegionCode: The ISO_3166-1 alpha-2 code of the country/region corresponding + // to the location provided in the request. This field might be omitted from + // the response if the location provided in the request resides in a disputed + // territory. + RegionCode string `json:"regionCode,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DailyInfo") 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. "DailyInfo") 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 *LookupForecastResponse) MarshalJSON() ([]byte, error) { + type NoMethod LookupForecastResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// PlantDescription: Contains general information about plants, including +// details on their seasonality, special shapes and colors, information about +// allergic cross-reactions, and plant photos. +type PlantDescription struct { + // CrossReaction: Textual description of pollen cross reaction plants. Example: + // Alder, Hazel, Hornbeam, Beech, Willow, and Oak pollen. + CrossReaction string `json:"crossReaction,omitempty"` + // Family: A human readable representation of the plant family name. Example: + // "Betulaceae (the Birch family)". + Family string `json:"family,omitempty"` + // Picture: Link to the picture of the plant. + Picture string `json:"picture,omitempty"` + // PictureCloseup: Link to a closeup picture of the plant. + PictureCloseup string `json:"pictureCloseup,omitempty"` + // Season: Textual list of explanations of seasons where the pollen is active. + // Example: "Late winter, spring". + Season string `json:"season,omitempty"` + // SpecialColors: Textual description of the plants' colors of leaves, bark, + // flowers or seeds that helps identify the plant. + SpecialColors string `json:"specialColors,omitempty"` + // SpecialShapes: Textual description of the plants' shapes of leaves, bark, + // flowers or seeds that helps identify the plant. + SpecialShapes string `json:"specialShapes,omitempty"` + // Type: The plant's pollen type. For example: "GRASS". A list of all available + // codes could be found here. + // + // Possible values: + // "POLLEN_TYPE_UNSPECIFIED" - Unspecified plant type. + // "GRASS" - Grass pollen type. + // "TREE" - Tree pollen type. + // "WEED" - Weed pollen type. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "CrossReaction") 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. "CrossReaction") 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 *PlantDescription) MarshalJSON() ([]byte, error) { + type NoMethod PlantDescription + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// PlantInfo: This object contains the daily information on specific plant. +type PlantInfo struct { + // Code: The plant code name. For example: "COTTONWOOD". A list of all + // available codes could be found here. + // + // Possible values: + // "PLANT_UNSPECIFIED" - Unspecified plant code. + // "ALDER" - Alder is classified as a tree pollen type. + // "ASH" - Ash is classified as a tree pollen type. + // "BIRCH" - Birch is classified as a tree pollen type. + // "COTTONWOOD" - Cottonwood is classified as a tree pollen type. + // "ELM" - Elm is classified as a tree pollen type. + // "MAPLE" - Maple is classified as a tree pollen type. + // "OLIVE" - Olive is classified as a tree pollen type. + // "JUNIPER" - Juniper is classified as a tree pollen type. + // "OAK" - Oak is classified as a tree pollen type. + // "PINE" - Pine is classified as a tree pollen type. + // "CYPRESS_PINE" - Cypress pine is classified as a tree pollen type. + // "HAZEL" - Hazel is classified as a tree pollen type. + // "GRAMINALES" - Graminales is classified as a grass pollen type. + // "RAGWEED" - Ragweed is classified as a weed pollen type. + // "MUGWORT" - Mugwort is classified as a weed pollen type. + Code string `json:"code,omitempty"` + // DisplayName: A human readable representation of the plant name. Example: + // “Cottonwood". + DisplayName string `json:"displayName,omitempty"` + // InSeason: Indication of either the plant is in season or not. + InSeason bool `json:"inSeason,omitempty"` + // IndexInfo: This object contains data representing specific pollen index + // value, category and description. + IndexInfo *IndexInfo `json:"indexInfo,omitempty"` + // PlantDescription: Contains general information about plants, including + // details on their seasonality, special shapes and colors, information about + // allergic cross-reactions, and plant photos. + PlantDescription *PlantDescription `json:"plantDescription,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *PlantInfo) MarshalJSON() ([]byte, error) { + type NoMethod PlantInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// PollenTypeInfo: This object contains the pollen type index and health +// recommendation information on specific pollen type. +type PollenTypeInfo struct { + // Code: The pollen type's code name. For example: "GRASS" + // + // Possible values: + // "POLLEN_TYPE_UNSPECIFIED" - Unspecified plant type. + // "GRASS" - Grass pollen type. + // "TREE" - Tree pollen type. + // "WEED" - Weed pollen type. + Code string `json:"code,omitempty"` + // DisplayName: A human readable representation of the pollen type name. + // Example: "Grass" + DisplayName string `json:"displayName,omitempty"` + // HealthRecommendations: Textual list of explanations, related to health + // insights based on the current pollen levels. + HealthRecommendations []string `json:"healthRecommendations,omitempty"` + // InSeason: Indication whether the plant is in season or not. + InSeason bool `json:"inSeason,omitempty"` + // IndexInfo: Contains the Universal Pollen Index (UPI) data for the pollen + // type. + IndexInfo *IndexInfo `json:"indexInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *PollenTypeInfo) MarshalJSON() ([]byte, error) { + type NoMethod PollenTypeInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +type ForecastLookupCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Lookup: Returns up to 5 days of daily pollen information in more than 65 +// countries, up to 1km resolution. +func (r *ForecastService) Lookup() *ForecastLookupCall { + c := &ForecastLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Days sets the optional parameter "days": Required. A number that indicates +// how many forecast days to request (minimum value 1, maximum value is 5). +func (c *ForecastLookupCall) Days(days int64) *ForecastLookupCall { + c.urlParams_.Set("days", fmt.Sprint(days)) + return c +} + +// LanguageCode sets the optional parameter "languageCode": Allows the client +// to choose the language for the response. If data cannot be provided for that +// language the API uses the closest match. Allowed values rely on the IETF +// BCP-47 standard. Default value is "en". +func (c *ForecastLookupCall) LanguageCode(languageCode string) *ForecastLookupCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// LocationLatitude sets the optional parameter "location.latitude": The +// latitude in degrees. It must be in the range [-90.0, +90.0]. +func (c *ForecastLookupCall) LocationLatitude(locationLatitude float64) *ForecastLookupCall { + c.urlParams_.Set("location.latitude", fmt.Sprint(locationLatitude)) + return c +} + +// LocationLongitude sets the optional parameter "location.longitude": The +// longitude in degrees. It must be in the range [-180.0, +180.0]. +func (c *ForecastLookupCall) LocationLongitude(locationLongitude float64) *ForecastLookupCall { + c.urlParams_.Set("location.longitude", fmt.Sprint(locationLongitude)) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of daily +// info records to return per page. The default and max value is 5 (5 days of +// data). +func (c *ForecastLookupCall) PageSize(pageSize int64) *ForecastLookupCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from a previous daily call. It is used to retrieve the subsequent page. Note +// that when providing a value for the page token all other request parameters +// provided must match the previous call that provided the page token. +func (c *ForecastLookupCall) PageToken(pageToken string) *ForecastLookupCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// PlantsDescription sets the optional parameter "plantsDescription": Contains +// general information about plants, including details on their seasonality, +// special shapes and colors, information about allergic cross-reactions, and +// plant photos. +func (c *ForecastLookupCall) PlantsDescription(plantsDescription bool) *ForecastLookupCall { + c.urlParams_.Set("plantsDescription", fmt.Sprint(plantsDescription)) + 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 *ForecastLookupCall) Fields(s ...googleapi.Field) *ForecastLookupCall { + 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 *ForecastLookupCall) IfNoneMatch(entityTag string) *ForecastLookupCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ForecastLookupCall) Context(ctx context.Context) *ForecastLookupCall { + 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 *ForecastLookupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ForecastLookupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forecast:lookup") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "pollen.forecast.lookup" call. +// Any non-2xx status code is an error. Response headers are in either +// *LookupForecastResponse.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 *ForecastLookupCall) Do(opts ...googleapi.CallOption) (*LookupForecastResponse, 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 := &LookupForecastResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// 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 *ForecastLookupCall) Pages(ctx context.Context, f func(*LookupForecastResponse) 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 MapTypesHeatmapTilesLookupHeatmapTileCall struct { + s *Service + mapType string + zoom int64 + x int64 + y int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// LookupHeatmapTile: Returns a byte array containing the data of the tile PNG +// image. +// +// - mapType: The type of the pollen heatmap. Defines the combination of pollen +// type and index that the map will graphically represent. +// - x: Defines the east-west point in the requested tile. +// - y: Defines the north-south point in the requested tile. +// - zoom: The map's zoom level. Defines how large or small the contents of a +// map appear in a map view. * Zoom level 0 is the entire world in a single +// tile. * Zoom level 1 is the entire world in 4 tiles. * Zoom level 2 is the +// entire world in 16 tiles. * Zoom level 16 is the entire world in 65,536 +// tiles. Allowed values: 0-16. +func (r *MapTypesHeatmapTilesService) LookupHeatmapTile(mapType string, zoom int64, x int64, y int64) *MapTypesHeatmapTilesLookupHeatmapTileCall { + c := &MapTypesHeatmapTilesLookupHeatmapTileCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.mapType = mapType + c.zoom = zoom + c.x = x + c.y = y + 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 *MapTypesHeatmapTilesLookupHeatmapTileCall) Fields(s ...googleapi.Field) *MapTypesHeatmapTilesLookupHeatmapTileCall { + 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 *MapTypesHeatmapTilesLookupHeatmapTileCall) IfNoneMatch(entityTag string) *MapTypesHeatmapTilesLookupHeatmapTileCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *MapTypesHeatmapTilesLookupHeatmapTileCall) Context(ctx context.Context) *MapTypesHeatmapTilesLookupHeatmapTileCall { + 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 *MapTypesHeatmapTilesLookupHeatmapTileCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MapTypesHeatmapTilesLookupHeatmapTileCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "mapType": c.mapType, + "zoom": strconv.FormatInt(c.zoom, 10), + "x": strconv.FormatInt(c.x, 10), + "y": strconv.FormatInt(c.y, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "pollen.mapTypes.heatmapTiles.lookupHeatmapTile" call. +// Any non-2xx status code is an error. Response headers are in either +// *HttpBody.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 *MapTypesHeatmapTilesLookupHeatmapTileCall) Do(opts ...googleapi.CallOption) (*HttpBody, 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 := &HttpBody{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index 055a2821f26..8e4eda8e548 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -1605,7 +1605,7 @@ } } }, - "revision": "20240424", + "revision": "20240529", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -1731,15 +1731,15 @@ "type": "object" }, "CaOptions": { - "description": "Describes values that are relevant in a CA certificate.", + "description": "Describes the X.509 basic constraints extension, per [RFC 5280 section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9)", "id": "CaOptions", "properties": { "isCa": { - "description": "Optional. Refers to the \"CA\" X.509 extension, which is a boolean value. When this value is missing, the extension will be omitted from the CA certificate.", + "description": "Optional. Refers to the \"CA\" boolean field in the X.509 extension. When this value is missing, the basic constraints extension will be omitted from the certificate.", "type": "boolean" }, "maxIssuerPathLength": { - "description": "Optional. Refers to the path length restriction X.509 extension. For a CA certificate, this value describes the depth of subordinate CA certificates that are allowed. If this value is less than 0, the request will fail. If this value is missing, the max path length will be omitted from the CA certificate.", + "description": "Optional. Refers to the path length constraint field in the X.509 extension. For a CA certificate, this value describes the depth of subordinate CA certificates that are allowed. If this value is less than 0, the request will fail. If this value is missing, the max path length will be omitted from the certificate.", "format": "int32", "type": "integer" } @@ -3510,7 +3510,7 @@ }, "caOptions": { "$ref": "CaOptions", - "description": "Optional. Describes options in this X509Parameters that are relevant in a CA certificate." + "description": "Optional. Describes options in this X509Parameters that are relevant in a CA certificate. If not specified, a default basic constraints extension with `is_ca=false` will be added for leaf certificates." }, "keyUsage": { "$ref": "KeyUsage", diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index 3cefd908e26..7b1bc5ba954 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -515,17 +515,18 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// CaOptions: Describes values that are relevant in a CA certificate. +// CaOptions: Describes the X.509 basic constraints extension, per RFC 5280 +// section 4.2.1.9 (https://tools.ietf.org/html/rfc5280#section-4.2.1.9) type CaOptions struct { - // IsCa: Optional. Refers to the "CA" X.509 extension, which is a boolean - // value. When this value is missing, the extension will be omitted from the CA - // certificate. + // IsCa: Optional. Refers to the "CA" boolean field in the X.509 extension. + // When this value is missing, the basic constraints extension will be omitted + // from the certificate. IsCa bool `json:"isCa,omitempty"` - // MaxIssuerPathLength: Optional. Refers to the path length restriction X.509 - // extension. For a CA certificate, this value describes the depth of + // MaxIssuerPathLength: Optional. Refers to the path length constraint field in + // the X.509 extension. For a CA certificate, this value describes the depth of // subordinate CA certificates that are allowed. If this value is less than 0, // the request will fail. If this value is missing, the max path length will be - // omitted from the CA certificate. + // omitted from the certificate. MaxIssuerPathLength int64 `json:"maxIssuerPathLength,omitempty"` // ForceSendFields is a list of field names (e.g. "IsCa") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -2867,7 +2868,8 @@ type X509Parameters struct { // extension in the certificate. AiaOcspServers []string `json:"aiaOcspServers,omitempty"` // CaOptions: Optional. Describes options in this X509Parameters that are - // relevant in a CA certificate. + // relevant in a CA certificate. If not specified, a default basic constraints + // extension with `is_ca=false` will be added for leaf certificates. CaOptions *CaOptions `json:"caOptions,omitempty"` // KeyUsage: Optional. Indicates the intended use for keys that correspond to a // certificate. diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index e63bb69cc02..0ba24db5e88 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -138,7 +138,7 @@ "type": "string" }, "enableAttributeSuggestions": { - "description": "If true, attribute suggestions are enabled and provided in response. This field is only available for \"cloud-retail\" dataset.", + "description": "If true, attribute suggestions are enabled and provided in the response. This field is only available for the \"cloud-retail\" dataset.", "location": "query", "type": "boolean" }, @@ -2092,7 +2092,7 @@ } } }, - "revision": "20240509", + "revision": "20240610", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6517,23 +6517,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata": { - "description": "Common metadata related to the progress of the operations.", - "id": "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudRetailV2betaCreateModelMetadata": { "description": "Metadata associated with a create operation.", "id": "GoogleCloudRetailV2betaCreateModelMetadata", @@ -6751,89 +6734,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2betaMerchantCenterAccountLink": { - "description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", - "id": "GoogleCloudRetailV2betaMerchantCenterAccountLink", - "properties": { - "branchId": { - "description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", - "type": "string" - }, - "feedFilters": { - "description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", - "items": { - "$ref": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter" - }, - "type": "array" - }, - "feedLabel": { - "description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", - "type": "string" - }, - "id": { - "description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", - "readOnly": true, - "type": "string" - }, - "languageCode": { - "description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", - "type": "string" - }, - "merchantCenterAccountId": { - "description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", - "readOnly": true, - "type": "string" - }, - "projectId": { - "description": "Output only. Google Cloud project ID.", - "readOnly": true, - "type": "string" - }, - "source": { - "description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", - "type": "string" - }, - "state": { - "description": "Output only. Represents the state of the link.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "ACTIVE", - "FAILED" - ], - "enumDescriptions": [ - "Default value.", - "Link is created and LRO is not complete.", - "Link is active.", - "Link creation failed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter": { - "description": "Merchant Center Feed filter criterion.", - "id": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter", - "properties": { - "primaryFeedId": { - "description": "Merchant Center primary feed ID.", - "format": "int64", - "type": "string" - }, - "primaryFeedName": { - "description": "Merchant Center primary feed name. The name is used for the display purposes only.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudRetailV2betaModel": { "description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", "id": "GoogleCloudRetailV2betaModel", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index f8330a7cca3..3103b4d5be3 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -7166,32 +7166,6 @@ func (s *GoogleCloudRetailV2betaBigQueryOutputResult) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata: Common -// metadata related to the progress of the operations. -type GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - 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 *GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudRetailV2betaCreateModelMetadata: Metadata associated with a // create operation. type GoogleCloudRetailV2betaCreateModelMetadata struct { @@ -7526,105 +7500,6 @@ func (s *GoogleCloudRetailV2betaImportUserEventsResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaMerchantCenterAccountLink: Represents a link between -// a Merchant Center account and a branch. After a link is established, -// products from the linked Merchant Center account are streamed to the linked -// branch. -type GoogleCloudRetailV2betaMerchantCenterAccountLink struct { - // BranchId: Required. The branch ID (e.g. 0/1/2) within the catalog that - // products from merchant_center_account_id are streamed to. When updating this - // field, an empty value will use the currently configured default branch. - // However, changing the default branch later on won't change the linked branch - // here. A single branch ID can only have one linked Merchant Center account - // ID. - BranchId string `json:"branchId,omitempty"` - // FeedFilters: Criteria for the Merchant Center feeds to be ingested via the - // link. All offers will be ingested if the list is empty. Otherwise the offers - // will be ingested from selected feeds. - FeedFilters []*GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter `json:"feedFilters,omitempty"` - // FeedLabel: The FeedLabel used to perform filtering. Note: this replaces - // region_id - // (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). - // Example value: `US`. Example value: `FeedLabel1`. - FeedLabel string `json:"feedLabel,omitempty"` - // Id: Output only. Immutable. MerchantCenterAccountLink identifier, which is - // the final component of name. This field is auto generated and follows the - // convention: `BranchId_MerchantCenterAccountId`. - // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi - // nks/id_1`. - Id string `json:"id,omitempty"` - // LanguageCode: Language of the title/description and other string attributes. - // Use language tags defined by BCP 47 - // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies - // the language of offers in Merchant Center that will be accepted. If empty, - // no language filtering will be performed. Example value: `en`. - LanguageCode string `json:"languageCode,omitempty"` - // MerchantCenterAccountId: Required. The linked Merchant center account id - // (https://developers.google.com/shopping-content/guides/accountstatuses). The - // account must be a standalone account or a sub-account of a MCA. - MerchantCenterAccountId int64 `json:"merchantCenterAccountId,omitempty,string"` - // Name: Output only. Immutable. Full resource name of the Merchant Center - // Account Link, such as - // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi - // nks/merchant_center_account_link`. - Name string `json:"name,omitempty"` - // ProjectId: Output only. Google Cloud project ID. - ProjectId string `json:"projectId,omitempty"` - // Source: Optional. An optional arbitrary string that could be used as a tag - // for tracking link source. - Source string `json:"source,omitempty"` - // State: Output only. Represents the state of the link. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. - // "PENDING" - Link is created and LRO is not complete. - // "ACTIVE" - Link is active. - // "FAILED" - Link creation failed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "BranchId") 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. "BranchId") 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 *GoogleCloudRetailV2betaMerchantCenterAccountLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLink - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter: -// Merchant Center Feed filter criterion. -type GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter struct { - // PrimaryFeedId: Merchant Center primary feed ID. - PrimaryFeedId int64 `json:"primaryFeedId,omitempty,string"` - // PrimaryFeedName: Merchant Center primary feed name. The name is used for the - // display purposes only. - PrimaryFeedName string `json:"primaryFeedName,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrimaryFeedId") 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. "PrimaryFeedId") 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 *GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudRetailV2betaModel: Metadata that describes the training and // serving parameters of a Model. A Model can be associated with a // ServingConfig and then queried through the Predict API. @@ -8294,8 +8169,8 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) DeviceType(deviceType strin // EnableAttributeSuggestions sets the optional parameter // "enableAttributeSuggestions": If true, attribute suggestions are enabled and -// provided in response. This field is only available for "cloud-retail" -// dataset. +// provided in the response. This field is only available for the +// "cloud-retail" dataset. func (c *ProjectsLocationsCatalogsCompleteQueryCall) EnableAttributeSuggestions(enableAttributeSuggestions bool) *ProjectsLocationsCatalogsCompleteQueryCall { c.urlParams_.Set("enableAttributeSuggestions", fmt.Sprint(enableAttributeSuggestions)) return c diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index d0a863eeb04..8abed3101d9 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -286,7 +286,7 @@ "type": "string" }, "updateMask": { - "description": "Indicates which fields in the provided LoggingConfig to update. The following are the only supported fields: * LoggingConfig.default_log_generation_rule * LoggingConfig.per_service_log_generation_rules If not set, all supported fields are updated.", + "description": "Indicates which fields in the provided LoggingConfig to update. The following are the only supported fields: * LoggingConfig.default_log_generation_rule * LoggingConfig.service_log_generation_rules If not set, all supported fields are updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -336,7 +336,7 @@ "type": "string" }, "enableAttributeSuggestions": { - "description": "If true, attribute suggestions are enabled and provided in response. This field is only available for \"cloud-retail\" dataset.", + "description": "If true, attribute suggestions are enabled and provided in the response. This field is only available for the \"cloud-retail\" dataset.", "location": "query", "type": "boolean" }, @@ -806,7 +806,7 @@ ] }, "list": { - "description": "Lists all Branchs under the specified parent Catalog.", + "description": "Lists all instances of Branch under the specified parent Catalog.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches", "httpMethod": "GET", "id": "retail.projects.locations.catalogs.branches.list", @@ -2557,7 +2557,7 @@ } } }, - "revision": "20240509", + "revision": "20240610", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3579,7 +3579,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaBranch": { - "description": "A data branch that stores Products.", + "description": "A data branch that stores all instances of Products.", "id": "GoogleCloudRetailV2alphaBranch", "properties": { "displayName": { @@ -7520,23 +7520,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata": { - "description": "Common metadata related to the progress of the operations.", - "id": "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudRetailV2betaCreateModelMetadata": { "description": "Metadata associated with a create operation.", "id": "GoogleCloudRetailV2betaCreateModelMetadata", @@ -7754,89 +7737,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2betaMerchantCenterAccountLink": { - "description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", - "id": "GoogleCloudRetailV2betaMerchantCenterAccountLink", - "properties": { - "branchId": { - "description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", - "type": "string" - }, - "feedFilters": { - "description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", - "items": { - "$ref": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter" - }, - "type": "array" - }, - "feedLabel": { - "description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", - "type": "string" - }, - "id": { - "description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", - "readOnly": true, - "type": "string" - }, - "languageCode": { - "description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", - "type": "string" - }, - "merchantCenterAccountId": { - "description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", - "readOnly": true, - "type": "string" - }, - "projectId": { - "description": "Output only. Google Cloud project ID.", - "readOnly": true, - "type": "string" - }, - "source": { - "description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", - "type": "string" - }, - "state": { - "description": "Output only. Represents the state of the link.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "ACTIVE", - "FAILED" - ], - "enumDescriptions": [ - "Default value.", - "Link is created and LRO is not complete.", - "Link is active.", - "Link creation failed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter": { - "description": "Merchant Center Feed filter criterion.", - "id": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter", - "properties": { - "primaryFeedId": { - "description": "Merchant Center primary feed ID.", - "format": "int64", - "type": "string" - }, - "primaryFeedName": { - "description": "Merchant Center primary feed name. The name is used for the display purposes only.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudRetailV2betaModel": { "description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", "id": "GoogleCloudRetailV2betaModel", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 8147beeabfa..ee471378251 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -1881,7 +1881,8 @@ func (s *GoogleCloudRetailV2alphaBigQuerySource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2alphaBranch: A data branch that stores Products. +// GoogleCloudRetailV2alphaBranch: A data branch that stores all instances of +// Products. type GoogleCloudRetailV2alphaBranch struct { // DisplayName: Output only. Human readable name of the branch to display in // the UI. @@ -8005,32 +8006,6 @@ func (s *GoogleCloudRetailV2betaBigQueryOutputResult) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata: Common -// metadata related to the progress of the operations. -type GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - 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 *GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudRetailV2betaCreateModelMetadata: Metadata associated with a // create operation. type GoogleCloudRetailV2betaCreateModelMetadata struct { @@ -8365,105 +8340,6 @@ func (s *GoogleCloudRetailV2betaImportUserEventsResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaMerchantCenterAccountLink: Represents a link between -// a Merchant Center account and a branch. After a link is established, -// products from the linked Merchant Center account are streamed to the linked -// branch. -type GoogleCloudRetailV2betaMerchantCenterAccountLink struct { - // BranchId: Required. The branch ID (e.g. 0/1/2) within the catalog that - // products from merchant_center_account_id are streamed to. When updating this - // field, an empty value will use the currently configured default branch. - // However, changing the default branch later on won't change the linked branch - // here. A single branch ID can only have one linked Merchant Center account - // ID. - BranchId string `json:"branchId,omitempty"` - // FeedFilters: Criteria for the Merchant Center feeds to be ingested via the - // link. All offers will be ingested if the list is empty. Otherwise the offers - // will be ingested from selected feeds. - FeedFilters []*GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter `json:"feedFilters,omitempty"` - // FeedLabel: The FeedLabel used to perform filtering. Note: this replaces - // region_id - // (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). - // Example value: `US`. Example value: `FeedLabel1`. - FeedLabel string `json:"feedLabel,omitempty"` - // Id: Output only. Immutable. MerchantCenterAccountLink identifier, which is - // the final component of name. This field is auto generated and follows the - // convention: `BranchId_MerchantCenterAccountId`. - // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi - // nks/id_1`. - Id string `json:"id,omitempty"` - // LanguageCode: Language of the title/description and other string attributes. - // Use language tags defined by BCP 47 - // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies - // the language of offers in Merchant Center that will be accepted. If empty, - // no language filtering will be performed. Example value: `en`. - LanguageCode string `json:"languageCode,omitempty"` - // MerchantCenterAccountId: Required. The linked Merchant center account id - // (https://developers.google.com/shopping-content/guides/accountstatuses). The - // account must be a standalone account or a sub-account of a MCA. - MerchantCenterAccountId int64 `json:"merchantCenterAccountId,omitempty,string"` - // Name: Output only. Immutable. Full resource name of the Merchant Center - // Account Link, such as - // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi - // nks/merchant_center_account_link`. - Name string `json:"name,omitempty"` - // ProjectId: Output only. Google Cloud project ID. - ProjectId string `json:"projectId,omitempty"` - // Source: Optional. An optional arbitrary string that could be used as a tag - // for tracking link source. - Source string `json:"source,omitempty"` - // State: Output only. Represents the state of the link. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. - // "PENDING" - Link is created and LRO is not complete. - // "ACTIVE" - Link is active. - // "FAILED" - Link creation failed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "BranchId") 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. "BranchId") 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 *GoogleCloudRetailV2betaMerchantCenterAccountLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLink - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter: -// Merchant Center Feed filter criterion. -type GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter struct { - // PrimaryFeedId: Merchant Center primary feed ID. - PrimaryFeedId int64 `json:"primaryFeedId,omitempty,string"` - // PrimaryFeedName: Merchant Center primary feed name. The name is used for the - // display purposes only. - PrimaryFeedName string `json:"primaryFeedName,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrimaryFeedId") 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. "PrimaryFeedId") 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 *GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudRetailV2betaModel: Metadata that describes the training and // serving parameters of a Model. A Model can be associated with a // ServingConfig and then queried through the Predict API. @@ -9763,8 +9639,8 @@ func (r *ProjectsService) UpdateLoggingConfig(name string, googlecloudretailv2al // UpdateMask sets the optional parameter "updateMask": Indicates which fields // in the provided LoggingConfig to update. The following are the only // supported fields: * LoggingConfig.default_log_generation_rule * -// LoggingConfig.per_service_log_generation_rules If not set, all supported -// fields are updated. +// LoggingConfig.service_log_generation_rules If not set, all supported fields +// are updated. func (c *ProjectsUpdateLoggingConfigCall) UpdateMask(updateMask string) *ProjectsUpdateLoggingConfigCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -9901,8 +9777,8 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) DeviceType(deviceType strin // EnableAttributeSuggestions sets the optional parameter // "enableAttributeSuggestions": If true, attribute suggestions are enabled and -// provided in response. This field is only available for "cloud-retail" -// dataset. +// provided in the response. This field is only available for the +// "cloud-retail" dataset. func (c *ProjectsLocationsCatalogsCompleteQueryCall) EnableAttributeSuggestions(enableAttributeSuggestions bool) *ProjectsLocationsCatalogsCompleteQueryCall { c.urlParams_.Set("enableAttributeSuggestions", fmt.Sprint(enableAttributeSuggestions)) return c @@ -11668,7 +11544,7 @@ type ProjectsLocationsCatalogsBranchesListCall struct { header_ http.Header } -// List: Lists all Branchs under the specified parent Catalog. +// List: Lists all instances of Branch under the specified parent Catalog. // // - parent: The parent catalog resource name. func (r *ProjectsLocationsCatalogsBranchesService) List(parent string) *ProjectsLocationsCatalogsBranchesListCall { diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 77d8241425f..c34665b0c68 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -138,7 +138,7 @@ "type": "string" }, "enableAttributeSuggestions": { - "description": "If true, attribute suggestions are enabled and provided in response. This field is only available for \"cloud-retail\" dataset.", + "description": "If true, attribute suggestions are enabled and provided in the response. This field is only available for the \"cloud-retail\" dataset.", "location": "query", "type": "boolean" }, @@ -2120,7 +2120,7 @@ } } }, - "revision": "20240509", + "revision": "20240610", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4454,23 +4454,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata": { - "description": "Common metadata related to the progress of the operations.", - "id": "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudRetailV2betaCreateModelMetadata": { "description": "Metadata associated with a create operation.", "id": "GoogleCloudRetailV2betaCreateModelMetadata", @@ -5061,89 +5044,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2betaMerchantCenterAccountLink": { - "description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", - "id": "GoogleCloudRetailV2betaMerchantCenterAccountLink", - "properties": { - "branchId": { - "description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", - "type": "string" - }, - "feedFilters": { - "description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", - "items": { - "$ref": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter" - }, - "type": "array" - }, - "feedLabel": { - "description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", - "type": "string" - }, - "id": { - "description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", - "readOnly": true, - "type": "string" - }, - "languageCode": { - "description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", - "type": "string" - }, - "merchantCenterAccountId": { - "description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", - "readOnly": true, - "type": "string" - }, - "projectId": { - "description": "Output only. Google Cloud project ID.", - "readOnly": true, - "type": "string" - }, - "source": { - "description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", - "type": "string" - }, - "state": { - "description": "Output only. Represents the state of the link.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "ACTIVE", - "FAILED" - ], - "enumDescriptions": [ - "Default value.", - "Link is created and LRO is not complete.", - "Link is active.", - "Link creation failed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter": { - "description": "Merchant Center Feed filter criterion.", - "id": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter", - "properties": { - "primaryFeedId": { - "description": "Merchant Center primary feed ID.", - "format": "int64", - "type": "string" - }, - "primaryFeedName": { - "description": "Merchant Center primary feed name. The name is used for the display purposes only.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudRetailV2betaMerchantCenterFeedFilter": { "description": "Merchant Center Feed filter criterion.", "id": "GoogleCloudRetailV2betaMerchantCenterFeedFilter", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 6b6660791bd..727a343ea48 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -3696,32 +3696,6 @@ func (s *GoogleCloudRetailV2betaControl) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata: Common -// metadata related to the progress of the operations. -type GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - 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 *GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudRetailV2betaCreateModelMetadata: Metadata associated with a // create operation. type GoogleCloudRetailV2betaCreateModelMetadata struct { @@ -4704,105 +4678,6 @@ func (s *GoogleCloudRetailV2betaLocalInventory) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaMerchantCenterAccountLink: Represents a link between -// a Merchant Center account and a branch. After a link is established, -// products from the linked Merchant Center account are streamed to the linked -// branch. -type GoogleCloudRetailV2betaMerchantCenterAccountLink struct { - // BranchId: Required. The branch ID (e.g. 0/1/2) within the catalog that - // products from merchant_center_account_id are streamed to. When updating this - // field, an empty value will use the currently configured default branch. - // However, changing the default branch later on won't change the linked branch - // here. A single branch ID can only have one linked Merchant Center account - // ID. - BranchId string `json:"branchId,omitempty"` - // FeedFilters: Criteria for the Merchant Center feeds to be ingested via the - // link. All offers will be ingested if the list is empty. Otherwise the offers - // will be ingested from selected feeds. - FeedFilters []*GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter `json:"feedFilters,omitempty"` - // FeedLabel: The FeedLabel used to perform filtering. Note: this replaces - // region_id - // (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). - // Example value: `US`. Example value: `FeedLabel1`. - FeedLabel string `json:"feedLabel,omitempty"` - // Id: Output only. Immutable. MerchantCenterAccountLink identifier, which is - // the final component of name. This field is auto generated and follows the - // convention: `BranchId_MerchantCenterAccountId`. - // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi - // nks/id_1`. - Id string `json:"id,omitempty"` - // LanguageCode: Language of the title/description and other string attributes. - // Use language tags defined by BCP 47 - // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies - // the language of offers in Merchant Center that will be accepted. If empty, - // no language filtering will be performed. Example value: `en`. - LanguageCode string `json:"languageCode,omitempty"` - // MerchantCenterAccountId: Required. The linked Merchant center account id - // (https://developers.google.com/shopping-content/guides/accountstatuses). The - // account must be a standalone account or a sub-account of a MCA. - MerchantCenterAccountId int64 `json:"merchantCenterAccountId,omitempty,string"` - // Name: Output only. Immutable. Full resource name of the Merchant Center - // Account Link, such as - // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi - // nks/merchant_center_account_link`. - Name string `json:"name,omitempty"` - // ProjectId: Output only. Google Cloud project ID. - ProjectId string `json:"projectId,omitempty"` - // Source: Optional. An optional arbitrary string that could be used as a tag - // for tracking link source. - Source string `json:"source,omitempty"` - // State: Output only. Represents the state of the link. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. - // "PENDING" - Link is created and LRO is not complete. - // "ACTIVE" - Link is active. - // "FAILED" - Link creation failed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "BranchId") 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. "BranchId") 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 *GoogleCloudRetailV2betaMerchantCenterAccountLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLink - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter: -// Merchant Center Feed filter criterion. -type GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter struct { - // PrimaryFeedId: Merchant Center primary feed ID. - PrimaryFeedId int64 `json:"primaryFeedId,omitempty,string"` - // PrimaryFeedName: Merchant Center primary feed name. The name is used for the - // display purposes only. - PrimaryFeedName string `json:"primaryFeedName,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrimaryFeedId") 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. "PrimaryFeedId") 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 *GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudRetailV2betaMerchantCenterFeedFilter: Merchant Center Feed filter // criterion. type GoogleCloudRetailV2betaMerchantCenterFeedFilter struct { @@ -8482,8 +8357,8 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) DeviceType(deviceType strin // EnableAttributeSuggestions sets the optional parameter // "enableAttributeSuggestions": If true, attribute suggestions are enabled and -// provided in response. This field is only available for "cloud-retail" -// dataset. +// provided in the response. This field is only available for the +// "cloud-retail" dataset. func (c *ProjectsLocationsCatalogsCompleteQueryCall) EnableAttributeSuggestions(enableAttributeSuggestions bool) *ProjectsLocationsCatalogsCompleteQueryCall { c.urlParams_.Set("enableAttributeSuggestions", fmt.Sprint(enableAttributeSuggestions)) return c diff --git a/run/v2/run-api.json b/run/v2/run-api.json index f97aa68c862..2942fe2ff5a 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1469,7 +1469,7 @@ } } }, - "revision": "20240524", + "revision": "20240607", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -2141,7 +2141,7 @@ "id": "GoogleCloudRunV2GCSVolumeSource", "properties": { "bucket": { - "description": "Cloud Storage Bucket name.", + "description": "Cloud Storage Bucket name. TODO (b/344678062) Fix the error validation once dynamic mounting is public.", "type": "string" }, "readOnly": { diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 57a8c7798b0..b0ac182b37b 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -989,7 +989,8 @@ func (s *GoogleCloudRunV2ExportStatusResponse) MarshalJSON() ([]byte, error) { // GoogleCloudRunV2GCSVolumeSource: Represents a volume backed by a Cloud // Storage bucket using Cloud Storage FUSE. type GoogleCloudRunV2GCSVolumeSource struct { - // Bucket: Cloud Storage Bucket name. + // Bucket: Cloud Storage Bucket name. TODO (b/344678062) Fix the error + // validation once dynamic mounting is public. Bucket string `json:"bucket,omitempty"` // ReadOnly: If true, the volume will be mounted as read only for all mounts. ReadOnly bool `json:"readOnly,omitempty"` diff --git a/servicecontrol/v1/servicecontrol-api.json b/servicecontrol/v1/servicecontrol-api.json index b64100dd900..b9b8a03321d 100644 --- a/servicecontrol/v1/servicecontrol-api.json +++ b/servicecontrol/v1/servicecontrol-api.json @@ -197,7 +197,7 @@ } } }, - "revision": "20240524", + "revision": "20240531", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "AllocateInfo": { @@ -1290,7 +1290,7 @@ "type": "any" }, "deprecated": true, - "description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.", + "description": "Optional. Deprecated. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request.", "type": "object" }, "resourceTags": { @@ -1298,7 +1298,7 @@ "type": "string" }, "deprecated": true, - "description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.", + "description": "Optional. Deprecated. Tags referenced on the resource at the time of evaluation.", "type": "object" }, "resourceType": { diff --git a/servicecontrol/v1/servicecontrol-gen.go b/servicecontrol/v1/servicecontrol-gen.go index 3b71642ed6b..d9b8bebdc53 100644 --- a/servicecontrol/v1/servicecontrol-gen.go +++ b/servicecontrol/v1/servicecontrol-gen.go @@ -1539,17 +1539,12 @@ func (s *Operation) MarshalJSON() ([]byte, error) { // OrgPolicyViolationInfo: Represents OrgPolicy Violation information. type OrgPolicyViolationInfo struct { - // Payload: Optional. Resource payload that is currently in scope and is - // subjected to orgpolicy conditions. This payload may be the subset of the - // actual Resource that may come in the request. This payload should not - // contain any core content. + // Payload: Optional. Deprecated. Resource payload that is currently in scope + // and is subjected to orgpolicy conditions. This payload may be the subset of + // the actual Resource that may come in the request. Payload googleapi.RawMessage `json:"payload,omitempty"` - // ResourceTags: Optional. Tags referenced on the resource at the time of - // evaluation. These also include the federated tags, if they are supplied in - // the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of - // now. These tags are the Cloud tags that are available on the resource during - // the policy evaluation and will be available as part of the OrgPolicy check - // response for logging purposes. + // ResourceTags: Optional. Deprecated. Tags referenced on the resource at the + // time of evaluation. ResourceTags map[string]string `json:"resourceTags,omitempty"` // ResourceType: Optional. Resource type that the orgpolicy is checked against. // Example: compute.googleapis.com/Instance, store.googleapis.com/bucket diff --git a/servicecontrol/v2/servicecontrol-api.json b/servicecontrol/v2/servicecontrol-api.json index 13e80b31ad9..c073815bbd9 100644 --- a/servicecontrol/v2/servicecontrol-api.json +++ b/servicecontrol/v2/servicecontrol-api.json @@ -169,7 +169,7 @@ } } }, - "revision": "20240524", + "revision": "20240531", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "Api": { @@ -530,7 +530,7 @@ "type": "any" }, "deprecated": true, - "description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.", + "description": "Optional. Deprecated. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request.", "type": "object" }, "resourceTags": { @@ -538,7 +538,7 @@ "type": "string" }, "deprecated": true, - "description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.", + "description": "Optional. Deprecated. Tags referenced on the resource at the time of evaluation.", "type": "object" }, "resourceType": { diff --git a/servicecontrol/v2/servicecontrol-gen.go b/servicecontrol/v2/servicecontrol-gen.go index 6d25d8852a9..e68cc48b311 100644 --- a/servicecontrol/v2/servicecontrol-gen.go +++ b/servicecontrol/v2/servicecontrol-gen.go @@ -600,17 +600,12 @@ func (s *FirstPartyPrincipal) MarshalJSON() ([]byte, error) { // OrgPolicyViolationInfo: Represents OrgPolicy Violation information. type OrgPolicyViolationInfo struct { - // Payload: Optional. Resource payload that is currently in scope and is - // subjected to orgpolicy conditions. This payload may be the subset of the - // actual Resource that may come in the request. This payload should not - // contain any core content. + // Payload: Optional. Deprecated. Resource payload that is currently in scope + // and is subjected to orgpolicy conditions. This payload may be the subset of + // the actual Resource that may come in the request. Payload googleapi.RawMessage `json:"payload,omitempty"` - // ResourceTags: Optional. Tags referenced on the resource at the time of - // evaluation. These also include the federated tags, if they are supplied in - // the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of - // now. These tags are the Cloud tags that are available on the resource during - // the policy evaluation and will be available as part of the OrgPolicy check - // response for logging purposes. + // ResourceTags: Optional. Deprecated. Tags referenced on the resource at the + // time of evaluation. ResourceTags map[string]string `json:"resourceTags,omitempty"` // ResourceType: Optional. Resource type that the orgpolicy is checked against. // Example: compute.googleapis.com/Instance, store.googleapis.com/bucket diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index bd183abc69e..3bb2cc61c41 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -830,7 +830,7 @@ } } }, - "revision": "20240426", + "revision": "20240607", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -2043,7 +2043,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index e7dee1acb6b..51b9dbdf0d5 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -2010,12 +2010,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// HttpRule: # gRPC Transcoding gRPC Transcoding is a feature for mapping -// between a gRPC method and one or more HTTP REST endpoints. It allows -// developers to build a single API service that supports both gRPC APIs and -// REST APIs. Many systems, including Google APIs -// (https://github.com/googleapis/googleapis), Cloud Endpoints -// (https://cloud.google.com/endpoints), gRPC Gateway +// HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between +// a gRPC method and one or more HTTP REST endpoints. It allows developers to +// build a single API service that supports both gRPC APIs and REST APIs. Many +// systems, including Google APIs (https://github.com/googleapis/googleapis), +// Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway // (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy // (https://github.com/envoyproxy/envoy) proxy support this feature and use it // for large scale production services. `HttpRule` defines the schema of the @@ -2032,24 +2031,23 @@ func (s *Http) MarshalJSON() ([]byte, error) { // (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } // message GetMessageRequest { string name = 1; // Mapped to URL path. } // message Message { string text = 1; // The resource content. } This enables -// an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456` | `GetMessage(name: "messages/123456")` Any fields in -// the request message which are not bound by the path template automatically -// become HTTP query parameters if there is no HTTP request body. For example: -// service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message +// an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - +// gRPC: `GetMessage(name: "messages/123456")` Any fields in the request +// message which are not bound by the path template automatically become HTTP +// query parameters if there is no HTTP request body. For example: service +// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option +// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message // GetMessageRequest { message SubMessage { string subfield = 1; } string // message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL // query parameter `revision`. SubMessage sub = 3; // Mapped to URL query // parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as -// below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: -// "123456" revision: 2 sub: SubMessage(subfield: "foo"))` Note that fields -// which are mapped to URL query parameters must have a primitive type or a -// repeated primitive type or a non-repeated message type. In the case of a -// repeated type, the parameter can be repeated in the URL as -// `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as +// below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC: +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` Note that fields which are mapped to URL query parameters must have +// a primitive type or a repeated primitive type or a non-repeated message +// type. In the case of a repeated type, the parameter can be repeated in the +// URL as `...?param=A¶m=B`. In the case of a message type, each field of +// the message is mapped to a separate parameter, such as // `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, // the `body` field specifies the mapping. Consider a REST update method on the // message resource collection: service Messaging { rpc @@ -2058,18 +2056,18 @@ func (s *Http) MarshalJSON() ([]byte, error) { // } } message UpdateMessageRequest { string message_id = 1; // mapped to the // URL Message message = 2; // mapped to the body } The following HTTP JSON to // RPC mapping is enabled, where the representation of the JSON in the request -// body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH -// /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" -// message { text: "Hi!" })` The special name `*` can be used in the body -// mapping to define that every field not bound by the path template should be -// mapped to the request body. This enables the following alternative +// body is determined by protos JSON encoding: - HTTP: `PATCH +// /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` The special name `*` can be used in the +// body mapping to define that every field not bound by the path template +// should be mapped to the request body. This enables the following alternative // definition of the update method: service Messaging { rpc // UpdateMessage(Message) returns (Message) { option (google.api.http) = { // patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string // message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is -// enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { "text": "Hi!" -// }` | `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using -// `*` in the body mapping, it is not possible to have HTTP parameters, as all +// enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC: +// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*` +// in the body mapping, it is not possible to have HTTP parameters, as all // fields not bound by the path end in the body. This makes this option more // rarely used in practice when defining REST APIs. The common usage of `*` is // in custom methods which don't use the URL at all for transferring data. It @@ -2079,42 +2077,42 @@ func (s *Http) MarshalJSON() ([]byte, error) { // { get: "/v1/messages/{message_id}" additional_bindings { get: // "/v1/users/{user_id}/messages/{message_id}" } }; } } message // GetMessageRequest { string message_id = 1; string user_id = 2; } This -// enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -// -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` ## Rules for HTTP mapping 1. Leaf request fields (recursive -// expansion nested messages in the request message) are classified into three -// categories: - Fields referred by the path template. They are passed via the -// URL path. - Fields referred by the HttpRule.body. They are passed via the -// HTTP request body. - All other fields are passed via the URL query -// parameters, and the parameter name is the field path in the request message. -// A repeated field can be represented as multiple query parameters under the -// same name. 2. If HttpRule.body is "*", there is no URL query parameter, all -// fields are passed via URL path and HTTP request body. 3. If HttpRule.body is -// omitted, there is no HTTP request body, all fields are passed via URL path -// and URL query parameters. ### Path template syntax Template = "/" Segments [ -// Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" | "**" | LITERAL -// | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" ; FieldPath = -// IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` matches a single -// URL path segment. The syntax `**` matches zero or more URL path segments, -// which must be the last part of the URL path except the `Verb`. The syntax -// `Variable` matches part of the URL path as specified by its template. A -// variable template must not contain other variables. If a variable matches a -// single path segment, its template may be omitted, e.g. `{var}` is equivalent -// to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If -// the `LITERAL` contains any reserved character, such characters should be -// percent-encoded before the matching. If a variable contains exactly one path -// segment, such as "{var}" or "{var=*}", when such a variable is expanded -// into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` -// are percent-encoded. The server side does the reverse decoding. Such -// variables show up in the Discovery Document +// enables the following two alternative HTTP JSON to RPC mappings: - HTTP: +// `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP: +// `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me" +// message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields +// (recursive expansion nested messages in the request message) are classified +// into three categories: - Fields referred by the path template. They are +// passed via the URL path. - Fields referred by the HttpRule.body. They are +// passed via the HTTP request body. - All other fields are passed via the URL +// query parameters, and the parameter name is the field path in the request +// message. A repeated field can be represented as multiple query parameters +// under the same name. 2. If HttpRule.body is "*", there is no URL query +// parameter, all fields are passed via URL path and HTTP request body. 3. If +// HttpRule.body is omitted, there is no HTTP request body, all fields are +// passed via URL path and URL query parameters. Path template syntax Template +// = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" +// | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" +// ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` +// matches a single URL path segment. The syntax `**` matches zero or more URL +// path segments, which must be the last part of the URL path except the +// `Verb`. The syntax `Variable` matches part of the URL path as specified by +// its template. A variable template must not contain other variables. If a +// variable matches a single path segment, its template may be omitted, e.g. +// `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal +// text in the URL path. If the `LITERAL` contains any reserved character, such +// characters should be percent-encoded before the matching. If a variable +// contains exactly one path segment, such as "{var}" or "{var=*}", when +// such a variable is expanded into a URL path on the client side, all +// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side +// does the reverse decoding. Such variables show up in the Discovery Document // (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a // variable contains multiple path segments, such as "{var=foo/*}" or // "{var=**}", when such a variable is expanded into a URL path on the client // side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The // server side does the reverse decoding, except "%2F" and "%2f" are left // unchanged. Such variables show up in the Discovery Document -// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## +// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. // Using gRPC API Service Configuration gRPC API Service Configuration (service // config) is a configuration language for configuring a gRPC service to become // a user-facing product. The service config is simply the YAML representation @@ -2124,12 +2122,12 @@ func (s *Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example: http: -// rules: # Selects a gRPC method and applies HttpRule to it. - selector: +// override any matching transcoding configuration in the proto. Example below +// selects a gRPC method and applies HttpRule to it. http: rules: - selector: // example.v1.Messaging.GetMessage get: -// /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC -// Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON -// conversion must follow the proto3 specification +// /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding +// is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion +// must follow the proto3 specification // (https://developers.google.com/protocol-buffers/docs/proto3#json). While the // single segment variable follows the semantics of RFC 6570 // (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, diff --git a/tagmanager/v2/tagmanager-api.json b/tagmanager/v2/tagmanager-api.json index f35e227c292..7d5c3a28b27 100644 --- a/tagmanager/v2/tagmanager-api.json +++ b/tagmanager/v2/tagmanager-api.json @@ -3890,7 +3890,7 @@ } } }, - "revision": "20230926", + "revision": "20240610", "rootUrl": "https://tagmanager.googleapis.com/", "schemas": { "Account": { @@ -4353,7 +4353,7 @@ "", "", "", - "NOTE(lanzone): When defining a ConditionType here, don't forget to also define a matching PredicateType (in condition.proto)." + "" ], "type": "string" } diff --git a/tagmanager/v2/tagmanager-gen.go b/tagmanager/v2/tagmanager-gen.go index f814ebdfed4..26379cc7024 100644 --- a/tagmanager/v2/tagmanager-gen.go +++ b/tagmanager/v2/tagmanager-gen.go @@ -737,8 +737,7 @@ type Condition struct { // "less" // "lessOrEquals" // "cssSelector" - // "urlMatches" - NOTE(lanzone): When defining a ConditionType here, don't - // forget to also define a matching PredicateType (in condition.proto). + // "urlMatches" Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Parameter") to // unconditionally include in API requests. By default, fields with empty or diff --git a/tpu/v2/tpu-api.json b/tpu/v2/tpu-api.json index 4a7e3ba709c..30d91ca939b 100644 --- a/tpu/v2/tpu-api.json +++ b/tpu/v2/tpu-api.json @@ -887,7 +887,7 @@ } } }, - "revision": "20240321", + "revision": "20240530", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -905,6 +905,7 @@ "V2", "V3", "V4", + "V5LITE_POD", "V5P" ], "enumDescriptions": [ @@ -912,6 +913,7 @@ "TPU v2.", "TPU v3.", "TPU v4.", + "TPU v5lite pod.", "TPU v5p" ], "type": "string" diff --git a/tpu/v2/tpu-gen.go b/tpu/v2/tpu-gen.go index bee245772a7..4e18a4804fa 100644 --- a/tpu/v2/tpu-gen.go +++ b/tpu/v2/tpu-gen.go @@ -246,6 +246,7 @@ type AcceleratorConfig struct { // "V2" - TPU v2. // "V3" - TPU v3. // "V4" - TPU v4. + // "V5LITE_POD" - TPU v5lite pod. // "V5P" - TPU v5p Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Topology") to diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index fffefbcc2e9..8adff1538ac 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -965,7 +965,7 @@ } } }, - "revision": "20240411", + "revision": "20240530", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -983,6 +983,7 @@ "V2", "V3", "V4", + "V5LITE_POD", "V5P" ], "enumDescriptions": [ @@ -990,6 +991,7 @@ "TPU v2.", "TPU v3.", "TPU v4.", + "TPU v5lite pod.", "TPU v5." ], "type": "string" diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index 8ed5e80830a..668ce1c8288 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -258,6 +258,7 @@ type AcceleratorConfig struct { // "V2" - TPU v2. // "V3" - TPU v3. // "V4" - TPU v4. + // "V5LITE_POD" - TPU v5lite pod. // "V5P" - TPU v5. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Topology") to diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 99a68944b7d..8beac4f6c6d 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -2220,7 +2220,7 @@ } } }, - "revision": "20240411", + "revision": "20240530", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2329,17 +2329,20 @@ "id": "AwsDiskDetails", "properties": { "diskNumber": { - "description": "The ordinal number of the disk.", + "description": "Output only. The ordinal number of the disk.", "format": "int32", + "readOnly": true, "type": "integer" }, "sizeGb": { - "description": "Size in GB.", + "description": "Output only. Size in GB.", "format": "int64", + "readOnly": true, "type": "string" }, "volumeId": { - "description": "AWS volume ID.", + "description": "Output only. AWS volume ID.", + "readOnly": true, "type": "string" } }, @@ -2428,19 +2431,21 @@ "id": "AwsSourceVmDetails", "properties": { "committedStorageBytes": { - "description": "The total size of the disks being migrated in bytes.", + "description": "Output only. The total size of the disks being migrated in bytes.", "format": "int64", + "readOnly": true, "type": "string" }, "disks": { - "description": "The disks attached to the source VM.", + "description": "Output only. The disks attached to the source VM.", "items": { "$ref": "AwsDiskDetails" }, + "readOnly": true, "type": "array" }, "firmware": { - "description": "The firmware type of the source VM.", + "description": "Output only. The firmware type of the source VM.", "enum": [ "FIRMWARE_UNSPECIFIED", "EFI", @@ -2451,6 +2456,7 @@ "The firmware is EFI.", "The firmware is BIOS." ], + "readOnly": true, "type": "string" }, "vmCapabilitiesInfo": { @@ -2618,17 +2624,20 @@ "id": "AzureDiskDetails", "properties": { "diskId": { - "description": "Azure disk ID.", + "description": "Output only. Azure disk ID.", + "readOnly": true, "type": "string" }, "diskNumber": { - "description": "The ordinal number of the disk.", + "description": "Output only. The ordinal number of the disk.", "format": "int32", + "readOnly": true, "type": "integer" }, "sizeGb": { - "description": "Size in GB.", + "description": "Output only. Size in GB.", "format": "int64", + "readOnly": true, "type": "string" } }, @@ -2692,19 +2701,21 @@ "id": "AzureSourceVmDetails", "properties": { "committedStorageBytes": { - "description": "The total size of the disks being migrated in bytes.", + "description": "Output only. The total size of the disks being migrated in bytes.", "format": "int64", + "readOnly": true, "type": "string" }, "disks": { - "description": "The disks attached to the source VM.", + "description": "Output only. The disks attached to the source VM.", "items": { "$ref": "AzureDiskDetails" }, + "readOnly": true, "type": "array" }, "firmware": { - "description": "The firmware type of the source VM.", + "description": "Output only. The firmware type of the source VM.", "enum": [ "FIRMWARE_UNSPECIFIED", "EFI", @@ -2715,6 +2726,7 @@ "The firmware is EFI.", "The firmware is BIOS." ], + "readOnly": true, "type": "string" }, "vmCapabilitiesInfo": { @@ -4787,7 +4799,8 @@ "properties": { "actionItem": { "$ref": "LocalizedMessage", - "description": "Suggested action for solving the warning." + "description": "Output only. Suggested action for solving the warning.", + "readOnly": true }, "code": { "description": "The warning code.", @@ -4802,15 +4815,17 @@ "type": "string" }, "helpLinks": { - "description": "URL(s) pointing to additional information on handling the current warning.", + "description": "Output only. URL(s) pointing to additional information on handling the current warning.", "items": { "$ref": "Link" }, + "readOnly": true, "type": "array" }, "warningMessage": { "$ref": "LocalizedMessage", - "description": "The localized warning message." + "description": "Output only. The localized warning message.", + "readOnly": true }, "warningTime": { "description": "The time the warning occurred.", @@ -4825,11 +4840,11 @@ "id": "NetworkInterface", "properties": { "externalIp": { - "description": "The external IP to define in the NIC.", + "description": "Optional. The external IP to define in the NIC.", "type": "string" }, "internalIp": { - "description": "The internal IP to define in the NIC. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path.", + "description": "Optional. The internal IP to define in the NIC. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path.", "type": "string" }, "network": { @@ -5100,7 +5115,8 @@ }, "error": { "$ref": "Status", - "description": "Provides details on the state of the cycle in case of an error." + "description": "Output only. Provides details on the state of the cycle in case of an error.", + "readOnly": true }, "name": { "description": "The identifier of the ReplicationCycle.", @@ -5319,11 +5335,11 @@ "id": "Tag", "properties": { "key": { - "description": "Key of tag.", + "description": "Required. Key of tag.", "type": "string" }, "value": { - "description": "Value of tag.", + "description": "Required. Value of tag.", "type": "string" } }, @@ -5378,7 +5394,8 @@ "properties": { "error": { "$ref": "Status", - "description": "Provides details on the state of the upgrade operation in case of an error." + "description": "Output only. Provides details on the state of the upgrade operation in case of an error.", + "readOnly": true }, "previousVersion": { "description": "The version from which we upgraded.", @@ -5610,17 +5627,20 @@ "id": "VmwareDiskDetails", "properties": { "diskNumber": { - "description": "The ordinal number of the disk.", + "description": "Output only. The ordinal number of the disk.", "format": "int32", + "readOnly": true, "type": "integer" }, "label": { - "description": "The disk label.", + "description": "Output only. The disk label.", + "readOnly": true, "type": "string" }, "sizeGb": { - "description": "Size in GB.", + "description": "Output only. Size in GB.", "format": "int64", + "readOnly": true, "type": "string" } }, @@ -5658,19 +5678,21 @@ "id": "VmwareSourceVmDetails", "properties": { "committedStorageBytes": { - "description": "The total size of the disks being migrated in bytes.", + "description": "Output only. The total size of the disks being migrated in bytes.", "format": "int64", + "readOnly": true, "type": "string" }, "disks": { - "description": "The disks attached to the source VM.", + "description": "Output only. The disks attached to the source VM.", "items": { "$ref": "VmwareDiskDetails" }, + "readOnly": true, "type": "array" }, "firmware": { - "description": "The firmware type of the source VM.", + "description": "Output only. The firmware type of the source VM.", "enum": [ "FIRMWARE_UNSPECIFIED", "EFI", @@ -5681,6 +5703,7 @@ "The firmware is EFI.", "The firmware is BIOS." ], + "readOnly": true, "type": "string" }, "vmCapabilitiesInfo": { diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 8554009c199..0fa5f7dd780 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -463,11 +463,11 @@ func (s *AvailableUpdates) MarshalJSON() ([]byte, error) { // AwsDiskDetails: The details of an AWS instance disk. type AwsDiskDetails struct { - // DiskNumber: The ordinal number of the disk. + // DiskNumber: Output only. The ordinal number of the disk. DiskNumber int64 `json:"diskNumber,omitempty"` - // SizeGb: Size in GB. + // SizeGb: Output only. Size in GB. SizeGb int64 `json:"sizeGb,omitempty,string"` - // VolumeId: AWS volume ID. + // VolumeId: Output only. AWS volume ID. VolumeId string `json:"volumeId,omitempty"` // ForceSendFields is a list of field names (e.g. "DiskNumber") to // unconditionally include in API requests. By default, fields with empty or @@ -567,11 +567,12 @@ func (s *AwsSourceDetails) MarshalJSON() ([]byte, error) { // AwsSourceVmDetails: Represent the source AWS VM details. type AwsSourceVmDetails struct { - // CommittedStorageBytes: The total size of the disks being migrated in bytes. + // CommittedStorageBytes: Output only. The total size of the disks being + // migrated in bytes. CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` - // Disks: The disks attached to the source VM. + // Disks: Output only. The disks attached to the source VM. Disks []*AwsDiskDetails `json:"disks,omitempty"` - // Firmware: The firmware type of the source VM. + // Firmware: Output only. The firmware type of the source VM. // // Possible values: // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. @@ -707,11 +708,11 @@ func (s *AwsVmsDetails) MarshalJSON() ([]byte, error) { // AzureDiskDetails: The details of an Azure VM disk. type AzureDiskDetails struct { - // DiskId: Azure disk ID. + // DiskId: Output only. Azure disk ID. DiskId string `json:"diskId,omitempty"` - // DiskNumber: The ordinal number of the disk. + // DiskNumber: Output only. The ordinal number of the disk. DiskNumber int64 `json:"diskNumber,omitempty"` - // SizeGb: Size in GB. + // SizeGb: Output only. Size in GB. SizeGb int64 `json:"sizeGb,omitempty,string"` // ForceSendFields is a list of field names (e.g. "DiskId") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -783,11 +784,12 @@ func (s *AzureSourceDetails) MarshalJSON() ([]byte, error) { // AzureSourceVmDetails: Represent the source Azure VM details. type AzureSourceVmDetails struct { - // CommittedStorageBytes: The total size of the disks being migrated in bytes. + // CommittedStorageBytes: Output only. The total size of the disks being + // migrated in bytes. CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` - // Disks: The disks attached to the source VM. + // Disks: Output only. The disks attached to the source VM. Disks []*AzureDiskDetails `json:"disks,omitempty"` - // Firmware: The firmware type of the source VM. + // Firmware: Output only. The firmware type of the source VM. // // Possible values: // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. @@ -2754,7 +2756,7 @@ func (s *MigrationError) MarshalJSON() ([]byte, error) { // be used with google.rpc.Status message. MigrationWarning is used to present // the user with warning information in migration operations. type MigrationWarning struct { - // ActionItem: Suggested action for solving the warning. + // ActionItem: Output only. Suggested action for solving the warning. ActionItem *LocalizedMessage `json:"actionItem,omitempty"` // Code: The warning code. // @@ -2762,10 +2764,10 @@ type MigrationWarning struct { // "WARNING_CODE_UNSPECIFIED" - Default value. This value is not used. // "ADAPTATION_WARNING" - A warning originated from OS Adaptation. Code string `json:"code,omitempty"` - // HelpLinks: URL(s) pointing to additional information on handling the current - // warning. + // HelpLinks: Output only. URL(s) pointing to additional information on + // handling the current warning. HelpLinks []*Link `json:"helpLinks,omitempty"` - // WarningMessage: The localized warning message. + // WarningMessage: Output only. The localized warning message. WarningMessage *LocalizedMessage `json:"warningMessage,omitempty"` // WarningTime: The time the warning occurred. WarningTime string `json:"warningTime,omitempty"` @@ -2789,10 +2791,11 @@ func (s *MigrationWarning) MarshalJSON() ([]byte, error) { // NetworkInterface: NetworkInterface represents a NIC of a VM. type NetworkInterface struct { - // ExternalIp: The external IP to define in the NIC. + // ExternalIp: Optional. The external IP to define in the NIC. ExternalIp string `json:"externalIp,omitempty"` - // InternalIp: The internal IP to define in the NIC. The formats accepted are: - // `ephemeral` \ ipv4 address \ a named address resource full path. + // InternalIp: Optional. The internal IP to define in the NIC. The formats + // accepted are: `ephemeral` \ ipv4 address \ a named address resource full + // path. InternalIp string `json:"internalIp,omitempty"` // Network: The network to connect the NIC to. Network string `json:"network,omitempty"` @@ -3094,7 +3097,8 @@ type ReplicationCycle struct { CycleNumber int64 `json:"cycleNumber,omitempty"` // EndTime: The time the replication cycle has ended. EndTime string `json:"endTime,omitempty"` - // Error: Provides details on the state of the cycle in case of an error. + // Error: Output only. Provides details on the state of the cycle in case of an + // error. Error *Status `json:"error,omitempty"` // Name: The identifier of the ReplicationCycle. Name string `json:"name,omitempty"` @@ -3320,9 +3324,9 @@ func (s *Status) MarshalJSON() ([]byte, error) { // Tag: Tag is an AWS tag representation. type Tag struct { - // Key: Key of tag. + // Key: Required. Key of tag. Key string `json:"key,omitempty"` - // Value: Value of tag. + // Value: Required. Value of tag. Value string `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Key") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -3413,8 +3417,8 @@ func (s *UpgradeApplianceRequest) MarshalJSON() ([]byte, error) { // UpgradeStatus: UpgradeStatus contains information about upgradeAppliance // operation. type UpgradeStatus struct { - // Error: Provides details on the state of the upgrade operation in case of an - // error. + // Error: Output only. Provides details on the state of the upgrade operation + // in case of an error. Error *Status `json:"error,omitempty"` // PreviousVersion: The version from which we upgraded. PreviousVersion string `json:"previousVersion,omitempty"` @@ -3640,11 +3644,11 @@ func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) { // VmwareDiskDetails: The details of a Vmware VM disk. type VmwareDiskDetails struct { - // DiskNumber: The ordinal number of the disk. + // DiskNumber: Output only. The ordinal number of the disk. DiskNumber int64 `json:"diskNumber,omitempty"` - // Label: The disk label. + // Label: Output only. The disk label. Label string `json:"label,omitempty"` - // SizeGb: Size in GB. + // SizeGb: Output only. Size in GB. SizeGb int64 `json:"sizeGb,omitempty,string"` // ForceSendFields is a list of field names (e.g. "DiskNumber") to // unconditionally include in API requests. By default, fields with empty or @@ -3698,11 +3702,12 @@ func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) { // VmwareSourceVmDetails: Represent the source Vmware VM details. type VmwareSourceVmDetails struct { - // CommittedStorageBytes: The total size of the disks being migrated in bytes. + // CommittedStorageBytes: Output only. The total size of the disks being + // migrated in bytes. CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` - // Disks: The disks attached to the source VM. + // Disks: Output only. The disks attached to the source VM. Disks []*VmwareDiskDetails `json:"disks,omitempty"` - // Firmware: The firmware type of the source VM. + // Firmware: Output only. The firmware type of the source VM. // // Possible values: // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index b140c9181b8..aa79ecf8204 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -2220,7 +2220,7 @@ } } }, - "revision": "20240516", + "revision": "20240530", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2329,17 +2329,20 @@ "id": "AwsDiskDetails", "properties": { "diskNumber": { - "description": "The ordinal number of the disk.", + "description": "Output only. The ordinal number of the disk.", "format": "int32", + "readOnly": true, "type": "integer" }, "sizeGb": { - "description": "Size in GB.", + "description": "Output only. Size in GB.", "format": "int64", + "readOnly": true, "type": "string" }, "volumeId": { - "description": "AWS volume ID.", + "description": "Output only. AWS volume ID.", + "readOnly": true, "type": "string" } }, @@ -2428,19 +2431,21 @@ "id": "AwsSourceVmDetails", "properties": { "committedStorageBytes": { - "description": "The total size of the disks being migrated in bytes.", + "description": "Output only. The total size of the disks being migrated in bytes.", "format": "int64", + "readOnly": true, "type": "string" }, "disks": { - "description": "The disks attached to the source VM.", + "description": "Output only. The disks attached to the source VM.", "items": { "$ref": "AwsDiskDetails" }, + "readOnly": true, "type": "array" }, "firmware": { - "description": "The firmware type of the source VM.", + "description": "Output only. The firmware type of the source VM.", "enum": [ "FIRMWARE_UNSPECIFIED", "EFI", @@ -2451,6 +2456,7 @@ "The firmware is EFI.", "The firmware is BIOS." ], + "readOnly": true, "type": "string" }, "vmCapabilitiesInfo": { @@ -2618,17 +2624,20 @@ "id": "AzureDiskDetails", "properties": { "diskId": { - "description": "Azure disk ID.", + "description": "Output only. Azure disk ID.", + "readOnly": true, "type": "string" }, "diskNumber": { - "description": "The ordinal number of the disk.", + "description": "Output only. The ordinal number of the disk.", "format": "int32", + "readOnly": true, "type": "integer" }, "sizeGb": { - "description": "Size in GB.", + "description": "Output only. Size in GB.", "format": "int64", + "readOnly": true, "type": "string" } }, @@ -2692,19 +2701,21 @@ "id": "AzureSourceVmDetails", "properties": { "committedStorageBytes": { - "description": "The total size of the disks being migrated in bytes.", + "description": "Output only. The total size of the disks being migrated in bytes.", "format": "int64", + "readOnly": true, "type": "string" }, "disks": { - "description": "The disks attached to the source VM.", + "description": "Output only. The disks attached to the source VM.", "items": { "$ref": "AzureDiskDetails" }, + "readOnly": true, "type": "array" }, "firmware": { - "description": "The firmware type of the source VM.", + "description": "Output only. The firmware type of the source VM.", "enum": [ "FIRMWARE_UNSPECIFIED", "EFI", @@ -2715,6 +2726,7 @@ "The firmware is EFI.", "The firmware is BIOS." ], + "readOnly": true, "type": "string" }, "vmCapabilitiesInfo": { @@ -4832,7 +4844,8 @@ "properties": { "actionItem": { "$ref": "LocalizedMessage", - "description": "Suggested action for solving the warning." + "description": "Output only. Suggested action for solving the warning.", + "readOnly": true }, "code": { "description": "The warning code.", @@ -4847,15 +4860,17 @@ "type": "string" }, "helpLinks": { - "description": "URL(s) pointing to additional information on handling the current warning.", + "description": "Output only. URL(s) pointing to additional information on handling the current warning.", "items": { "$ref": "Link" }, + "readOnly": true, "type": "array" }, "warningMessage": { "$ref": "LocalizedMessage", - "description": "The localized warning message." + "description": "Output only. The localized warning message.", + "readOnly": true }, "warningTime": { "description": "The time the warning occurred.", @@ -4870,11 +4885,11 @@ "id": "NetworkInterface", "properties": { "externalIp": { - "description": "The external IP to define in the NIC.", + "description": "Optional. The external IP to define in the NIC.", "type": "string" }, "internalIp": { - "description": "The internal IP to define in the NIC. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path.", + "description": "Optional. The internal IP to define in the NIC. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path.", "type": "string" }, "network": { @@ -5145,7 +5160,8 @@ }, "error": { "$ref": "Status", - "description": "Provides details on the state of the cycle in case of an error." + "description": "Output only. Provides details on the state of the cycle in case of an error.", + "readOnly": true }, "name": { "description": "The identifier of the ReplicationCycle.", @@ -5376,11 +5392,11 @@ "id": "Tag", "properties": { "key": { - "description": "Key of tag.", + "description": "Required. Key of tag.", "type": "string" }, "value": { - "description": "Value of tag.", + "description": "Required. Value of tag.", "type": "string" } }, @@ -5577,7 +5593,8 @@ "properties": { "error": { "$ref": "Status", - "description": "Provides details on the state of the upgrade operation in case of an error." + "description": "Output only. Provides details on the state of the upgrade operation in case of an error.", + "readOnly": true }, "previousVersion": { "description": "The version from which we upgraded.", @@ -5864,17 +5881,20 @@ "id": "VmwareDiskDetails", "properties": { "diskNumber": { - "description": "The ordinal number of the disk.", + "description": "Output only. The ordinal number of the disk.", "format": "int32", + "readOnly": true, "type": "integer" }, "label": { - "description": "The disk label.", + "description": "Output only. The disk label.", + "readOnly": true, "type": "string" }, "sizeGb": { - "description": "Size in GB.", + "description": "Output only. Size in GB.", "format": "int64", + "readOnly": true, "type": "string" } }, @@ -5912,19 +5932,21 @@ "id": "VmwareSourceVmDetails", "properties": { "committedStorageBytes": { - "description": "The total size of the disks being migrated in bytes.", + "description": "Output only. The total size of the disks being migrated in bytes.", "format": "int64", + "readOnly": true, "type": "string" }, "disks": { - "description": "The disks attached to the source VM.", + "description": "Output only. The disks attached to the source VM.", "items": { "$ref": "VmwareDiskDetails" }, + "readOnly": true, "type": "array" }, "firmware": { - "description": "The firmware type of the source VM.", + "description": "Output only. The firmware type of the source VM.", "enum": [ "FIRMWARE_UNSPECIFIED", "EFI", @@ -5935,6 +5957,7 @@ "The firmware is EFI.", "The firmware is BIOS." ], + "readOnly": true, "type": "string" }, "vmCapabilitiesInfo": { diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 604369f5893..eadc5872838 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -463,11 +463,11 @@ func (s *AvailableUpdates) MarshalJSON() ([]byte, error) { // AwsDiskDetails: The details of an AWS instance disk. type AwsDiskDetails struct { - // DiskNumber: The ordinal number of the disk. + // DiskNumber: Output only. The ordinal number of the disk. DiskNumber int64 `json:"diskNumber,omitempty"` - // SizeGb: Size in GB. + // SizeGb: Output only. Size in GB. SizeGb int64 `json:"sizeGb,omitempty,string"` - // VolumeId: AWS volume ID. + // VolumeId: Output only. AWS volume ID. VolumeId string `json:"volumeId,omitempty"` // ForceSendFields is a list of field names (e.g. "DiskNumber") to // unconditionally include in API requests. By default, fields with empty or @@ -567,11 +567,12 @@ func (s *AwsSourceDetails) MarshalJSON() ([]byte, error) { // AwsSourceVmDetails: Represent the source AWS VM details. type AwsSourceVmDetails struct { - // CommittedStorageBytes: The total size of the disks being migrated in bytes. + // CommittedStorageBytes: Output only. The total size of the disks being + // migrated in bytes. CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` - // Disks: The disks attached to the source VM. + // Disks: Output only. The disks attached to the source VM. Disks []*AwsDiskDetails `json:"disks,omitempty"` - // Firmware: The firmware type of the source VM. + // Firmware: Output only. The firmware type of the source VM. // // Possible values: // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. @@ -707,11 +708,11 @@ func (s *AwsVmsDetails) MarshalJSON() ([]byte, error) { // AzureDiskDetails: The details of an Azure VM disk. type AzureDiskDetails struct { - // DiskId: Azure disk ID. + // DiskId: Output only. Azure disk ID. DiskId string `json:"diskId,omitempty"` - // DiskNumber: The ordinal number of the disk. + // DiskNumber: Output only. The ordinal number of the disk. DiskNumber int64 `json:"diskNumber,omitempty"` - // SizeGb: Size in GB. + // SizeGb: Output only. Size in GB. SizeGb int64 `json:"sizeGb,omitempty,string"` // ForceSendFields is a list of field names (e.g. "DiskId") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -783,11 +784,12 @@ func (s *AzureSourceDetails) MarshalJSON() ([]byte, error) { // AzureSourceVmDetails: Represent the source Azure VM details. type AzureSourceVmDetails struct { - // CommittedStorageBytes: The total size of the disks being migrated in bytes. + // CommittedStorageBytes: Output only. The total size of the disks being + // migrated in bytes. CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` - // Disks: The disks attached to the source VM. + // Disks: Output only. The disks attached to the source VM. Disks []*AzureDiskDetails `json:"disks,omitempty"` - // Firmware: The firmware type of the source VM. + // Firmware: Output only. The firmware type of the source VM. // // Possible values: // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. @@ -2777,7 +2779,7 @@ func (s *MigrationError) MarshalJSON() ([]byte, error) { // be used with google.rpc.Status message. MigrationWarning is used to present // the user with warning information in migration operations. type MigrationWarning struct { - // ActionItem: Suggested action for solving the warning. + // ActionItem: Output only. Suggested action for solving the warning. ActionItem *LocalizedMessage `json:"actionItem,omitempty"` // Code: The warning code. // @@ -2785,10 +2787,10 @@ type MigrationWarning struct { // "WARNING_CODE_UNSPECIFIED" - Default value. This value is not used. // "ADAPTATION_WARNING" - A warning originated from OS Adaptation. Code string `json:"code,omitempty"` - // HelpLinks: URL(s) pointing to additional information on handling the current - // warning. + // HelpLinks: Output only. URL(s) pointing to additional information on + // handling the current warning. HelpLinks []*Link `json:"helpLinks,omitempty"` - // WarningMessage: The localized warning message. + // WarningMessage: Output only. The localized warning message. WarningMessage *LocalizedMessage `json:"warningMessage,omitempty"` // WarningTime: The time the warning occurred. WarningTime string `json:"warningTime,omitempty"` @@ -2812,10 +2814,11 @@ func (s *MigrationWarning) MarshalJSON() ([]byte, error) { // NetworkInterface: NetworkInterface represents a NIC of a VM. type NetworkInterface struct { - // ExternalIp: The external IP to define in the NIC. + // ExternalIp: Optional. The external IP to define in the NIC. ExternalIp string `json:"externalIp,omitempty"` - // InternalIp: The internal IP to define in the NIC. The formats accepted are: - // `ephemeral` \ ipv4 address \ a named address resource full path. + // InternalIp: Optional. The internal IP to define in the NIC. The formats + // accepted are: `ephemeral` \ ipv4 address \ a named address resource full + // path. InternalIp string `json:"internalIp,omitempty"` // Network: The network to connect the NIC to. Network string `json:"network,omitempty"` @@ -3117,7 +3120,8 @@ type ReplicationCycle struct { CycleNumber int64 `json:"cycleNumber,omitempty"` // EndTime: The time the replication cycle has ended. EndTime string `json:"endTime,omitempty"` - // Error: Provides details on the state of the cycle in case of an error. + // Error: Output only. Provides details on the state of the cycle in case of an + // error. Error *Status `json:"error,omitempty"` // Name: The identifier of the ReplicationCycle. Name string `json:"name,omitempty"` @@ -3348,9 +3352,9 @@ func (s *Status) MarshalJSON() ([]byte, error) { // Tag: Tag is an AWS tag representation. type Tag struct { - // Key: Key of tag. + // Key: Required. Key of tag. Key string `json:"key,omitempty"` - // Value: Value of tag. + // Value: Required. Value of tag. Value string `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Key") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -3528,8 +3532,8 @@ func (s *UpgradeApplianceRequest) MarshalJSON() ([]byte, error) { // UpgradeStatus: UpgradeStatus contains information about upgradeAppliance // operation. type UpgradeStatus struct { - // Error: Provides details on the state of the upgrade operation in case of an - // error. + // Error: Output only. Provides details on the state of the upgrade operation + // in case of an error. Error *Status `json:"error,omitempty"` // PreviousVersion: The version from which we upgraded. PreviousVersion string `json:"previousVersion,omitempty"` @@ -3775,11 +3779,11 @@ func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) { // VmwareDiskDetails: The details of a Vmware VM disk. type VmwareDiskDetails struct { - // DiskNumber: The ordinal number of the disk. + // DiskNumber: Output only. The ordinal number of the disk. DiskNumber int64 `json:"diskNumber,omitempty"` - // Label: The disk label. + // Label: Output only. The disk label. Label string `json:"label,omitempty"` - // SizeGb: Size in GB. + // SizeGb: Output only. Size in GB. SizeGb int64 `json:"sizeGb,omitempty,string"` // ForceSendFields is a list of field names (e.g. "DiskNumber") to // unconditionally include in API requests. By default, fields with empty or @@ -3833,11 +3837,12 @@ func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) { // VmwareSourceVmDetails: Represent the source Vmware VM details. type VmwareSourceVmDetails struct { - // CommittedStorageBytes: The total size of the disks being migrated in bytes. + // CommittedStorageBytes: Output only. The total size of the disks being + // migrated in bytes. CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` - // Disks: The disks attached to the source VM. + // Disks: Output only. The disks attached to the source VM. Disks []*VmwareDiskDetails `json:"disks,omitempty"` - // Firmware: The firmware type of the source VM. + // Firmware: Output only. The firmware type of the source VM. // // Possible values: // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. diff --git a/vmwareengine/v1/vmwareengine-api.json b/vmwareengine/v1/vmwareengine-api.json index b8bcc3bdf23..e70443eed56 100644 --- a/vmwareengine/v1/vmwareengine-api.json +++ b/vmwareengine/v1/vmwareengine-api.json @@ -3173,7 +3173,7 @@ } } }, - "revision": "20240412", + "revision": "20240528", "rootUrl": "https://vmwareengine.googleapis.com/", "schemas": { "AuditConfig": { @@ -3639,12 +3639,14 @@ "enum": [ "STATE_UNSPECIFIED", "ACTIVE", - "CREATING" + "CREATING", + "ACTIVATING" ], "enumDescriptions": [ "Unspecified appliance state. This is the default value.", "The appliance is operational and can be used.", - "The appliance is being deployed." + "The appliance is being deployed.", + "The appliance is being activated." ], "readOnly": true, "type": "string" @@ -4436,7 +4438,8 @@ "PRIVATE_SERVICES_ACCESS", "NETAPP_CLOUD_VOLUMES", "THIRD_PARTY_SERVICE", - "DELL_POWERSCALE" + "DELL_POWERSCALE", + "GOOGLE_CLOUD_NETAPP_VOLUMES" ], "enumDescriptions": [ "Unspecified", @@ -4445,7 +4448,8 @@ "Peering connection used for establishing [private services access](https://cloud.google.com/vpc/docs/private-services-access).", "Peering connection used for connecting to NetApp Cloud Volumes.", "Peering connection used for connecting to third-party services. Most third-party services require manual setup of reverse peering on the VPC network associated with the third-party service.", - "Peering connection used for connecting to Dell PowerScale Filers" + "Peering connection used for connecting to Dell PowerScale Filers", + "Peering connection used for connecting to Google Cloud NetApp Volumes." ], "type": "string" }, diff --git a/vmwareengine/v1/vmwareengine-gen.go b/vmwareengine/v1/vmwareengine-gen.go index 41223aa89a6..b64ac35b21a 100644 --- a/vmwareengine/v1/vmwareengine-gen.go +++ b/vmwareengine/v1/vmwareengine-gen.go @@ -1033,6 +1033,7 @@ type Hcx struct { // value. // "ACTIVE" - The appliance is operational and can be used. // "CREATING" - The appliance is being deployed. + // "ACTIVATING" - The appliance is being activated. State string `json:"state,omitempty"` // Version: Version of the appliance. Version string `json:"version,omitempty"` @@ -2026,6 +2027,8 @@ type NetworkPeering struct { // reverse peering on the VPC network associated with the third-party service. // "DELL_POWERSCALE" - Peering connection used for connecting to Dell // PowerScale Filers + // "GOOGLE_CLOUD_NETAPP_VOLUMES" - Peering connection used for connecting to + // Google Cloud NetApp Volumes. PeerNetworkType string `json:"peerNetworkType,omitempty"` // State: Output only. State of the network peering. This field has a value of // 'ACTIVE' when there's a matching configuration in the peer network. New diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 4c634df7f2b..3273b10b5d6 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2681,7 +2681,7 @@ } } }, - "revision": "20240517", + "revision": "20240612", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -6851,7 +6851,7 @@ }, "hash": { "deprecated": true, - "description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/uploader/service/proto/upload_listener.proto\u0026q=class:Hash Hex encoded hash value of the uploaded media.", + "description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto\u0026q=class:Hash Hex encoded hash value of the uploaded media.", "type": "string" }, "hashVerified": { diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index b98052364ab..132834a28a1 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -4882,7 +4882,7 @@ type Media struct { // Hash: Deprecated, use one of explicit hash type fields instead. These two // hash related fields will only be populated on Scotty based media uploads and // will contain the content of the hash group in the NotificationRequest: - // http://cs/#google3/uploader/service/proto/upload_listener.proto&q=class:Hash + // http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash // Hex encoded hash value of the uploaded media. Hash string `json:"hash,omitempty"` // HashVerified: For Scotty uploads only. If a user sends a hash code and the diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index 4faad6bc3d1..9047573d964 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -274,7 +274,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filters applied to the `[Executions.ListExecutions]` results. The following fields are supported for filtering: `executionId`, `state`, `createTime`, `startTime`, `endTime`, `duration`, `workflowRevisionId`, `stepName`, and `label`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `startTime\u003e\"2023-08-01\" AND state=\"FAILED\"`", + "description": "Optional. Filters applied to the `[Executions.ListExecutions]` results. The following fields are supported for filtering: `executionId`, `state`, `createTime`, `startTime`, `endTime`, `duration`, `workflowRevisionId`, `stepName`, and `label`. For details, see AIP-160. For more information, see Filter executions. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `startTime\u003e\"2023-08-01\" AND state=\"FAILED\"`", "location": "query", "type": "string" }, diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index 03288e7d036..b8754caa1c4 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -1498,8 +1498,9 @@ func (r *ProjectsLocationsWorkflowsExecutionsService) List(parent string) *Proje // `[Executions.ListExecutions]` results. The following fields are supported // for filtering: `executionId`, `state`, `createTime`, `startTime`, `endTime`, // `duration`, `workflowRevisionId`, `stepName`, and `label`. For details, see -// AIP-160. For example, if you are using the Google APIs Explorer: -// `state="SUCCEEDED" or `startTime>"2023-08-01" AND state="FAILED" +// AIP-160. For more information, see Filter executions. For example, if you +// are using the Google APIs Explorer: `state="SUCCEEDED" or +// `startTime>"2023-08-01" AND state="FAILED" func (c *ProjectsLocationsWorkflowsExecutionsListCall) Filter(filter string) *ProjectsLocationsWorkflowsExecutionsListCall { c.urlParams_.Set("filter", filter) return c