From 89b85118dfb72cac5b0a4a7a1c95ac7f4e23caa8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Sep 2024 07:08:56 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- .../v1/androidmanagement-api.json | 33 +- androidmanagement/v1/androidmanagement-gen.go | 48 +- apigee/v1/apigee-api.json | 6 +- apigee/v1/apigee-gen.go | 4 +- .../v1/bigqueryreservation-api.json | 56 +- .../v1/bigqueryreservation-gen.go | 9 +- bigtableadmin/v2/bigtableadmin-api.json | 21 +- bigtableadmin/v2/bigtableadmin-gen.go | 25 +- chat/v1/chat-api.json | 4 +- chat/v1/chat-gen.go | 4 +- developerconnect/v1/developerconnect-api.json | 170 +++- developerconnect/v1/developerconnect-gen.go | 228 +++++ gkehub/v1/gkehub-api.json | 18 +- gkehub/v1/gkehub-gen.go | 8 + .../accounts_v1beta/merchantapi-api.json | 23 +- .../accounts_v1beta/merchantapi-gen.go | 34 +- .../v1/paymentsresellersubscription-api.json | 6 +- .../v1/paymentsresellersubscription-gen.go | 6 +- places/v1/places-api.json | 8 +- places/v1/places-gen.go | 5 + retail/v2/retail-api.json | 276 +++++- retail/v2/retail-gen.go | 831 +++++++++++++++++- retail/v2alpha/retail-api.json | 276 +++++- retail/v2alpha/retail-gen.go | 829 ++++++++++++++++- retail/v2beta/retail-api.json | 276 +++++- retail/v2beta/retail-gen.go | 831 +++++++++++++++++- .../v1beta2/securitycenter-api.json | 82 +- securitycenter/v1beta2/securitycenter-gen.go | 128 +++ .../v1/serviceconsumermanagement-api.json | 20 +- .../v1/serviceconsumermanagement-gen.go | 27 + sheets/v4/sheets-api.json | 4 +- sheets/v4/sheets-gen.go | 3 +- 32 files changed, 4112 insertions(+), 187 deletions(-) diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 9a3f0b7c513..656f948c90c 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1168,7 +1168,7 @@ } } }, - "revision": "20240904", + "revision": "20240923", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -1193,7 +1193,7 @@ "id": "AdvancedSecurityOverrides", "properties": { "commonCriteriaMode": { - "description": "Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, including AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration stores.Common Criteria Mode is only supported on company-owned devices running Android 11 or above.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required.", + "description": "Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, see CommonCriteriaMode for details.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required. If Common Criteria Mode is turned off after being enabled previously, all user-configured Wi-Fi networks may be lost and any enterprise-configured Wi-Fi networks that require user input may need to be reconfigured.", "enum": [ "COMMON_CRITERIA_MODE_UNSPECIFIED", "COMMON_CRITERIA_MODE_DISABLED", @@ -2252,6 +2252,25 @@ "Common Criteria Mode is currently enabled." ], "type": "string" + }, + "policySignatureVerificationStatus": { + "description": "Output only. The status of policy signature verification.", + "enum": [ + "POLICY_SIGNATURE_VERIFICATION_STATUS_UNSPECIFIED", + "POLICY_SIGNATURE_VERIFICATION_DISABLED", + "POLICY_SIGNATURE_VERIFICATION_SUCCEEDED", + "POLICY_SIGNATURE_VERIFICATION_NOT_SUPPORTED", + "POLICY_SIGNATURE_VERIFICATION_FAILED" + ], + "enumDescriptions": [ + "Unspecified. The verification status has not been reported. This is set only if statusReportingSettings.commonCriteriaModeEnabled is false.", + "Policy signature verification is disabled on the device as common_criteria_mode is set to false.", + "Policy signature verification succeeded.", + "Policy signature verification is not supported, e.g. because the device has been enrolled with a CloudDPC version that does not support the policy signature verification.", + "The policy signature verification failed. The policy has not been applied." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -5663,7 +5682,7 @@ "id": "ScreenBrightnessSettings", "properties": { "screenBrightness": { - "description": "Optional. The screen brightness between 1 and 255 where 1 is the lowest and 255 is the highest brightness. A value of 0 (default) means no screen brightness set. Any other value is rejected. screenBrightnessMode must be either BRIGHTNESS_AUTOMATIC or BRIGHTNESS_FIXED to set this. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9.", + "description": "Optional. The screen brightness between 1 and 255 where 1 is the lowest and 255 is the highest brightness. A value of 0 (default) means no screen brightness set. Any other value is rejected. screenBrightnessMode must be either BRIGHTNESS_AUTOMATIC or BRIGHTNESS_FIXED to set this. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9. Supported on work profiles on company-owned devices on Android 15 and above.", "format": "int32", "type": "integer" }, @@ -5678,8 +5697,8 @@ "enumDescriptions": [ "Unspecified. Defaults to BRIGHTNESS_USER_CHOICE.", "The user is allowed to configure the screen brightness. screenBrightness must not be set.", - "The screen brightness mode is automatic in which the brightness is automatically adjusted and the user is not allowed to configure the screen brightness. screenBrightness can still be set and it is taken into account while the brightness is automatically adjusted. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9.", - "The screen brightness mode is fixed in which the brightness is set to screenBrightness and the user is not allowed to configure the screen brightness. screenBrightness must be set. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9." + "The screen brightness mode is automatic in which the brightness is automatically adjusted and the user is not allowed to configure the screen brightness. screenBrightness can still be set and it is taken into account while the brightness is automatically adjusted. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9. Supported on work profiles on company-owned devices on Android 15 and above.", + "The screen brightness mode is fixed in which the brightness is set to screenBrightness and the user is not allowed to configure the screen brightness. screenBrightness must be set. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9. Supported on work profiles on company-owned devices on Android 15 and above." ], "type": "string" } @@ -5691,7 +5710,7 @@ "id": "ScreenTimeoutSettings", "properties": { "screenTimeout": { - "description": "Optional. Controls the screen timeout duration. The screen timeout duration must be greater than 0, otherwise it is rejected. Additionally, it should not be greater than maximumTimeToLock, otherwise the screen timeout is set to maximumTimeToLock and a NonComplianceDetail with INVALID_VALUE reason and SCREEN_TIMEOUT_GREATER_THAN_MAXIMUM_TIME_TO_LOCK specific reason is reported. If the screen timeout is less than a certain lower bound, it is set to the lower bound. The lower bound may vary across devices. If this is set, screenTimeoutMode must be SCREEN_TIMEOUT_ENFORCED. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9.", + "description": "Optional. Controls the screen timeout duration. The screen timeout duration must be greater than 0, otherwise it is rejected. Additionally, it should not be greater than maximumTimeToLock, otherwise the screen timeout is set to maximumTimeToLock and a NonComplianceDetail with INVALID_VALUE reason and SCREEN_TIMEOUT_GREATER_THAN_MAXIMUM_TIME_TO_LOCK specific reason is reported. If the screen timeout is less than a certain lower bound, it is set to the lower bound. The lower bound may vary across devices. If this is set, screenTimeoutMode must be SCREEN_TIMEOUT_ENFORCED. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9. Supported on work profiles on company-owned devices on Android 15 and above.", "format": "google-duration", "type": "string" }, @@ -5705,7 +5724,7 @@ "enumDescriptions": [ "Unspecified. Defaults to SCREEN_TIMEOUT_USER_CHOICE.", "The user is allowed to configure the screen timeout. screenTimeout must not be set.", - "The screen timeout is set to screenTimeout and the user is not allowed to configure the timeout. screenTimeout must be set. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9." + "The screen timeout is set to screenTimeout and the user is not allowed to configure the timeout. screenTimeout must be set. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9. Supported on work profiles on company-owned devices on Android 15 and above." ], "type": "string" } diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 8bf258bd144..8c8576a9aab 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -317,13 +317,14 @@ type AdvancedSecurityOverrides struct { // CommonCriteriaMode: Controls Common Criteria Mode—security standards // defined in the Common Criteria for Information Technology Security // Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common - // Criteria Mode increases certain security components on a device, including - // AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration - // stores.Common Criteria Mode is only supported on company-owned devices - // running Android 11 or above.Warning: Common Criteria Mode enforces a strict - // security model typically only required for IT products used in national - // security systems and other highly sensitive organizations. Standard device - // use may be affected. Only enabled if required. + // Criteria Mode increases certain security components on a device, see + // CommonCriteriaMode for details.Warning: Common Criteria Mode enforces a + // strict security model typically only required for IT products used in + // national security systems and other highly sensitive organizations. Standard + // device use may be affected. Only enabled if required. If Common Criteria + // Mode is turned off after being enabled previously, all user-configured Wi-Fi + // networks may be lost and any enterprise-configured Wi-Fi networks that + // require user input may need to be reconfigured. // // Possible values: // "COMMON_CRITERIA_MODE_UNSPECIFIED" - Unspecified. Defaults to @@ -1517,6 +1518,24 @@ type CommonCriteriaModeInfo struct { // "COMMON_CRITERIA_MODE_ENABLED" - Common Criteria Mode is currently // enabled. CommonCriteriaModeStatus string `json:"commonCriteriaModeStatus,omitempty"` + // PolicySignatureVerificationStatus: Output only. The status of policy + // signature verification. + // + // Possible values: + // "POLICY_SIGNATURE_VERIFICATION_STATUS_UNSPECIFIED" - Unspecified. The + // verification status has not been reported. This is set only if + // statusReportingSettings.commonCriteriaModeEnabled is false. + // "POLICY_SIGNATURE_VERIFICATION_DISABLED" - Policy signature verification + // is disabled on the device as common_criteria_mode is set to false. + // "POLICY_SIGNATURE_VERIFICATION_SUCCEEDED" - Policy signature verification + // succeeded. + // "POLICY_SIGNATURE_VERIFICATION_NOT_SUPPORTED" - Policy signature + // verification is not supported, e.g. because the device has been enrolled + // with a CloudDPC version that does not support the policy signature + // verification. + // "POLICY_SIGNATURE_VERIFICATION_FAILED" - The policy signature verification + // failed. The policy has not been applied. + PolicySignatureVerificationStatus string `json:"policySignatureVerificationStatus,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonCriteriaModeStatus") // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -5500,7 +5519,8 @@ type ScreenBrightnessSettings struct { // screenBrightnessMode must be either BRIGHTNESS_AUTOMATIC or BRIGHTNESS_FIXED // to set this. Supported on Android 9 and above on fully managed devices. A // NonComplianceDetail with API_LEVEL is reported if the Android version is - // less than 9. + // less than 9. Supported on work profiles on company-owned devices on Android + // 15 and above. ScreenBrightness int64 `json:"screenBrightness,omitempty"` // ScreenBrightnessMode: Optional. Controls the screen brightness mode. // @@ -5514,12 +5534,14 @@ type ScreenBrightnessSettings struct { // configure the screen brightness. screenBrightness can still be set and it is // taken into account while the brightness is automatically adjusted. Supported // on Android 9 and above on fully managed devices. A NonComplianceDetail with - // API_LEVEL is reported if the Android version is less than 9. + // API_LEVEL is reported if the Android version is less than 9. Supported on + // work profiles on company-owned devices on Android 15 and above. // "BRIGHTNESS_FIXED" - The screen brightness mode is fixed in which the // brightness is set to screenBrightness and the user is not allowed to // configure the screen brightness. screenBrightness must be set. Supported on // Android 9 and above on fully managed devices. A NonComplianceDetail with - // API_LEVEL is reported if the Android version is less than 9. + // API_LEVEL is reported if the Android version is less than 9. Supported on + // work profiles on company-owned devices on Android 15 and above. ScreenBrightnessMode string `json:"screenBrightnessMode,omitempty"` // ForceSendFields is a list of field names (e.g. "ScreenBrightness") to // unconditionally include in API requests. By default, fields with empty or @@ -5551,7 +5573,8 @@ type ScreenTimeoutSettings struct { // devices. If this is set, screenTimeoutMode must be SCREEN_TIMEOUT_ENFORCED. // Supported on Android 9 and above on fully managed devices. A // NonComplianceDetail with API_LEVEL is reported if the Android version is - // less than 9. + // less than 9. Supported on work profiles on company-owned devices on Android + // 15 and above. ScreenTimeout string `json:"screenTimeout,omitempty"` // ScreenTimeoutMode: Optional. Controls whether the user is allowed to // configure the screen timeout. @@ -5565,7 +5588,8 @@ type ScreenTimeoutSettings struct { // the user is not allowed to configure the timeout. screenTimeout must be set. // Supported on Android 9 and above on fully managed devices. A // NonComplianceDetail with API_LEVEL is reported if the Android version is - // less than 9. + // less than 9. Supported on work profiles on company-owned devices on Android + // 15 and above. ScreenTimeoutMode string `json:"screenTimeoutMode,omitempty"` // ForceSendFields is a list of field names (e.g. "ScreenTimeout") to // unconditionally include in API requests. By default, fields with empty or diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index e2548b37290..5e204819667 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -181,7 +181,7 @@ "type": "string" }, "retention": { - "description": "Optional. This setting is applicable only for organizations that are soft-deleted (i.e., BillingType is not EVALUATION). It controls how long Organization data will be retained after the initial delete operation completes. During this period, the Organization may be restored to its last known state. After this period, the Organization will no longer be able to be restored. **Note: During the data retention period specified using this field, the Apigee organization cannot be recreated in the same GCP project.**", + "description": "Optional. This setting is applicable only for organizations that are soft-deleted (i.e., BillingType is not EVALUATION). It controls how long Organization data will be retained after the initial delete operation completes. During this period, the Organization may be restored to its last known state. After this period, the Organization will no longer be able to be restored. **Note: During the data retention period specified using this field, the Apigee organization cannot be recreated in the same Google Cloud project.**", "enum": [ "DELETION_RETENTION_UNSPECIFIED", "MINIMUM" @@ -10157,7 +10157,7 @@ } } }, - "revision": "20240905", + "revision": "20240919", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -12209,7 +12209,7 @@ "type": "string" }, "projectId": { - "description": "Required. GCP project in which the datastore exists", + "description": "Required. Google Cloud project in which the datastore exists", "type": "string" }, "tablePrefix": { diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 377fe3e6b6f..0c21f60bd46 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -3544,7 +3544,7 @@ type GoogleCloudApigeeV1DatastoreConfig struct { DatasetName string `json:"datasetName,omitempty"` // Path: Path of Cloud Storage bucket Required for `gcs` target_type. Path string `json:"path,omitempty"` - // ProjectId: Required. GCP project in which the datastore exists + // ProjectId: Required. Google Cloud project in which the datastore exists ProjectId string `json:"projectId,omitempty"` // TablePrefix: Prefix of BigQuery table Required for `bigquery` target_type. TablePrefix string `json:"tablePrefix,omitempty"` @@ -11856,7 +11856,7 @@ func (r *OrganizationsService) Delete(name string) *OrganizationsDeleteCall { // Organization may be restored to its last known state. After this period, the // Organization will no longer be able to be restored. **Note: During the data // retention period specified using this field, the Apigee organization cannot -// be recreated in the same GCP project.** +// be recreated in the same Google Cloud project.** // // Possible values: // diff --git a/bigqueryreservation/v1/bigqueryreservation-api.json b/bigqueryreservation/v1/bigqueryreservation-api.json index dc78d4b9818..69bfbe1e8b6 100644 --- a/bigqueryreservation/v1/bigqueryreservation-api.json +++ b/bigqueryreservation/v1/bigqueryreservation-api.json @@ -24,6 +24,11 @@ "endpointUrl": "https://bigqueryreservation.europe-west3.rep.googleapis.com/", "location": "europe-west3" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, { "description": "Regional Endpoint", "endpointUrl": "https://bigqueryreservation.europe-west9.rep.googleapis.com/", @@ -34,20 +39,65 @@ "endpointUrl": "https://bigqueryreservation.me-central2.rep.googleapis.com/", "location": "me-central2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-central2.rep.googleapis.com/", + "location": "us-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://bigqueryreservation.us-east4.rep.googleapis.com/", "location": "us-east4" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, { "description": "Regional Endpoint", "endpointUrl": "https://bigqueryreservation.us-east7.rep.googleapis.com/", "location": "us-east7" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://bigqueryreservation.us-west1.rep.googleapis.com/", "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-west4.rep.googleapis.com/", + "location": "us-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-west8.rep.googleapis.com/", + "location": "us-west8" } ], "fullyEncodeReservedExpansion": true, @@ -885,7 +935,7 @@ } } }, - "revision": "20240611", + "revision": "20240921", "rootUrl": "https://bigqueryreservation.googleapis.com/", "schemas": { "Assignment": { @@ -991,13 +1041,13 @@ "id": "CapacityCommitment", "properties": { "commitmentEndTime": { - "description": "Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.", + "description": "Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don't change commitment_start_time ,", "format": "google-datetime", "readOnly": true, "type": "string" }, "commitmentStartTime": { - "description": "Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.", + "description": "Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won't be changed. It refers to the start time of the original commitment.", "format": "google-datetime", "readOnly": true, "type": "string" diff --git a/bigqueryreservation/v1/bigqueryreservation-gen.go b/bigqueryreservation/v1/bigqueryreservation-gen.go index 4eca20cd674..412078f3b9b 100644 --- a/bigqueryreservation/v1/bigqueryreservation-gen.go +++ b/bigqueryreservation/v1/bigqueryreservation-gen.go @@ -343,10 +343,15 @@ func (s BiReservation) MarshalJSON() ([]byte, error) { // project. type CapacityCommitment struct { // CommitmentEndTime: Output only. The end of the current commitment period. It - // is applicable only for ACTIVE capacity commitments. + // is applicable only for ACTIVE capacity commitments. Note after renewal, + // commitment_end_time is the time the renewed commitment expires. So itwould + // be at a time after commitment_start_time + committed period, because we + // don't change commitment_start_time , CommitmentEndTime string `json:"commitmentEndTime,omitempty"` // CommitmentStartTime: Output only. The start of the current commitment - // period. It is applicable only for ACTIVE capacity commitments. + // period. It is applicable only for ACTIVE capacity commitments. Note after + // the commitment is renewed, commitment_start_time won't be changed. It refers + // to the start time of the original commitment. CommitmentStartTime string `json:"commitmentStartTime,omitempty"` // Edition: Edition of the capacity commitment. // diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index be0d67e7811..6496fb7e863 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -2194,7 +2194,7 @@ } } }, - "revision": "20240904", + "revision": "20240918", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2585,6 +2585,20 @@ "description": "The unique name of the cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/a-z*`.", "type": "string" }, + "nodeScalingFactor": { + "description": "Immutable. The node scaling factor of this cluster.", + "enum": [ + "NODE_SCALING_FACTOR_UNSPECIFIED", + "NODE_SCALING_FACTOR_1X", + "NODE_SCALING_FACTOR_2X" + ], + "enumDescriptions": [ + "No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.", + "The cluster is running with a scaling factor of 1.", + "The cluster is running with a scaling factor of 2. All node count values must be in increments of 2 with this scaling factor enabled, otherwise an INVALID_ARGUMENT error will be returned." + ], + "type": "string" + }, "serveNodes": { "description": "The number of nodes in the cluster. If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization.", "format": "int32", @@ -3306,6 +3320,7 @@ "properties": { "bytesType": { "$ref": "GoogleBigtableAdminV2TypeBytes", + "deprecated": true, "description": "Deprecated: ignored if set." } }, @@ -3347,6 +3362,7 @@ }, "utf8Raw": { "$ref": "GoogleBigtableAdminV2TypeStringEncodingUtf8Raw", + "deprecated": true, "description": "Deprecated: if set, converts to an empty `utf8_bytes`." } }, @@ -3359,6 +3375,7 @@ "type": "object" }, "GoogleBigtableAdminV2TypeStringEncodingUtf8Raw": { + "deprecated": true, "description": "Deprecated: prefer the equivalent `Utf8Bytes`.", "id": "GoogleBigtableAdminV2TypeStringEncodingUtf8Raw", "properties": {}, @@ -4031,7 +4048,7 @@ "type": "object" }, "RowAffinity": { - "description": "If enabled, the AFE will route the request based on the row key of the request, rather than randomly. Instead, each row key will be assigned to a cluster, and will stick to that cluster. If clusters are added or removed, then this may affect which row keys stick to which clusters. To avoid this, users can specify a group cluster.", + "description": "If enabled, Bigtable will route the request based on the row key of the request, rather than randomly. Instead, each row key will be assigned to a cluster, and will stick to that cluster. If clusters are added or removed, then this may affect which row keys stick to which clusters. To avoid this, users can use a cluster group to specify which clusters are to be used. In this case, new clusters that are not a part of the cluster group will not be routed to, and routing will be unaffected by the new cluster. Moreover, clusters specified in the cluster group cannot be deleted unless removed from the cluster group.", "id": "RowAffinity", "properties": {}, "type": "object" diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index 3b162fa8e0d..63a13c755b9 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -912,6 +912,17 @@ type Cluster struct { // Name: The unique name of the cluster. Values are of the form // `projects/{project}/instances/{instance}/clusters/a-z*`. Name string `json:"name,omitempty"` + // NodeScalingFactor: Immutable. The node scaling factor of this cluster. + // + // Possible values: + // "NODE_SCALING_FACTOR_UNSPECIFIED" - No node scaling specified. Defaults to + // NODE_SCALING_FACTOR_1X. + // "NODE_SCALING_FACTOR_1X" - The cluster is running with a scaling factor of + // 1. + // "NODE_SCALING_FACTOR_2X" - The cluster is running with a scaling factor of + // 2. All node count values must be in increments of 2 with this scaling factor + // enabled, otherwise an INVALID_ARGUMENT error will be returned. + NodeScalingFactor string `json:"nodeScalingFactor,omitempty"` // ServeNodes: The number of nodes in the cluster. If no value is set, Cloud // Bigtable automatically allocates nodes based on your data footprint and // optimized for 50% storage utilization. @@ -3149,11 +3160,15 @@ func (s RestoreTableRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RowAffinity: If enabled, the AFE will route the request based on the row key -// of the request, rather than randomly. Instead, each row key will be assigned -// to a cluster, and will stick to that cluster. If clusters are added or -// removed, then this may affect which row keys stick to which clusters. To -// avoid this, users can specify a group cluster. +// RowAffinity: If enabled, Bigtable will route the request based on the row +// key of the request, rather than randomly. Instead, each row key will be +// assigned to a cluster, and will stick to that cluster. If clusters are added +// or removed, then this may affect which row keys stick to which clusters. To +// avoid this, users can use a cluster group to specify which clusters are to +// be used. In this case, new clusters that are not a part of the cluster group +// will not be routed to, and routing will be unaffected by the new cluster. +// Moreover, clusters specified in the cluster group cannot be deleted unless +// removed from the cluster group. type RowAffinity struct { } diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 5f736389728..c785aa32fff 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -1344,7 +1344,7 @@ } } }, - "revision": "20240912", + "revision": "20240919", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { @@ -1367,7 +1367,7 @@ "type": "string" }, "audience": { - "description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`.", + "description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`. This field is not populated when using the `chat.bot` scope with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).", "type": "string" } }, diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 620ebfe36f1..ea39d62fda7 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -412,7 +412,9 @@ type AccessSettings struct { // audience // (https://developers.google.com/workspace/chat/space-target-audience). // Format: `audiences/{audience}` To use the default target audience for the - // Google Workspace organization, set to `audiences/default`. + // Google Workspace organization, set to `audiences/default`. This field is not + // populated when using the `chat.bot` scope with app authentication + // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Audience string `json:"audience,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessState") to // unconditionally include in API requests. By default, fields with empty or diff --git a/developerconnect/v1/developerconnect-api.json b/developerconnect/v1/developerconnect-api.json index b10e36bd582..4b6f7bba56f 100644 --- a/developerconnect/v1/developerconnect-api.json +++ b/developerconnect/v1/developerconnect-api.json @@ -428,7 +428,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Optional. Required. Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -847,7 +847,7 @@ } } }, - "revision": "20240822", + "revision": "20240919", "rootUrl": "https://developerconnect.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -873,6 +873,10 @@ "readOnly": true, "type": "string" }, + "cryptoKeyConfig": { + "$ref": "CryptoKeyConfig", + "description": "Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature." + }, "deleteTime": { "description": "Output only. [Output only] Delete timestamp", "format": "google-datetime", @@ -891,6 +895,18 @@ "$ref": "GitHubConfig", "description": "Configuration for connections to github.com." }, + "githubEnterpriseConfig": { + "$ref": "GitHubEnterpriseConfig", + "description": "Configuration for connections to an instance of GitHub Enterprise." + }, + "gitlabConfig": { + "$ref": "GitLabConfig", + "description": "Configuration for connections to gitlab.com." + }, + "gitlabEnterpriseConfig": { + "$ref": "GitLabEnterpriseConfig", + "description": "Configuration for connections to an instance of GitLab Enterprise." + }, "installationState": { "$ref": "InstallationState", "description": "Output only. Installation state of the Connection.", @@ -926,6 +942,17 @@ }, "type": "object" }, + "CryptoKeyConfig": { + "description": "The crypto key configuration. This field is used by the Customer-managed encryption keys (CMEK) feature.", + "id": "CryptoKeyConfig", + "properties": { + "keyReference": { + "description": "Required. The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + } + }, + "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", @@ -1069,6 +1096,113 @@ }, "type": "object" }, + "GitHubEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitHub Enterprise.", + "id": "GitHubEnterpriseConfig", + "properties": { + "appId": { + "description": "Optional. ID of the GitHub App created from the manifest.", + "format": "int64", + "type": "string" + }, + "appInstallationId": { + "description": "Optional. ID of the installation of the GitHub App.", + "format": "int64", + "type": "string" + }, + "appSlug": { + "description": "Output only. The URL-friendly name of the GitHub App.", + "readOnly": true, + "type": "string" + }, + "hostUri": { + "description": "Required. The URI of the GitHub Enterprise host this connection is for.", + "type": "string" + }, + "installationUri": { + "description": "Output only. The URI to navigate to in order to manage the installation associated with this GitHubEnterpriseConfig.", + "readOnly": true, + "type": "string" + }, + "privateKeySecretVersion": { + "description": "Optional. SecretManager resource containing the private key of the GitHub App, formatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "serverVersion": { + "description": "Output only. GitHub Enterprise version installed at the host_uri.", + "readOnly": true, + "type": "string" + }, + "serviceDirectoryConfig": { + "$ref": "ServiceDirectoryConfig", + "description": "Optional. Configuration for using Service Directory to privately connect to a GitHub Enterprise server. This should only be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitHub Enterprise server will be made over the public internet." + }, + "sslCaCertificate": { + "description": "Optional. SSL certificate to use for requests to GitHub Enterprise.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Optional. SecretManager resource containing the webhook secret of the GitHub App, formatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + } + }, + "type": "object" + }, + "GitLabConfig": { + "description": "Configuration for connections to gitlab.com.", + "id": "GitLabConfig", + "properties": { + "authorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A GitLab personal access token with the minimum `api` scope access and a minimum role of `maintainer`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to." + }, + "readAuthorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A GitLab personal access token with the minimum `read_api` scope access and a minimum role of `reporter`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to." + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as `projects/*/secrets/*/versions/*`. This is used to validate webhooks.", + "type": "string" + } + }, + "type": "object" + }, + "GitLabEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitLab Enterprise.", + "id": "GitLabEnterpriseConfig", + "properties": { + "authorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A GitLab personal access token with the minimum `api` scope access and a minimum role of `maintainer`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to." + }, + "hostUri": { + "description": "Required. The URI of the GitLab Enterprise host this connection is for.", + "type": "string" + }, + "readAuthorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A GitLab personal access token with the minimum `read_api` scope access and a minimum role of `reporter`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to." + }, + "serverVersion": { + "description": "Output only. Version of the GitLab Enterprise server running on the `host_uri`.", + "readOnly": true, + "type": "string" + }, + "serviceDirectoryConfig": { + "$ref": "ServiceDirectoryConfig", + "description": "Optional. Configuration for using Service Directory to privately connect to a GitLab Enterprise instance. This should only be set if the GitLab Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitLab Enterprise server will be made over the public internet." + }, + "sslCaCertificate": { + "description": "Optional. SSL Certificate Authority certificate to use for requests to GitLab Enterprise instance.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as `projects/*/secrets/*/versions/*`. This is used to validate webhooks.", + "type": "string" + } + }, + "type": "object" + }, "GitRepositoryLink": { "description": "Message describing the GitRepositoryLink object", "id": "GitRepositoryLink", @@ -1126,6 +1260,11 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "webhookId": { + "description": "Output only. External ID of the webhook created for the repository.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1412,6 +1551,17 @@ }, "type": "object" }, + "ServiceDirectoryConfig": { + "description": "ServiceDirectoryConfig represents Service Directory configuration for a connection.", + "id": "ServiceDirectoryConfig", + "properties": { + "service": { + "description": "Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.", + "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", @@ -1438,6 +1588,22 @@ } }, "type": "object" + }, + "UserCredential": { + "description": "Represents a personal access token that authorized the Connection, and associated metadata.", + "id": "UserCredential", + "properties": { + "userTokenSecretVersion": { + "description": "Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "username": { + "description": "Output only. The username associated with this token.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/developerconnect/v1/developerconnect-gen.go b/developerconnect/v1/developerconnect-gen.go index 568985f827e..d8d1611c062 100644 --- a/developerconnect/v1/developerconnect-gen.go +++ b/developerconnect/v1/developerconnect-gen.go @@ -222,6 +222,9 @@ type Connection struct { Annotations map[string]string `json:"annotations,omitempty"` // CreateTime: Output only. [Output only] Create timestamp CreateTime string `json:"createTime,omitempty"` + // CryptoKeyConfig: Optional. The crypto key configuration. This field is used + // by the Customer-Managed Encryption Keys (CMEK) feature. + CryptoKeyConfig *CryptoKeyConfig `json:"cryptoKeyConfig,omitempty"` // DeleteTime: Output only. [Output only] Delete timestamp DeleteTime string `json:"deleteTime,omitempty"` // Disabled: Optional. If disabled is set to true, functionality is disabled @@ -234,6 +237,14 @@ type Connection struct { Etag string `json:"etag,omitempty"` // GithubConfig: Configuration for connections to github.com. GithubConfig *GitHubConfig `json:"githubConfig,omitempty"` + // GithubEnterpriseConfig: Configuration for connections to an instance of + // GitHub Enterprise. + GithubEnterpriseConfig *GitHubEnterpriseConfig `json:"githubEnterpriseConfig,omitempty"` + // GitlabConfig: Configuration for connections to gitlab.com. + GitlabConfig *GitLabConfig `json:"gitlabConfig,omitempty"` + // GitlabEnterpriseConfig: Configuration for connections to an instance of + // GitLab Enterprise. + GitlabEnterpriseConfig *GitLabEnterpriseConfig `json:"gitlabEnterpriseConfig,omitempty"` // InstallationState: Output only. Installation state of the Connection. InstallationState *InstallationState `json:"installationState,omitempty"` // Labels: Optional. Labels as key value pairs @@ -270,6 +281,31 @@ func (s Connection) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CryptoKeyConfig: The crypto key configuration. This field is used by the +// Customer-managed encryption keys (CMEK) feature. +type CryptoKeyConfig struct { + // KeyReference: Required. The name of the key which is used to encrypt/decrypt + // customer data. For key in Cloud KMS, the key should be in the format of + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + KeyReference string `json:"keyReference,omitempty"` + // ForceSendFields is a list of field names (e.g. "KeyReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "KeyReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CryptoKeyConfig) MarshalJSON() ([]byte, error) { + type NoMethod CryptoKeyConfig + 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 @@ -473,6 +509,143 @@ func (s GitHubConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GitHubEnterpriseConfig: Configuration for connections to an instance of +// GitHub Enterprise. +type GitHubEnterpriseConfig struct { + // AppId: Optional. ID of the GitHub App created from the manifest. + AppId int64 `json:"appId,omitempty,string"` + // AppInstallationId: Optional. ID of the installation of the GitHub App. + AppInstallationId int64 `json:"appInstallationId,omitempty,string"` + // AppSlug: Output only. The URL-friendly name of the GitHub App. + AppSlug string `json:"appSlug,omitempty"` + // HostUri: Required. The URI of the GitHub Enterprise host this connection is + // for. + HostUri string `json:"hostUri,omitempty"` + // InstallationUri: Output only. The URI to navigate to in order to manage the + // installation associated with this GitHubEnterpriseConfig. + InstallationUri string `json:"installationUri,omitempty"` + // PrivateKeySecretVersion: Optional. SecretManager resource containing the + // private key of the GitHub App, formatted as + // `projects/*/secrets/*/versions/*`. + PrivateKeySecretVersion string `json:"privateKeySecretVersion,omitempty"` + // ServerVersion: Output only. GitHub Enterprise version installed at the + // host_uri. + ServerVersion string `json:"serverVersion,omitempty"` + // ServiceDirectoryConfig: Optional. Configuration for using Service Directory + // to privately connect to a GitHub Enterprise server. This should only be set + // if the GitHub Enterprise server is hosted on-premises and not reachable by + // public internet. If this field is left empty, calls to the GitHub Enterprise + // server will be made over the public internet. + ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` + // SslCaCertificate: Optional. SSL certificate to use for requests to GitHub + // Enterprise. + SslCaCertificate string `json:"sslCaCertificate,omitempty"` + // WebhookSecretSecretVersion: Optional. SecretManager resource containing the + // webhook secret of the GitHub App, formatted as + // `projects/*/secrets/*/versions/*`. + WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AppId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AppId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GitHubEnterpriseConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitHubEnterpriseConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GitLabConfig: Configuration for connections to gitlab.com. +type GitLabConfig struct { + // AuthorizerCredential: Required. A GitLab personal access token with the + // minimum `api` scope access and a minimum role of `maintainer`. The GitLab + // Projects visible to this Personal Access Token will control which Projects + // Developer Connect has access to. + AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` + // ReadAuthorizerCredential: Required. A GitLab personal access token with the + // minimum `read_api` scope access and a minimum role of `reporter`. The GitLab + // Projects visible to this Personal Access Token will control which Projects + // Developer Connect has access to. + ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` + // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource + // containing the webhook secret of a GitLab project, formatted as + // `projects/*/secrets/*/versions/*`. This is used to validate webhooks. + WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthorizerCredential") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GitLabConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitLabConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GitLabEnterpriseConfig: Configuration for connections to an instance of +// GitLab Enterprise. +type GitLabEnterpriseConfig struct { + // AuthorizerCredential: Required. A GitLab personal access token with the + // minimum `api` scope access and a minimum role of `maintainer`. The GitLab + // Projects visible to this Personal Access Token will control which Projects + // Developer Connect has access to. + AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` + // HostUri: Required. The URI of the GitLab Enterprise host this connection is + // for. + HostUri string `json:"hostUri,omitempty"` + // ReadAuthorizerCredential: Required. A GitLab personal access token with the + // minimum `read_api` scope access and a minimum role of `reporter`. The GitLab + // Projects visible to this Personal Access Token will control which Projects + // Developer Connect has access to. + ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` + // ServerVersion: Output only. Version of the GitLab Enterprise server running + // on the `host_uri`. + ServerVersion string `json:"serverVersion,omitempty"` + // ServiceDirectoryConfig: Optional. Configuration for using Service Directory + // to privately connect to a GitLab Enterprise instance. This should only be + // set if the GitLab Enterprise server is hosted on-premises and not reachable + // by public internet. If this field is left empty, calls to the GitLab + // Enterprise server will be made over the public internet. + ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` + // SslCaCertificate: Optional. SSL Certificate Authority certificate to use for + // requests to GitLab Enterprise instance. + SslCaCertificate string `json:"sslCaCertificate,omitempty"` + // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource + // containing the webhook secret of a GitLab project, formatted as + // `projects/*/secrets/*/versions/*`. This is used to validate webhooks. + WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthorizerCredential") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GitLabEnterpriseConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitLabEnterpriseConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GitRepositoryLink: Message describing the GitRepositoryLink object type GitRepositoryLink struct { // Annotations: Optional. Allows clients to store small amounts of arbitrary @@ -501,6 +674,9 @@ type GitRepositoryLink struct { Uid string `json:"uid,omitempty"` // UpdateTime: Output only. [Output only] Update timestamp UpdateTime string `json:"updateTime,omitempty"` + // WebhookId: Output only. External ID of the webhook created for the + // repository. + WebhookId string `json:"webhookId,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -879,6 +1055,31 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ServiceDirectoryConfig: ServiceDirectoryConfig represents Service Directory +// configuration for a connection. +type ServiceDirectoryConfig struct { + // Service: Required. The Service Directory service name. Format: + // projects/{project}/locations/{location}/namespaces/{namespace}/services/{serv + // ice}. + Service string `json:"service,omitempty"` + // ForceSendFields is a list of field names (e.g. "Service") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Service") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ServiceDirectoryConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceDirectoryConfig + 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 @@ -913,6 +1114,33 @@ func (s Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// UserCredential: Represents a personal access token that authorized the +// Connection, and associated metadata. +type UserCredential struct { + // UserTokenSecretVersion: Required. A SecretManager resource containing the + // user token that authorizes the Developer Connect connection. Format: + // `projects/*/secrets/*/versions/*`. + UserTokenSecretVersion string `json:"userTokenSecretVersion,omitempty"` + // Username: Output only. The username associated with this token. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "UserTokenSecretVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UserTokenSecretVersion") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s UserCredential) MarshalJSON() ([]byte, error) { + type NoMethod UserCredential + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ProjectsLocationsGetCall struct { s *Service name string diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 26f92d25710..ae3c5d97133 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240902", + "revision": "20240920", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -6105,6 +6105,8 @@ "CLUSTER_HAS_ZERO_NODES", "UNSUPPORTED_MULTIPLE_CONTROL_PLANES", "VPCSC_GA_SUPPORTED", + "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT", + "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT_SAFE", "CONFIG_APPLY_INTERNAL_ERROR", "CONFIG_VALIDATION_ERROR", "CONFIG_VALIDATION_WARNING", @@ -6122,7 +6124,11 @@ "QUOTA_EXCEEDED_SERVICE_LB_POLICIES", "QUOTA_EXCEEDED_HTTP_FILTERS", "QUOTA_EXCEEDED_TCP_FILTERS", - "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS" + "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS", + "MODERNIZATION_SCHEDULED", + "MODERNIZATION_IN_PROGRESS", + "MODERNIZATION_COMPLETED", + "MODERNIZATION_ABORTED" ], "enumDescriptions": [ "Default Unspecified code", @@ -6136,6 +6142,8 @@ "Cluster has zero node code", "Multiple control planes unsupported error code", "VPC-SC GA is supported for this control plane.", + "User is using deprecated ControlPlaneManagement and they have not yet set Management.", + "User is using deprecated ControlPlaneManagement and they have already set Management.", "Configuration (Istio/k8s resources) failed to apply due to internal error.", "Configuration failed to be applied due to being invalid.", "Encountered configuration(s) with possible unintended behavior or invalid configuration. These configs may not have been applied.", @@ -6153,7 +6161,11 @@ "ServiceLBPolicy quota exceeded error code.", "HTTPFilter quota exceeded error code.", "TCPFilter quota exceeded error code.", - "NetworkEndpointGroup quota exceeded error code." + "NetworkEndpointGroup quota exceeded error code.", + "Modernization is scheduled for a cluster.", + "Modernization is in progress for a cluster.", + "Modernization is completed for a cluster.", + "Modernization is aborted for a cluster." ], "type": "string" }, diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index 897b874221c..f6bf9192de2 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -5362,6 +5362,10 @@ type ServiceMeshCondition struct { // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes // unsupported error code // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control plane. + // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT" - User is using deprecated + // ControlPlaneManagement and they have not yet set Management. + // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT_SAFE" - User is using deprecated + // ControlPlaneManagement and they have already set Management. // "CONFIG_APPLY_INTERNAL_ERROR" - Configuration (Istio/k8s resources) failed // to apply due to internal error. // "CONFIG_VALIDATION_ERROR" - Configuration failed to be applied due to @@ -5391,6 +5395,10 @@ type ServiceMeshCondition struct { // "QUOTA_EXCEEDED_TCP_FILTERS" - TCPFilter quota exceeded error code. // "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS" - NetworkEndpointGroup quota // exceeded error code. + // "MODERNIZATION_SCHEDULED" - Modernization is scheduled for a cluster. + // "MODERNIZATION_IN_PROGRESS" - Modernization is in progress for a cluster. + // "MODERNIZATION_COMPLETED" - Modernization is completed for a cluster. + // "MODERNIZATION_ABORTED" - Modernization is aborted for a cluster. Code string `json:"code,omitempty"` // Details: A short summary about the issue. Details string `json:"details,omitempty"` diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index 737e2f9ae4d..eb1d0deed16 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -684,13 +684,8 @@ "required": true, "type": "string" }, - "timeZone.id": { - "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", - "location": "query", - "type": "string" - }, - "timeZone.version": { - "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "timeZone": { + "description": "Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in human-readable fields. For example 'America/Los_Angeles'. If not set, 'America/Los_Angeles' will be used.", "location": "query", "type": "string" } @@ -1417,7 +1412,7 @@ } } }, - "revision": "20240916", + "revision": "20240923", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AcceptTermsOfService": { @@ -1492,6 +1487,12 @@ }, "type": "object" }, + "AccountAggregation": { + "description": "`AccountAggregation` payload.", + "id": "AccountAggregation", + "properties": {}, + "type": "object" + }, "AccountIssue": { "description": "An [`AccountIssue`](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account).", "id": "AccountIssue", @@ -1543,8 +1544,8 @@ "id": "AddAccountService", "properties": { "accountAggregation": { - "$ref": "Empty", - "description": "The provider is an aggregator for the account." + "$ref": "AccountAggregation", + "description": "The provider is an [aggregator](https://support.google.com/merchants/answer/188487) for the account. Payload for service type Account Aggregation." }, "provider": { "description": "Optional. The provider of the service. Format: `accounts/{account}`", @@ -1772,7 +1773,7 @@ "description": "Required. The account to be created." }, "service": { - "description": "Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently only `account_aggregation` is supported which means the newly created account will be a subaccount of the provider defined in the `account_aggregation` service.", + "description": "Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `account_aggregation`, which means you can only create sub accounts, not standalone account through this method. Additional `account_management` or `product_management` services may be provided.", "items": { "$ref": "AddAccountService" }, diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index c8815f602ff..361ee2ccd9e 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -425,6 +425,10 @@ func (s Account) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AccountAggregation: `AccountAggregation` payload. +type AccountAggregation struct { +} + // AccountIssue: An `AccountIssue` // (https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). type AccountIssue struct { @@ -470,8 +474,10 @@ func (s AccountIssue) MarshalJSON() ([]byte, error) { // AddAccountService: Additional instructions to add account services during // creation of the account. type AddAccountService struct { - // AccountAggregation: The provider is an aggregator for the account. - AccountAggregation *Empty `json:"accountAggregation,omitempty"` + // AccountAggregation: The provider is an aggregator + // (https://support.google.com/merchants/answer/188487) for the account. + // Payload for service type Account Aggregation. + AccountAggregation *AccountAggregation `json:"accountAggregation,omitempty"` // Provider: Optional. The provider of the service. Format: // `accounts/{account}` Provider string `json:"provider,omitempty"` @@ -760,9 +766,10 @@ type CreateAndConfigureAccountRequest struct { Account *Account `json:"account,omitempty"` // Service: Required. An account service between the account to be created and // the provider account is initialized as part of the creation. At least one - // such service needs to be provided. Currently only `account_aggregation` is - // supported which means the newly created account will be a subaccount of the - // provider defined in the `account_aggregation` service. + // such service needs to be provided. Currently exactly one of these needs to + // be `account_aggregation`, which means you can only create sub accounts, not + // standalone account through this method. Additional `account_management` or + // `product_management` services may be provided. Service []*AddAccountService `json:"service,omitempty"` // Users: Optional. Users to be added to the account. Users []*CreateUserRequest `json:"users,omitempty"` @@ -5147,17 +5154,12 @@ func (c *AccountsIssuesListCall) PageToken(pageToken string) *AccountsIssuesList return c } -// TimeZoneId sets the optional parameter "timeZone.id": IANA Time Zone -// Database time zone, e.g. "America/New_York". -func (c *AccountsIssuesListCall) TimeZoneId(timeZoneId string) *AccountsIssuesListCall { - c.urlParams_.Set("timeZone.id", timeZoneId) - return c -} - -// TimeZoneVersion sets the optional parameter "timeZone.version": IANA Time -// Zone Database version number, e.g. "2019a". -func (c *AccountsIssuesListCall) TimeZoneVersion(timeZoneVersion string) *AccountsIssuesListCall { - c.urlParams_.Set("timeZone.version", timeZoneVersion) +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in +// human-readable fields. For example 'America/Los_Angeles'. If not set, +// 'America/Los_Angeles' will be used. +func (c *AccountsIssuesListCall) TimeZone(timeZone string) *AccountsIssuesListCall { + c.urlParams_.Set("timeZone", timeZone) return c } diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json index 44e9ae9ed22..b9f17ad94e5 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json @@ -435,7 +435,7 @@ } } }, - "revision": "20240617", + "revision": "20240922", "rootUrl": "https://paymentsresellersubscription.googleapis.com/", "schemas": { "GoogleCloudPaymentsResellerSubscriptionV1Amount": { @@ -478,7 +478,7 @@ "CANCELLATION_REASON_OTHER" ], "enumDescriptions": [ - "Reason is unspecified.", + "Reason is unspecified. Should not be used.", "Fraudualant transaction.", "Buyer's remorse.", "Accidential purchase.", @@ -1182,7 +1182,7 @@ "CANCELLATION_REASON_OTHER" ], "enumDescriptions": [ - "Reason is unspecified.", + "Reason is unspecified. Should not be used.", "Fraudualant transaction.", "Buyer's remorse.", "Accidential purchase.", diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go index e0ebe1ba5d8..6aaa21d4dae 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go @@ -238,7 +238,8 @@ type GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest struct { // CancellationReason: Specifies the reason for the cancellation. // // Possible values: - // "CANCELLATION_REASON_UNSPECIFIED" - Reason is unspecified. + // "CANCELLATION_REASON_UNSPECIFIED" - Reason is unspecified. Should not be + // used. // "CANCELLATION_REASON_FRAUD" - Fraudualant transaction. // "CANCELLATION_REASON_REMORSE" - Buyer's remorse. // "CANCELLATION_REASON_ACCIDENTAL_PURCHASE" - Accidential purchase. @@ -1147,7 +1148,8 @@ type GoogleCloudPaymentsResellerSubscriptionV1SubscriptionCancellationDetails st // Reason: Output only. The reason of the cancellation. // // Possible values: - // "CANCELLATION_REASON_UNSPECIFIED" - Reason is unspecified. + // "CANCELLATION_REASON_UNSPECIFIED" - Reason is unspecified. Should not be + // used. // "CANCELLATION_REASON_FRAUD" - Fraudualant transaction. // "CANCELLATION_REASON_REMORSE" - Buyer's remorse. // "CANCELLATION_REASON_ACCIDENTAL_PURCHASE" - Accidential purchase. diff --git a/places/v1/places-api.json b/places/v1/places-api.json index 1a70c0ca00e..2865f97752a 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -14,6 +14,9 @@ "https://www.googleapis.com/auth/maps-platform.places.details": { "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.details" }, + "https://www.googleapis.com/auth/maps-platform.places.getphotomedia": { + "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.getphotomedia" + }, "https://www.googleapis.com/auth/maps-platform.places.nearbysearch": { "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.nearbysearch" }, @@ -268,7 +271,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/maps-platform.places" + "https://www.googleapis.com/auth/maps-platform.places", + "https://www.googleapis.com/auth/maps-platform.places.getphotomedia" ] } } @@ -276,7 +280,7 @@ } } }, - "revision": "20240918", + "revision": "20240920", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index 9e9e1c6b7db..4876f506eb6 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -115,6 +115,10 @@ const ( // https://www.googleapis.com/auth/maps-platform.places.details MapsPlatformPlacesDetailsScope = "https://www.googleapis.com/auth/maps-platform.places.details" + // Private Service: + // https://www.googleapis.com/auth/maps-platform.places.getphotomedia + MapsPlatformPlacesGetphotomediaScope = "https://www.googleapis.com/auth/maps-platform.places.getphotomedia" + // Private Service: // https://www.googleapis.com/auth/maps-platform.places.nearbysearch MapsPlatformPlacesNearbysearchScope = "https://www.googleapis.com/auth/maps-platform.places.nearbysearch" @@ -131,6 +135,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/maps-platform.places", "https://www.googleapis.com/auth/maps-platform.places.autocomplete", "https://www.googleapis.com/auth/maps-platform.places.details", + "https://www.googleapis.com/auth/maps-platform.places.getphotomedia", "https://www.googleapis.com/auth/maps-platform.places.nearbysearch", "https://www.googleapis.com/auth/maps-platform.places.textsearch", ) diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index d117d6ee1c3..4d98b3b1c2c 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -281,6 +281,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getGenerativeQuestionFeature": { + "description": "Manages overal generative question feature state -- enables toggling feature on and off.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestionFeature", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getGenerativeQuestionFeature", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+catalog}/generativeQuestionFeature", + "response": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionsFeatureConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists all the Catalogs associated with the project.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs", @@ -446,6 +471,74 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateGenerativeQuestion": { + "description": "Allows management of individual questions.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestion", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateGenerativeQuestion", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionConfig to update. The following are NOT supported: * GenerativeQuestionConfig.frequency If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+catalog}/generativeQuestion", + "request": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateGenerativeQuestionFeature": { + "description": "Manages overal generative question feature state -- enables toggling feature on and off.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestionFeature", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateGenerativeQuestionFeature", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the affected catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionsFeatureConfig to update. If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+catalog}/generativeQuestionFeature", + "request": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionsFeatureConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionsFeatureConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1133,6 +1226,67 @@ } } }, + "generativeQuestion": { + "methods": { + "batchUpdate": { + "description": "Allows management of multiple questions.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestion:batchUpdate", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.generativeQuestion.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Optional. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/generativeQuestion:batchUpdate", + "request": { + "$ref": "GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "generativeQuestions": { + "methods": { + "list": { + "description": "Returns all questions for a given catalog.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestions", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.generativeQuestions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/generativeQuestions", + "response": { + "$ref": "GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "models": { "methods": { "create": { @@ -2092,7 +2246,7 @@ } } }, - "revision": "20240912", + "revision": "20240920", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2400,6 +2554,34 @@ }, "type": "object" }, + "GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest": { + "description": "Request for BatchUpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest", + "properties": { + "requests": { + "description": "Required. The updates question configs.", + "items": { + "$ref": "GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse": { + "description": "Aggregated response for UpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse", + "properties": { + "generativeQuestionConfigs": { + "description": "Optional. The updates question configs.", + "items": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2BigQueryOutputResult": { "description": "A BigQuery output result.", "id": "GoogleCloudRetailV2BigQueryOutputResult", @@ -3170,6 +3352,68 @@ }, "type": "object" }, + "GoogleCloudRetailV2GenerativeQuestionConfig": { + "description": "Configuration for a single generated question.", + "id": "GoogleCloudRetailV2GenerativeQuestionConfig", + "properties": { + "allowedInConversation": { + "description": "Optional. Whether the question is asked at serving time.", + "type": "boolean" + }, + "catalog": { + "description": "Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "type": "string" + }, + "exampleValues": { + "description": "Output only. Values that can be used to answer the question.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "facet": { + "description": "Required. The facet to which the question is associated.", + "type": "string" + }, + "finalQuestion": { + "description": "Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.", + "type": "string" + }, + "frequency": { + "description": "Output only. The ratio of how often a question was asked.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "generatedQuestion": { + "description": "Output only. The LLM generated question.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2GenerativeQuestionsFeatureConfig": { + "description": "Configuration for overall generative question feature state.", + "id": "GoogleCloudRetailV2GenerativeQuestionsFeatureConfig", + "properties": { + "catalog": { + "description": "Required. Resource name of the affected catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "type": "string" + }, + "featureEnabled": { + "description": "Optional. Determines whether questions will be used at serving time. Note: This feature cannot be enabled until initial data requirements are satisfied.", + "type": "boolean" + }, + "minimumProducts": { + "description": "Optional. Minimum number of products in the response to trigger follow-up questions. Value must be 0 or positive.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRetailV2GetDefaultBranchResponse": { "description": "Response message of CatalogService.GetDefaultBranch.", "id": "GoogleCloudRetailV2GetDefaultBranchResponse", @@ -3448,6 +3692,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse": { + "description": "Response for ListQuestions method.", + "id": "GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse", + "properties": { + "generativeQuestionConfigs": { + "description": "All the questions for a given catalog.", + "items": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ListModelsResponse": { "description": "Response to a ListModelRequest.", "id": "GoogleCloudRetailV2ListModelsResponse", @@ -5692,6 +5950,22 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest": { + "description": "Request for UpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest", + "properties": { + "generativeQuestionConfig": { + "$ref": "GoogleCloudRetailV2GenerativeQuestionConfig", + "description": "Required. The question to update." + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionConfig to update. The following are NOT supported: * GenerativeQuestionConfig.frequency If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2UserEvent": { "description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", "id": "GoogleCloudRetailV2UserEvent", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 72d381d3e50..8e0309fff45 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -190,6 +190,8 @@ func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsS rs.Branches = NewProjectsLocationsCatalogsBranchesService(s) rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s) rs.Controls = NewProjectsLocationsCatalogsControlsService(s) + rs.GenerativeQuestion = NewProjectsLocationsCatalogsGenerativeQuestionService(s) + rs.GenerativeQuestions = NewProjectsLocationsCatalogsGenerativeQuestionsService(s) rs.Models = NewProjectsLocationsCatalogsModelsService(s) rs.Operations = NewProjectsLocationsCatalogsOperationsService(s) rs.Placements = NewProjectsLocationsCatalogsPlacementsService(s) @@ -209,6 +211,10 @@ type ProjectsLocationsCatalogsService struct { Controls *ProjectsLocationsCatalogsControlsService + GenerativeQuestion *ProjectsLocationsCatalogsGenerativeQuestionService + + GenerativeQuestions *ProjectsLocationsCatalogsGenerativeQuestionsService + Models *ProjectsLocationsCatalogsModelsService Operations *ProjectsLocationsCatalogsOperationsService @@ -280,6 +286,24 @@ type ProjectsLocationsCatalogsControlsService struct { s *Service } +func NewProjectsLocationsCatalogsGenerativeQuestionService(s *Service) *ProjectsLocationsCatalogsGenerativeQuestionService { + rs := &ProjectsLocationsCatalogsGenerativeQuestionService{s: s} + return rs +} + +type ProjectsLocationsCatalogsGenerativeQuestionService struct { + s *Service +} + +func NewProjectsLocationsCatalogsGenerativeQuestionsService(s *Service) *ProjectsLocationsCatalogsGenerativeQuestionsService { + rs := &ProjectsLocationsCatalogsGenerativeQuestionsService{s: s} + return rs +} + +type ProjectsLocationsCatalogsGenerativeQuestionsService struct { + s *Service +} + func NewProjectsLocationsCatalogsModelsService(s *Service) *ProjectsLocationsCatalogsModelsService { rs := &ProjectsLocationsCatalogsModelsService{s: s} return rs @@ -821,6 +845,55 @@ func (s GoogleCloudRetailV2Audience) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest: Request for +// BatchUpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest struct { + // Requests: Required. The updates question configs. + Requests []*GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Requests") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse: Aggregated +// response for UpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse struct { + // GenerativeQuestionConfigs: Optional. The updates question configs. + GenerativeQuestionConfigs []*GoogleCloudRetailV2GenerativeQuestionConfig `json:"generativeQuestionConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfigs") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfigs") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2BigQueryOutputResult: A BigQuery output result. type GoogleCloudRetailV2BigQueryOutputResult struct { // DatasetId: The ID of a BigQuery Dataset. @@ -2031,6 +2104,96 @@ func (s GoogleCloudRetailV2GcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2GenerativeQuestionConfig: Configuration for a single +// generated question. +type GoogleCloudRetailV2GenerativeQuestionConfig struct { + // AllowedInConversation: Optional. Whether the question is asked at serving + // time. + AllowedInConversation bool `json:"allowedInConversation,omitempty"` + // Catalog: Required. Resource name of the catalog. Format: + // projects/{project}/locations/{location}/catalogs/{catalog} + Catalog string `json:"catalog,omitempty"` + // ExampleValues: Output only. Values that can be used to answer the question. + ExampleValues []string `json:"exampleValues,omitempty"` + // Facet: Required. The facet to which the question is associated. + Facet string `json:"facet,omitempty"` + // FinalQuestion: Optional. The question that will be used at serving time. + // Question can have a max length of 300 bytes. When not populated, + // generated_question should be used. + FinalQuestion string `json:"finalQuestion,omitempty"` + // Frequency: Output only. The ratio of how often a question was asked. + Frequency float64 `json:"frequency,omitempty"` + // GeneratedQuestion: Output only. The LLM generated question. + GeneratedQuestion string `json:"generatedQuestion,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AllowedInConversation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllowedInConversation") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2GenerativeQuestionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2GenerativeQuestionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudRetailV2GenerativeQuestionConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudRetailV2GenerativeQuestionConfig + var s1 struct { + Frequency gensupport.JSONFloat64 `json:"frequency"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Frequency = float64(s1.Frequency) + return nil +} + +// GoogleCloudRetailV2GenerativeQuestionsFeatureConfig: Configuration for +// overall generative question feature state. +type GoogleCloudRetailV2GenerativeQuestionsFeatureConfig struct { + // Catalog: Required. Resource name of the affected catalog. Format: + // projects/{project}/locations/{location}/catalogs/{catalog} + Catalog string `json:"catalog,omitempty"` + // FeatureEnabled: Optional. Determines whether questions will be used at + // serving time. Note: This feature cannot be enabled until initial data + // requirements are satisfied. + FeatureEnabled bool `json:"featureEnabled,omitempty"` + // MinimumProducts: Optional. Minimum number of products in the response to + // trigger follow-up questions. Value must be 0 or positive. + MinimumProducts int64 `json:"minimumProducts,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Catalog") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Catalog") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2GenerativeQuestionsFeatureConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2GenerativeQuestionsFeatureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2GetDefaultBranchResponse: Response message of // CatalogService.GetDefaultBranch. type GoogleCloudRetailV2GetDefaultBranchResponse struct { @@ -2453,6 +2616,32 @@ func (s GoogleCloudRetailV2ListControlsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse: Response for +// ListQuestions method. +type GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse struct { + // GenerativeQuestionConfigs: All the questions for a given catalog. + GenerativeQuestionConfigs []*GoogleCloudRetailV2GenerativeQuestionConfig `json:"generativeQuestionConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfigs") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfigs") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ListModelsResponse: Response to a ListModelRequest. type GoogleCloudRetailV2ListModelsResponse struct { // Models: List of Models. @@ -5993,6 +6182,34 @@ type GoogleCloudRetailV2TuneModelRequest struct { type GoogleCloudRetailV2TuneModelResponse struct { } +// GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest: Request for +// UpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest struct { + // GenerativeQuestionConfig: Required. The question to update. + GenerativeQuestionConfig *GoogleCloudRetailV2GenerativeQuestionConfig `json:"generativeQuestionConfig,omitempty"` + // UpdateMask: Optional. Indicates which fields in the provided + // GenerativeQuestionConfig to update. The following are NOT supported: * + // GenerativeQuestionConfig.frequency If not set or empty, all supported fields + // are updated. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfig") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2UserEvent: UserEvent captures all metadata information // Retail API needs to know about how end users interact with customers' // website. @@ -9118,6 +9335,116 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal return ret, nil } +type ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall struct { + s *Service + catalog string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetGenerativeQuestionFeature: Manages overal generative question feature +// state -- enables toggling feature on and off. +// +// - catalog: Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) GetGenerativeQuestionFeature(catalog string) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c := &ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + 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 *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) 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, "v2/{+catalog}/generativeQuestionFeature") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.getGenerativeQuestionFeature" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2GenerativeQuestionsFeatureConfig.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2GenerativeQuestionsFeatureConfig, 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 := &GoogleCloudRetailV2GenerativeQuestionsFeatureConfig{ + 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 ProjectsLocationsCatalogsListCall struct { s *Service parent string @@ -9734,81 +10061,87 @@ func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsUpdateGenerativeQuestionCall struct { + s *Service + catalog string + googlecloudretailv2generativequestionconfig *GoogleCloudRetailV2GenerativeQuestionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddCatalogAttribute: Adds the specified CatalogAttribute to the -// AttributesConfig. If the CatalogAttribute to add already exists, an -// ALREADY_EXISTS error is returned. +// UpdateGenerativeQuestion: Allows management of individual questions. // -// - attributesConfig: Full AttributesConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at -// tributesConfig`. -func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { - c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.attributesConfig = attributesConfig - c.googlecloudretailv2addcatalogattributerequest = googlecloudretailv2addcatalogattributerequest +// - catalog: Resource name of the catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) UpdateGenerativeQuestion(catalog string, googlecloudretailv2generativequestionconfig *GoogleCloudRetailV2GenerativeQuestionConfig) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { + c := &ProjectsLocationsCatalogsUpdateGenerativeQuestionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2generativequestionconfig = googlecloudretailv2generativequestionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided GenerativeQuestionConfig to update. The following are NOT +// supported: * GenerativeQuestionConfig.frequency If not set or empty, all +// supported fields are updated. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { + 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) 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.googlecloudretailv2addcatalogattributerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2generativequestionconfig) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+attributesConfig}:addCatalogAttribute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}/generativeQuestion") 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{ - "attributesConfig": c.attributesConfig, + "catalog": c.catalog, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Do executes the "retail.projects.locations.catalogs.updateGenerativeQuestion" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudRetailV2GenerativeQuestionConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2GenerativeQuestionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9827,7 +10160,7 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudRetailV2AttributesConfig{ + ret := &GoogleCloudRetailV2GenerativeQuestionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9840,10 +10173,228 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op return ret, nil } -type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2removecatalogattributerequest *GoogleCloudRetailV2RemoveCatalogAttributeRequest +type ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall struct { + s *Service + catalog string + googlecloudretailv2generativequestionsfeatureconfig *GoogleCloudRetailV2GenerativeQuestionsFeatureConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateGenerativeQuestionFeature: Manages overal generative question feature +// state -- enables toggling feature on and off. +// +// - catalog: Resource name of the affected catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) UpdateGenerativeQuestionFeature(catalog string, googlecloudretailv2generativequestionsfeatureconfig *GoogleCloudRetailV2GenerativeQuestionsFeatureConfig) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c := &ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2generativequestionsfeatureconfig = googlecloudretailv2generativequestionsfeatureconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided GenerativeQuestionsFeatureConfig to update. If not set or +// empty, all supported fields are updated. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + 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 *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) 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.googlecloudretailv2generativequestionsfeatureconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}/generativeQuestionFeature") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.updateGenerativeQuestionFeature" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2GenerativeQuestionsFeatureConfig.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2GenerativeQuestionsFeatureConfig, 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 := &GoogleCloudRetailV2GenerativeQuestionsFeatureConfig{ + 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 ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddCatalogAttribute: Adds the specified CatalogAttribute to the +// AttributesConfig. If the CatalogAttribute to add already exists, an +// ALREADY_EXISTS error is returned. +// +// - attributesConfig: Full AttributesConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at +// tributesConfig`. +func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2addcatalogattributerequest = googlecloudretailv2addcatalogattributerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) 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.googlecloudretailv2addcatalogattributerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+attributesConfig}:addCatalogAttribute") + 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{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, 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 := &GoogleCloudRetailV2AttributesConfig{ + 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 ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2removecatalogattributerequest *GoogleCloudRetailV2RemoveCatalogAttributeRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -12322,6 +12873,218 @@ func (c *ProjectsLocationsCatalogsControlsPatchCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall struct { + s *Service + parent string + googlecloudretailv2batchupdategenerativequestionconfigsrequest *GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Allows management of multiple questions. +// +// - parent: Optional. Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsGenerativeQuestionService) BatchUpdate(parent string, googlecloudretailv2batchupdategenerativequestionconfigsrequest *GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c := &ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudretailv2batchupdategenerativequestionconfigsrequest = googlecloudretailv2batchupdategenerativequestionconfigsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) 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.googlecloudretailv2batchupdategenerativequestionconfigsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/generativeQuestion:batchUpdate") + 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 "retail.projects.locations.catalogs.generativeQuestion.batchUpdate" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse.ServerRespon +// se.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse, 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 := &GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse{ + 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 ProjectsLocationsCatalogsGenerativeQuestionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all questions for a given catalog. +// +// - parent: Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsGenerativeQuestionsService) List(parent string) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c := &ProjectsLocationsCatalogsGenerativeQuestionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + 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 *ProjectsLocationsCatalogsGenerativeQuestionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) 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, "v2/{+parent}/generativeQuestions") + 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 "retail.projects.locations.catalogs.generativeQuestions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse, 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 := &GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse{ + 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 ProjectsLocationsCatalogsModelsCreateCall struct { s *Service parent string diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 1e5aea82760..f9bcb00508a 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -479,6 +479,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getGenerativeQuestionFeature": { + "description": "Manages overal generative question feature state -- enables toggling feature on and off.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestionFeature", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getGenerativeQuestionFeature", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+catalog}/generativeQuestionFeature", + "response": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists all the Catalogs associated with the project.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs", @@ -644,6 +669,74 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateGenerativeQuestion": { + "description": "Allows management of individual questions.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestion", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateGenerativeQuestion", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionConfig to update. The following are NOT supported: * GenerativeQuestionConfig.frequency If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+catalog}/generativeQuestion", + "request": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateGenerativeQuestionFeature": { + "description": "Manages overal generative question feature state -- enables toggling feature on and off.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestionFeature", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateGenerativeQuestionFeature", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the affected catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionsFeatureConfig to update. If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+catalog}/generativeQuestionFeature", + "request": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1512,6 +1605,67 @@ } } }, + "generativeQuestion": { + "methods": { + "batchUpdate": { + "description": "Allows management of multiple questions.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestion:batchUpdate", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.generativeQuestion.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Optional. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/generativeQuestion:batchUpdate", + "request": { + "$ref": "GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "generativeQuestions": { + "methods": { + "list": { + "description": "Returns all questions for a given catalog.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestions", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.generativeQuestions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/generativeQuestions", + "response": { + "$ref": "GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "merchantCenterAccountLinks": { "methods": { "create": { @@ -2613,7 +2767,7 @@ } } }, - "revision": "20240912", + "revision": "20240920", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3588,6 +3742,34 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest": { + "description": "Request for BatchUpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest", + "properties": { + "requests": { + "description": "Required. The updates question configs.", + "items": { + "$ref": "GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse": { + "description": "Aggregated response for UpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse", + "properties": { + "generativeQuestionConfigs": { + "description": "Optional. The updates question configs.", + "items": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaBigQueryOutputResult": { "description": "A BigQuery output result.", "id": "GoogleCloudRetailV2alphaBigQueryOutputResult", @@ -4637,6 +4819,68 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaGenerativeQuestionConfig": { + "description": "Configuration for a single generated question.", + "id": "GoogleCloudRetailV2alphaGenerativeQuestionConfig", + "properties": { + "allowedInConversation": { + "description": "Optional. Whether the question is asked at serving time.", + "type": "boolean" + }, + "catalog": { + "description": "Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "type": "string" + }, + "exampleValues": { + "description": "Output only. Values that can be used to answer the question.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "facet": { + "description": "Required. The facet to which the question is associated.", + "type": "string" + }, + "finalQuestion": { + "description": "Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.", + "type": "string" + }, + "frequency": { + "description": "Output only. The ratio of how often a question was asked.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "generatedQuestion": { + "description": "Output only. The LLM generated question.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig": { + "description": "Configuration for overall generative question feature state.", + "id": "GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig", + "properties": { + "catalog": { + "description": "Required. Resource name of the affected catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "type": "string" + }, + "featureEnabled": { + "description": "Optional. Determines whether questions will be used at serving time. Note: This feature cannot be enabled until initial data requirements are satisfied.", + "type": "boolean" + }, + "minimumProducts": { + "description": "Optional. Minimum number of products in the response to trigger follow-up questions. Value must be 0 or positive.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaGetDefaultBranchResponse": { "description": "Response message of CatalogService.GetDefaultBranch.", "id": "GoogleCloudRetailV2alphaGetDefaultBranchResponse", @@ -4961,6 +5205,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse": { + "description": "Response for ListQuestions method.", + "id": "GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse", + "properties": { + "generativeQuestionConfigs": { + "description": "All the questions for a given catalog.", + "items": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse": { "description": "Response for MerchantCenterAccountLinkService.ListMerchantCenterAccountLinks method.", "id": "GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse", @@ -7580,6 +7838,22 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest": { + "description": "Request for UpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest", + "properties": { + "generativeQuestionConfig": { + "$ref": "GoogleCloudRetailV2alphaGenerativeQuestionConfig", + "description": "Required. The question to update." + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionConfig to update. The following are NOT supported: * GenerativeQuestionConfig.frequency If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaUserEvent": { "description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", "id": "GoogleCloudRetailV2alphaUserEvent", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 9bed4e8a3d8..c769a73f6c3 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -193,6 +193,8 @@ func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsS rs.Branches = NewProjectsLocationsCatalogsBranchesService(s) rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s) rs.Controls = NewProjectsLocationsCatalogsControlsService(s) + rs.GenerativeQuestion = NewProjectsLocationsCatalogsGenerativeQuestionService(s) + rs.GenerativeQuestions = NewProjectsLocationsCatalogsGenerativeQuestionsService(s) rs.MerchantCenterAccountLinks = NewProjectsLocationsCatalogsMerchantCenterAccountLinksService(s) rs.Models = NewProjectsLocationsCatalogsModelsService(s) rs.Operations = NewProjectsLocationsCatalogsOperationsService(s) @@ -213,6 +215,10 @@ type ProjectsLocationsCatalogsService struct { Controls *ProjectsLocationsCatalogsControlsService + GenerativeQuestion *ProjectsLocationsCatalogsGenerativeQuestionService + + GenerativeQuestions *ProjectsLocationsCatalogsGenerativeQuestionsService + MerchantCenterAccountLinks *ProjectsLocationsCatalogsMerchantCenterAccountLinksService Models *ProjectsLocationsCatalogsModelsService @@ -310,6 +316,24 @@ type ProjectsLocationsCatalogsControlsService struct { s *Service } +func NewProjectsLocationsCatalogsGenerativeQuestionService(s *Service) *ProjectsLocationsCatalogsGenerativeQuestionService { + rs := &ProjectsLocationsCatalogsGenerativeQuestionService{s: s} + return rs +} + +type ProjectsLocationsCatalogsGenerativeQuestionService struct { + s *Service +} + +func NewProjectsLocationsCatalogsGenerativeQuestionsService(s *Service) *ProjectsLocationsCatalogsGenerativeQuestionsService { + rs := &ProjectsLocationsCatalogsGenerativeQuestionsService{s: s} + return rs +} + +type ProjectsLocationsCatalogsGenerativeQuestionsService struct { + s *Service +} + func NewProjectsLocationsCatalogsMerchantCenterAccountLinksService(s *Service) *ProjectsLocationsCatalogsMerchantCenterAccountLinksService { rs := &ProjectsLocationsCatalogsMerchantCenterAccountLinksService{s: s} return rs @@ -1807,6 +1831,55 @@ func (s GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest: Request +// for BatchUpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest struct { + // Requests: Required. The updates question configs. + Requests []*GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Requests") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse: +// Aggregated response for UpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse struct { + // GenerativeQuestionConfigs: Optional. The updates question configs. + GenerativeQuestionConfigs []*GoogleCloudRetailV2alphaGenerativeQuestionConfig `json:"generativeQuestionConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfigs") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfigs") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaBigQueryOutputResult: A BigQuery output result. type GoogleCloudRetailV2alphaBigQueryOutputResult struct { // DatasetId: The ID of a BigQuery Dataset. @@ -3459,6 +3532,96 @@ func (s GoogleCloudRetailV2alphaGcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaGenerativeQuestionConfig: Configuration for a single +// generated question. +type GoogleCloudRetailV2alphaGenerativeQuestionConfig struct { + // AllowedInConversation: Optional. Whether the question is asked at serving + // time. + AllowedInConversation bool `json:"allowedInConversation,omitempty"` + // Catalog: Required. Resource name of the catalog. Format: + // projects/{project}/locations/{location}/catalogs/{catalog} + Catalog string `json:"catalog,omitempty"` + // ExampleValues: Output only. Values that can be used to answer the question. + ExampleValues []string `json:"exampleValues,omitempty"` + // Facet: Required. The facet to which the question is associated. + Facet string `json:"facet,omitempty"` + // FinalQuestion: Optional. The question that will be used at serving time. + // Question can have a max length of 300 bytes. When not populated, + // generated_question should be used. + FinalQuestion string `json:"finalQuestion,omitempty"` + // Frequency: Output only. The ratio of how often a question was asked. + Frequency float64 `json:"frequency,omitempty"` + // GeneratedQuestion: Output only. The LLM generated question. + GeneratedQuestion string `json:"generatedQuestion,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AllowedInConversation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllowedInConversation") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaGenerativeQuestionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaGenerativeQuestionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudRetailV2alphaGenerativeQuestionConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudRetailV2alphaGenerativeQuestionConfig + var s1 struct { + Frequency gensupport.JSONFloat64 `json:"frequency"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Frequency = float64(s1.Frequency) + return nil +} + +// GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig: Configuration for +// overall generative question feature state. +type GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig struct { + // Catalog: Required. Resource name of the affected catalog. Format: + // projects/{project}/locations/{location}/catalogs/{catalog} + Catalog string `json:"catalog,omitempty"` + // FeatureEnabled: Optional. Determines whether questions will be used at + // serving time. Note: This feature cannot be enabled until initial data + // requirements are satisfied. + FeatureEnabled bool `json:"featureEnabled,omitempty"` + // MinimumProducts: Optional. Minimum number of products in the response to + // trigger follow-up questions. Value must be 0 or positive. + MinimumProducts int64 `json:"minimumProducts,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Catalog") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Catalog") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaGetDefaultBranchResponse: Response message of // CatalogService.GetDefaultBranch. type GoogleCloudRetailV2alphaGetDefaultBranchResponse struct { @@ -3947,6 +4110,32 @@ func (s GoogleCloudRetailV2alphaListEnrolledSolutionsResponse) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse: Response for +// ListQuestions method. +type GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse struct { + // GenerativeQuestionConfigs: All the questions for a given catalog. + GenerativeQuestionConfigs []*GoogleCloudRetailV2alphaGenerativeQuestionConfig `json:"generativeQuestionConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfigs") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfigs") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse: Response for // MerchantCenterAccountLinkService.ListMerchantCenterAccountLinks method. type GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse struct { @@ -8070,6 +8259,34 @@ type GoogleCloudRetailV2alphaTuneModelRequest struct { type GoogleCloudRetailV2alphaTuneModelResponse struct { } +// GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest: Request for +// UpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest struct { + // GenerativeQuestionConfig: Required. The question to update. + GenerativeQuestionConfig *GoogleCloudRetailV2alphaGenerativeQuestionConfig `json:"generativeQuestionConfig,omitempty"` + // UpdateMask: Optional. Indicates which fields in the provided + // GenerativeQuestionConfig to update. The following are NOT supported: * + // GenerativeQuestionConfig.frequency If not set or empty, all supported fields + // are updated. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfig") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaUserEvent: UserEvent captures all metadata // information Retail API needs to know about how end users interact with // customers' website. @@ -10778,6 +10995,116 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal return ret, nil } +type ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall struct { + s *Service + catalog string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetGenerativeQuestionFeature: Manages overal generative question feature +// state -- enables toggling feature on and off. +// +// - catalog: Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) GetGenerativeQuestionFeature(catalog string) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c := &ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + 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 *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) 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, "v2alpha/{+catalog}/generativeQuestionFeature") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.getGenerativeQuestionFeature" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig, 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 := &GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig{ + 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 ProjectsLocationsCatalogsListCall struct { s *Service parent string @@ -11394,81 +11721,87 @@ func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsUpdateGenerativeQuestionCall struct { + s *Service + catalog string + googlecloudretailv2alphagenerativequestionconfig *GoogleCloudRetailV2alphaGenerativeQuestionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddCatalogAttribute: Adds the specified CatalogAttribute to the -// AttributesConfig. If the CatalogAttribute to add already exists, an -// ALREADY_EXISTS error is returned. +// UpdateGenerativeQuestion: Allows management of individual questions. // -// - attributesConfig: Full AttributesConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at -// tributesConfig`. -func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { - c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.attributesConfig = attributesConfig - c.googlecloudretailv2alphaaddcatalogattributerequest = googlecloudretailv2alphaaddcatalogattributerequest +// - catalog: Resource name of the catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) UpdateGenerativeQuestion(catalog string, googlecloudretailv2alphagenerativequestionconfig *GoogleCloudRetailV2alphaGenerativeQuestionConfig) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { + c := &ProjectsLocationsCatalogsUpdateGenerativeQuestionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2alphagenerativequestionconfig = googlecloudretailv2alphagenerativequestionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided GenerativeQuestionConfig to update. The following are NOT +// supported: * GenerativeQuestionConfig.frequency If not set or empty, all +// supported fields are updated. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { + 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) 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.googlecloudretailv2alphaaddcatalogattributerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alphagenerativequestionconfig) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+attributesConfig}:addCatalogAttribute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+catalog}/generativeQuestion") 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{ - "attributesConfig": c.attributesConfig, + "catalog": c.catalog, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Do executes the "retail.projects.locations.catalogs.updateGenerativeQuestion" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudRetailV2alphaAttributesConfig.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudRetailV2alphaGenerativeQuestionConfig.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaAttributesConfig, error) { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaGenerativeQuestionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11487,7 +11820,7 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudRetailV2alphaAttributesConfig{ + ret := &GoogleCloudRetailV2alphaGenerativeQuestionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11500,9 +11833,227 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op return ret, nil } -type ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall struct { - s *Service - attributesConfig string +type ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall struct { + s *Service + catalog string + googlecloudretailv2alphagenerativequestionsfeatureconfig *GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateGenerativeQuestionFeature: Manages overal generative question feature +// state -- enables toggling feature on and off. +// +// - catalog: Resource name of the affected catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) UpdateGenerativeQuestionFeature(catalog string, googlecloudretailv2alphagenerativequestionsfeatureconfig *GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c := &ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2alphagenerativequestionsfeatureconfig = googlecloudretailv2alphagenerativequestionsfeatureconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided GenerativeQuestionsFeatureConfig to update. If not set or +// empty, all supported fields are updated. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + 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 *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) 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.googlecloudretailv2alphagenerativequestionsfeatureconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+catalog}/generativeQuestionFeature") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.updateGenerativeQuestionFeature" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig, 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 := &GoogleCloudRetailV2alphaGenerativeQuestionsFeatureConfig{ + 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 ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddCatalogAttribute: Adds the specified CatalogAttribute to the +// AttributesConfig. If the CatalogAttribute to add already exists, an +// ALREADY_EXISTS error is returned. +// +// - attributesConfig: Full AttributesConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at +// tributesConfig`. +func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2alphaaddcatalogattributerequest = googlecloudretailv2alphaaddcatalogattributerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) 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.googlecloudretailv2alphaaddcatalogattributerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+attributesConfig}:addCatalogAttribute") + 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{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2alphaAttributesConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaAttributesConfig, 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 := &GoogleCloudRetailV2alphaAttributesConfig{ + 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 ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall struct { + s *Service + attributesConfig string googlecloudretailv2alphabatchremovecatalogattributesrequest *GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest urlParams_ gensupport.URLParams ctx_ context.Context @@ -14585,6 +15136,218 @@ func (c *ProjectsLocationsCatalogsControlsPatchCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall struct { + s *Service + parent string + googlecloudretailv2alphabatchupdategenerativequestionconfigsrequest *GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Allows management of multiple questions. +// +// - parent: Optional. Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsGenerativeQuestionService) BatchUpdate(parent string, googlecloudretailv2alphabatchupdategenerativequestionconfigsrequest *GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c := &ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudretailv2alphabatchupdategenerativequestionconfigsrequest = googlecloudretailv2alphabatchupdategenerativequestionconfigsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) 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.googlecloudretailv2alphabatchupdategenerativequestionconfigsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/generativeQuestion:batchUpdate") + 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 "retail.projects.locations.catalogs.generativeQuestion.batchUpdate" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse.ServerR +// esponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse, 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 := &GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse{ + 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 ProjectsLocationsCatalogsGenerativeQuestionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all questions for a given catalog. +// +// - parent: Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsGenerativeQuestionsService) List(parent string) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c := &ProjectsLocationsCatalogsGenerativeQuestionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + 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 *ProjectsLocationsCatalogsGenerativeQuestionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) 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, "v2alpha/{+parent}/generativeQuestions") + 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 "retail.projects.locations.catalogs.generativeQuestions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse, 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 := &GoogleCloudRetailV2alphaListGenerativeQuestionConfigsResponse{ + 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 ProjectsLocationsCatalogsMerchantCenterAccountLinksCreateCall struct { s *Service parent string diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 21ede18827b..f3defda5bdb 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -342,6 +342,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getGenerativeQuestionFeature": { + "description": "Manages overal generative question feature state -- enables toggling feature on and off.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestionFeature", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getGenerativeQuestionFeature", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+catalog}/generativeQuestionFeature", + "response": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists all the Catalogs associated with the project.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs", @@ -507,6 +532,74 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateGenerativeQuestion": { + "description": "Allows management of individual questions.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestion", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateGenerativeQuestion", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionConfig to update. The following are NOT supported: * GenerativeQuestionConfig.frequency If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+catalog}/generativeQuestion", + "request": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateGenerativeQuestionFeature": { + "description": "Manages overal generative question feature state -- enables toggling feature on and off.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestionFeature", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateGenerativeQuestionFeature", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Resource name of the affected catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionsFeatureConfig to update. If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+catalog}/generativeQuestionFeature", + "request": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1250,6 +1343,67 @@ } } }, + "generativeQuestion": { + "methods": { + "batchUpdate": { + "description": "Allows management of multiple questions.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestion:batchUpdate", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.generativeQuestion.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Optional. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/generativeQuestion:batchUpdate", + "request": { + "$ref": "GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "generativeQuestions": { + "methods": { + "list": { + "description": "Returns all questions for a given catalog.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/generativeQuestions", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.generativeQuestions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/generativeQuestions", + "response": { + "$ref": "GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "models": { "methods": { "create": { @@ -2237,7 +2391,7 @@ } } }, - "revision": "20240912", + "revision": "20240920", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4036,6 +4190,34 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest": { + "description": "Request for BatchUpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest", + "properties": { + "requests": { + "description": "Required. The updates question configs.", + "items": { + "$ref": "GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse": { + "description": "Aggregated response for UpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse", + "properties": { + "generativeQuestionConfigs": { + "description": "Optional. The updates question configs.", + "items": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaBigQueryOutputResult": { "description": "A BigQuery output result.", "id": "GoogleCloudRetailV2betaBigQueryOutputResult", @@ -4903,6 +5085,68 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaGenerativeQuestionConfig": { + "description": "Configuration for a single generated question.", + "id": "GoogleCloudRetailV2betaGenerativeQuestionConfig", + "properties": { + "allowedInConversation": { + "description": "Optional. Whether the question is asked at serving time.", + "type": "boolean" + }, + "catalog": { + "description": "Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "type": "string" + }, + "exampleValues": { + "description": "Output only. Values that can be used to answer the question.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "facet": { + "description": "Required. The facet to which the question is associated.", + "type": "string" + }, + "finalQuestion": { + "description": "Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.", + "type": "string" + }, + "frequency": { + "description": "Output only. The ratio of how often a question was asked.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "generatedQuestion": { + "description": "Output only. The LLM generated question.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig": { + "description": "Configuration for overall generative question feature state.", + "id": "GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig", + "properties": { + "catalog": { + "description": "Required. Resource name of the affected catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}", + "type": "string" + }, + "featureEnabled": { + "description": "Optional. Determines whether questions will be used at serving time. Note: This feature cannot be enabled until initial data requirements are satisfied.", + "type": "boolean" + }, + "minimumProducts": { + "description": "Optional. Minimum number of products in the response to trigger follow-up questions. Value must be 0 or positive.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaGetDefaultBranchResponse": { "description": "Response message of CatalogService.GetDefaultBranch.", "id": "GoogleCloudRetailV2betaGetDefaultBranchResponse", @@ -5181,6 +5425,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse": { + "description": "Response for ListQuestions method.", + "id": "GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse", + "properties": { + "generativeQuestionConfigs": { + "description": "All the questions for a given catalog.", + "items": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaListModelsResponse": { "description": "Response to a ListModelRequest.", "id": "GoogleCloudRetailV2betaListModelsResponse", @@ -7493,6 +7751,22 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest": { + "description": "Request for UpdateGenerativeQuestionConfig method.", + "id": "GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest", + "properties": { + "generativeQuestionConfig": { + "$ref": "GoogleCloudRetailV2betaGenerativeQuestionConfig", + "description": "Required. The question to update." + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided GenerativeQuestionConfig to update. The following are NOT supported: * GenerativeQuestionConfig.frequency If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaUserEvent": { "description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", "id": "GoogleCloudRetailV2betaUserEvent", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 227565fbbb6..169e6a4987c 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -190,6 +190,8 @@ func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsS rs.Branches = NewProjectsLocationsCatalogsBranchesService(s) rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s) rs.Controls = NewProjectsLocationsCatalogsControlsService(s) + rs.GenerativeQuestion = NewProjectsLocationsCatalogsGenerativeQuestionService(s) + rs.GenerativeQuestions = NewProjectsLocationsCatalogsGenerativeQuestionsService(s) rs.Models = NewProjectsLocationsCatalogsModelsService(s) rs.Operations = NewProjectsLocationsCatalogsOperationsService(s) rs.Placements = NewProjectsLocationsCatalogsPlacementsService(s) @@ -209,6 +211,10 @@ type ProjectsLocationsCatalogsService struct { Controls *ProjectsLocationsCatalogsControlsService + GenerativeQuestion *ProjectsLocationsCatalogsGenerativeQuestionService + + GenerativeQuestions *ProjectsLocationsCatalogsGenerativeQuestionsService + Models *ProjectsLocationsCatalogsModelsService Operations *ProjectsLocationsCatalogsOperationsService @@ -280,6 +286,24 @@ type ProjectsLocationsCatalogsControlsService struct { s *Service } +func NewProjectsLocationsCatalogsGenerativeQuestionService(s *Service) *ProjectsLocationsCatalogsGenerativeQuestionService { + rs := &ProjectsLocationsCatalogsGenerativeQuestionService{s: s} + return rs +} + +type ProjectsLocationsCatalogsGenerativeQuestionService struct { + s *Service +} + +func NewProjectsLocationsCatalogsGenerativeQuestionsService(s *Service) *ProjectsLocationsCatalogsGenerativeQuestionsService { + rs := &ProjectsLocationsCatalogsGenerativeQuestionsService{s: s} + return rs +} + +type ProjectsLocationsCatalogsGenerativeQuestionsService struct { + s *Service +} + func NewProjectsLocationsCatalogsModelsService(s *Service) *ProjectsLocationsCatalogsModelsService { rs := &ProjectsLocationsCatalogsModelsService{s: s} return rs @@ -2940,6 +2964,55 @@ func (s GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest: Request +// for BatchUpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest struct { + // Requests: Required. The updates question configs. + Requests []*GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Requests") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse: +// Aggregated response for UpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse struct { + // GenerativeQuestionConfigs: Optional. The updates question configs. + GenerativeQuestionConfigs []*GoogleCloudRetailV2betaGenerativeQuestionConfig `json:"generativeQuestionConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfigs") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfigs") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaBigQueryOutputResult: A BigQuery output result. type GoogleCloudRetailV2betaBigQueryOutputResult struct { // DatasetId: The ID of a BigQuery Dataset. @@ -4329,6 +4402,96 @@ func (s GoogleCloudRetailV2betaGcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaGenerativeQuestionConfig: Configuration for a single +// generated question. +type GoogleCloudRetailV2betaGenerativeQuestionConfig struct { + // AllowedInConversation: Optional. Whether the question is asked at serving + // time. + AllowedInConversation bool `json:"allowedInConversation,omitempty"` + // Catalog: Required. Resource name of the catalog. Format: + // projects/{project}/locations/{location}/catalogs/{catalog} + Catalog string `json:"catalog,omitempty"` + // ExampleValues: Output only. Values that can be used to answer the question. + ExampleValues []string `json:"exampleValues,omitempty"` + // Facet: Required. The facet to which the question is associated. + Facet string `json:"facet,omitempty"` + // FinalQuestion: Optional. The question that will be used at serving time. + // Question can have a max length of 300 bytes. When not populated, + // generated_question should be used. + FinalQuestion string `json:"finalQuestion,omitempty"` + // Frequency: Output only. The ratio of how often a question was asked. + Frequency float64 `json:"frequency,omitempty"` + // GeneratedQuestion: Output only. The LLM generated question. + GeneratedQuestion string `json:"generatedQuestion,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AllowedInConversation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllowedInConversation") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaGenerativeQuestionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaGenerativeQuestionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudRetailV2betaGenerativeQuestionConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudRetailV2betaGenerativeQuestionConfig + var s1 struct { + Frequency gensupport.JSONFloat64 `json:"frequency"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Frequency = float64(s1.Frequency) + return nil +} + +// GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig: Configuration for +// overall generative question feature state. +type GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig struct { + // Catalog: Required. Resource name of the affected catalog. Format: + // projects/{project}/locations/{location}/catalogs/{catalog} + Catalog string `json:"catalog,omitempty"` + // FeatureEnabled: Optional. Determines whether questions will be used at + // serving time. Note: This feature cannot be enabled until initial data + // requirements are satisfied. + FeatureEnabled bool `json:"featureEnabled,omitempty"` + // MinimumProducts: Optional. Minimum number of products in the response to + // trigger follow-up questions. Value must be 0 or positive. + MinimumProducts int64 `json:"minimumProducts,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Catalog") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Catalog") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaGetDefaultBranchResponse: Response message of // CatalogService.GetDefaultBranch. type GoogleCloudRetailV2betaGetDefaultBranchResponse struct { @@ -4752,6 +4915,32 @@ func (s GoogleCloudRetailV2betaListControlsResponse) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse: Response for +// ListQuestions method. +type GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse struct { + // GenerativeQuestionConfigs: All the questions for a given catalog. + GenerativeQuestionConfigs []*GoogleCloudRetailV2betaGenerativeQuestionConfig `json:"generativeQuestionConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfigs") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfigs") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaListModelsResponse: Response to a ListModelRequest. type GoogleCloudRetailV2betaListModelsResponse struct { // Models: List of Models. @@ -8399,6 +8588,34 @@ type GoogleCloudRetailV2betaTuneModelRequest struct { type GoogleCloudRetailV2betaTuneModelResponse struct { } +// GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest: Request for +// UpdateGenerativeQuestionConfig method. +type GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest struct { + // GenerativeQuestionConfig: Required. The question to update. + GenerativeQuestionConfig *GoogleCloudRetailV2betaGenerativeQuestionConfig `json:"generativeQuestionConfig,omitempty"` + // UpdateMask: Optional. Indicates which fields in the provided + // GenerativeQuestionConfig to update. The following are NOT supported: * + // GenerativeQuestionConfig.frequency If not set or empty, all supported fields + // are updated. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenerativeQuestionConfig") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GenerativeQuestionConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaUpdateGenerativeQuestionConfigRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaUserEvent: UserEvent captures all metadata // information Retail API needs to know about how end users interact with // customers' website. @@ -9711,6 +9928,116 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal return ret, nil } +type ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall struct { + s *Service + catalog string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetGenerativeQuestionFeature: Manages overal generative question feature +// state -- enables toggling feature on and off. +// +// - catalog: Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) GetGenerativeQuestionFeature(catalog string) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c := &ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + 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 *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) 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, "v2beta/{+catalog}/generativeQuestionFeature") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.getGenerativeQuestionFeature" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig.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 *ProjectsLocationsCatalogsGetGenerativeQuestionFeatureCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig, 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 := &GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig{ + 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 ProjectsLocationsCatalogsListCall struct { s *Service parent string @@ -10327,81 +10654,87 @@ func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsUpdateGenerativeQuestionCall struct { + s *Service + catalog string + googlecloudretailv2betagenerativequestionconfig *GoogleCloudRetailV2betaGenerativeQuestionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddCatalogAttribute: Adds the specified CatalogAttribute to the -// AttributesConfig. If the CatalogAttribute to add already exists, an -// ALREADY_EXISTS error is returned. +// UpdateGenerativeQuestion: Allows management of individual questions. // -// - attributesConfig: Full AttributesConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at -// tributesConfig`. -func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { - c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.attributesConfig = attributesConfig - c.googlecloudretailv2betaaddcatalogattributerequest = googlecloudretailv2betaaddcatalogattributerequest +// - catalog: Resource name of the catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) UpdateGenerativeQuestion(catalog string, googlecloudretailv2betagenerativequestionconfig *GoogleCloudRetailV2betaGenerativeQuestionConfig) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { + c := &ProjectsLocationsCatalogsUpdateGenerativeQuestionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2betagenerativequestionconfig = googlecloudretailv2betagenerativequestionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided GenerativeQuestionConfig to update. The following are NOT +// supported: * GenerativeQuestionConfig.frequency If not set or empty, all +// supported fields are updated. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { + 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) 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.googlecloudretailv2betaaddcatalogattributerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betagenerativequestionconfig) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+attributesConfig}:addCatalogAttribute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+catalog}/generativeQuestion") 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{ - "attributesConfig": c.attributesConfig, + "catalog": c.catalog, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Do executes the "retail.projects.locations.catalogs.updateGenerativeQuestion" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudRetailV2betaAttributesConfig.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudRetailV2betaGenerativeQuestionConfig.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaAttributesConfig, error) { +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaGenerativeQuestionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10420,7 +10753,7 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudRetailV2betaAttributesConfig{ + ret := &GoogleCloudRetailV2betaGenerativeQuestionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10433,10 +10766,228 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op return ret, nil } -type ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall struct { - s *Service - attributesConfig string - googlecloudretailv2betabatchremovecatalogattributesrequest *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest +type ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall struct { + s *Service + catalog string + googlecloudretailv2betagenerativequestionsfeatureconfig *GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateGenerativeQuestionFeature: Manages overal generative question feature +// state -- enables toggling feature on and off. +// +// - catalog: Resource name of the affected catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsService) UpdateGenerativeQuestionFeature(catalog string, googlecloudretailv2betagenerativequestionsfeatureconfig *GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c := &ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2betagenerativequestionsfeatureconfig = googlecloudretailv2betagenerativequestionsfeatureconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided GenerativeQuestionsFeatureConfig to update. If not set or +// empty, all supported fields are updated. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + 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 *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) 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.googlecloudretailv2betagenerativequestionsfeatureconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+catalog}/generativeQuestionFeature") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.updateGenerativeQuestionFeature" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig.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 *ProjectsLocationsCatalogsUpdateGenerativeQuestionFeatureCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig, 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 := &GoogleCloudRetailV2betaGenerativeQuestionsFeatureConfig{ + 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 ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddCatalogAttribute: Adds the specified CatalogAttribute to the +// AttributesConfig. If the CatalogAttribute to add already exists, an +// ALREADY_EXISTS error is returned. +// +// - attributesConfig: Full AttributesConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at +// tributesConfig`. +func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2betaaddcatalogattributerequest = googlecloudretailv2betaaddcatalogattributerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) 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.googlecloudretailv2betaaddcatalogattributerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+attributesConfig}:addCatalogAttribute") + 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{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2betaAttributesConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaAttributesConfig, 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 := &GoogleCloudRetailV2betaAttributesConfig{ + 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 ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall struct { + s *Service + attributesConfig string + googlecloudretailv2betabatchremovecatalogattributesrequest *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header @@ -13126,6 +13677,218 @@ func (c *ProjectsLocationsCatalogsControlsPatchCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall struct { + s *Service + parent string + googlecloudretailv2betabatchupdategenerativequestionconfigsrequest *GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Allows management of multiple questions. +// +// - parent: Optional. Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsGenerativeQuestionService) BatchUpdate(parent string, googlecloudretailv2betabatchupdategenerativequestionconfigsrequest *GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsRequest) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c := &ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudretailv2betabatchupdategenerativequestionconfigsrequest = googlecloudretailv2betabatchupdategenerativequestionconfigsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) 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.googlecloudretailv2betabatchupdategenerativequestionconfigsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/generativeQuestion:batchUpdate") + 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 "retail.projects.locations.catalogs.generativeQuestion.batchUpdate" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGenerativeQuestionBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse, 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 := &GoogleCloudRetailV2betaBatchUpdateGenerativeQuestionConfigsResponse{ + 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 ProjectsLocationsCatalogsGenerativeQuestionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all questions for a given catalog. +// +// - parent: Resource name of the parent catalog. Format: +// projects/{project}/locations/{location}/catalogs/{catalog}. +func (r *ProjectsLocationsCatalogsGenerativeQuestionsService) List(parent string) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c := &ProjectsLocationsCatalogsGenerativeQuestionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + 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 *ProjectsLocationsCatalogsGenerativeQuestionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGenerativeQuestionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) 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, "v2beta/{+parent}/generativeQuestions") + 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 "retail.projects.locations.catalogs.generativeQuestions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGenerativeQuestionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse, 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 := &GoogleCloudRetailV2betaListGenerativeQuestionConfigsResponse{ + 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 ProjectsLocationsCatalogsModelsCreateCall struct { s *Service parent string diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index 8e3a60758f8..341cfd521c6 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -512,6 +512,11 @@ "pattern": "^folders/[^/]+/containerThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -541,6 +546,11 @@ "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -599,6 +609,11 @@ "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -628,6 +643,11 @@ "pattern": "^folders/[^/]+/virtualMachineThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -657,6 +677,11 @@ "pattern": "^folders/[^/]+/webSecurityScannerSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1096,6 +1121,11 @@ "pattern": "^organizations/[^/]+/containerThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1125,6 +1155,11 @@ "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1183,6 +1218,11 @@ "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1212,6 +1252,11 @@ "pattern": "^organizations/[^/]+/virtualMachineThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1241,6 +1286,11 @@ "pattern": "^organizations/[^/]+/webSecurityScannerSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1655,6 +1705,11 @@ "pattern": "^projects/[^/]+/containerThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1684,6 +1739,11 @@ "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1778,6 +1838,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/containerThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1840,6 +1905,11 @@ "pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1869,6 +1939,11 @@ "pattern": "^projects/[^/]+/virtualMachineThreatDetectionSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1898,6 +1973,11 @@ "pattern": "^projects/[^/]+/webSecurityScannerSettings$", "required": true, "type": "string" + }, + "showEligibleModulesOnly": { + "description": "Optional. When set, will only retrieve the modules that are in scope. By default, all modules will be shown.", + "location": "query", + "type": "boolean" } }, "path": "v1beta2/{+name}:calculate", @@ -1913,7 +1993,7 @@ } } }, - "revision": "20240916", + "revision": "20240918", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 4ed3ade9454..896ce252e27 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -10309,6 +10309,14 @@ func (r *FoldersContainerThreatDetectionSettingsService) Calculate(name string) return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *FoldersContainerThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *FoldersContainerThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -10426,6 +10434,14 @@ func (r *FoldersEventThreatDetectionSettingsService) Calculate(name string) *Fol return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *FoldersEventThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *FoldersEventThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -10661,6 +10677,14 @@ func (r *FoldersSecurityHealthAnalyticsSettingsService) Calculate(name string) * return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *FoldersSecurityHealthAnalyticsSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *FoldersSecurityHealthAnalyticsSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -10779,6 +10803,14 @@ func (r *FoldersVirtualMachineThreatDetectionSettingsService) Calculate(name str return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *FoldersVirtualMachineThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *FoldersVirtualMachineThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -10896,6 +10928,14 @@ func (r *FoldersWebSecurityScannerSettingsService) Calculate(name string) *Folde return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *FoldersWebSecurityScannerSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *FoldersWebSecurityScannerSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -12627,6 +12667,14 @@ func (r *OrganizationsContainerThreatDetectionSettingsService) Calculate(name st return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *OrganizationsContainerThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *OrganizationsContainerThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -12744,6 +12792,14 @@ func (r *OrganizationsEventThreatDetectionSettingsService) Calculate(name string return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *OrganizationsEventThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -12979,6 +13035,14 @@ func (r *OrganizationsSecurityHealthAnalyticsSettingsService) Calculate(name str return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -13097,6 +13161,14 @@ func (r *OrganizationsVirtualMachineThreatDetectionSettingsService) Calculate(na return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -13214,6 +13286,14 @@ func (r *OrganizationsWebSecurityScannerSettingsService) Calculate(name string) return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *OrganizationsWebSecurityScannerSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *OrganizationsWebSecurityScannerSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -14837,6 +14917,14 @@ func (r *ProjectsContainerThreatDetectionSettingsService) Calculate(name string) return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *ProjectsContainerThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *ProjectsContainerThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -14954,6 +15042,14 @@ func (r *ProjectsEventThreatDetectionSettingsService) Calculate(name string) *Pr return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *ProjectsEventThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *ProjectsEventThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -15309,6 +15405,14 @@ func (r *ProjectsLocationsClustersContainerThreatDetectionSettingsService) Calcu return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -15544,6 +15648,14 @@ func (r *ProjectsSecurityHealthAnalyticsSettingsService) Calculate(name string) return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *ProjectsSecurityHealthAnalyticsSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *ProjectsSecurityHealthAnalyticsSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -15662,6 +15774,14 @@ func (r *ProjectsVirtualMachineThreatDetectionSettingsService) Calculate(name st return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -15779,6 +15899,14 @@ func (r *ProjectsWebSecurityScannerSettingsService) Calculate(name string) *Proj return c } +// ShowEligibleModulesOnly sets the optional parameter +// "showEligibleModulesOnly": When set, will only retrieve the modules that are +// in scope. By default, all modules will be shown. +func (c *ProjectsWebSecurityScannerSettingsCalculateCall) ShowEligibleModulesOnly(showEligibleModulesOnly bool) *ProjectsWebSecurityScannerSettingsCalculateCall { + c.urlParams_.Set("showEligibleModulesOnly", fmt.Sprint(showEligibleModulesOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index 6f372796c52..5f8553e505e 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -542,7 +542,7 @@ } } }, - "revision": "20240912", + "revision": "20240919", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -966,6 +966,10 @@ "deprecated": true, "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", "type": "string" + }, + "selectiveGapicGeneration": { + "$ref": "SelectiveGapicGeneration", + "description": "Configuration for which RPCs should be generated in the GAPIC client." } }, "type": "object" @@ -2477,6 +2481,20 @@ }, "type": "object" }, + "SelectiveGapicGeneration": { + "description": "This message is used to configure the generation of a subset of the RPCs in a service for client libraries.", + "id": "SelectiveGapicGeneration", + "properties": { + "methods": { + "description": "An allowlist of the fully qualified names of RPCs that should be included on public client surfaces.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Service": { "description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", "id": "Service", diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index 903b5772361..f3051ebbeeb 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -822,6 +822,9 @@ type CommonLanguageSettings struct { // ReferenceDocsUri: Link to automatically generated reference documentation. // Example: https://cloud.google.com/nodejs/docs/reference/asset/latest ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + // SelectiveGapicGeneration: Configuration for which RPCs should be generated + // in the GAPIC client. + SelectiveGapicGeneration *SelectiveGapicGeneration `json:"selectiveGapicGeneration,omitempty"` // ForceSendFields is a list of field names (e.g. "Destinations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3183,6 +3186,30 @@ func (s SearchTenancyUnitsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SelectiveGapicGeneration: This message is used to configure the generation +// of a subset of the RPCs in a service for client libraries. +type SelectiveGapicGeneration struct { + // Methods: An allowlist of the fully qualified names of RPCs that should be + // included on public client surfaces. + Methods []string `json:"methods,omitempty"` + // ForceSendFields is a list of field names (e.g. "Methods") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Methods") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SelectiveGapicGeneration) MarshalJSON() ([]byte, error) { + type NoMethod SelectiveGapicGeneration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Service: `Service` is the root object of Google API service configuration // (service config). It describes the basic information about a logical // service, such as the service name and the user-facing title, and delegates diff --git a/sheets/v4/sheets-api.json b/sheets/v4/sheets-api.json index 971a1645454..306c85d4eb6 100644 --- a/sheets/v4/sheets-api.json +++ b/sheets/v4/sheets-api.json @@ -870,7 +870,7 @@ } } }, - "revision": "20240826", + "revision": "20240917", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -6957,7 +6957,7 @@ "description": "The default format of all cells in the spreadsheet. CellData.effectiveFormat will not be set if the cell's format is equal to this default format. This field is read-only." }, "importFunctionsExternalUrlAccessAllowed": { - "description": "Whether to allow external URL access for image and import functions. Read only when true. When false, you can set to true. This value will be bypassed and always return true if the admin has enabled the allowlisting feature.", + "description": "Whether to allow external URL access for image and import functions. Read only when true. When false, you can set to true. This value will be bypassed and always return true if the admin has enabled the [allowlisting feature](https://support.google.com/a?p=url_allowlist).", "type": "boolean" }, "iterativeCalculationSettings": { diff --git a/sheets/v4/sheets-gen.go b/sheets/v4/sheets-gen.go index c8cbc279048..141b1370e51 100644 --- a/sheets/v4/sheets-gen.go +++ b/sheets/v4/sheets-gen.go @@ -7932,7 +7932,8 @@ type SpreadsheetProperties struct { // ImportFunctionsExternalUrlAccessAllowed: Whether to allow external URL // access for image and import functions. Read only when true. When false, you // can set to true. This value will be bypassed and always return true if the - // admin has enabled the allowlisting feature. + // admin has enabled the allowlisting feature + // (https://support.google.com/a?p=url_allowlist). ImportFunctionsExternalUrlAccessAllowed bool `json:"importFunctionsExternalUrlAccessAllowed,omitempty"` // IterativeCalculationSettings: Determines whether and how circular references // are resolved with iterative calculation. Absence of this field means that